From 4f37cdcd36adb1bafcdf9af49b611180a64d157b Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Sat, 21 Jul 2018 00:40:57 -0500 Subject: Code improvement Description: Moved the new H5Object::getInfo member functions to H5Location and made them overloaded with the existing H5Location::getObjinfo. This way is cleaner than the previous approach. Platforms tested: Linux/64 (jelly) Linux/32 (jam) Darwin (osx1010test) --- c++/src/H5Location.cpp | 143 +++++++++++++++++++++++++++++++++++++++++-------- c++/src/H5Location.h | 23 +++++++- c++/src/H5Object.cpp | 124 ------------------------------------------ c++/src/H5Object.h | 20 ------- c++/test/dsets.cpp | 12 ++--- c++/test/tattr.cpp | 12 ++--- c++/test/tfile.cpp | 8 +-- c++/test/tobject.cpp | 18 +++---- c++/test/trefer.cpp | 10 ++-- c++/test/ttypes.cpp | 9 ++-- 10 files changed, 176 insertions(+), 203 deletions(-) diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp index 8df7467..dd82a54 100644 --- a/c++/src/H5Location.cpp +++ b/c++/src/H5Location.cpp @@ -1356,58 +1356,154 @@ void H5Location::move(const H5std_string& src, const H5std_string& dst) const moveLink(src.c_str(), dst.c_str(), LinkCreatPropList::DEFAULT, LinkAccPropList::DEFAULT); } -#if 0 //-------------------------------------------------------------------------- -// Function: H5Location::deleteLink +// Function: H5Location::unlink ///\brief Removes the specified link from this group. ///\param name - IN: Name of the object to be removed ///\exception H5::FileIException/H5::GroupIException/H5::LocationException // March, 2018 //-------------------------------------------------------------------------- -void H5Location::deleteLink(const char* name, const LinkAccPropList& lapl) const +void H5Location::unlink(const char* name, const LinkAccPropList& lapl) const { - herr_t ret_value = H5Ldelete(getId(), name, H5P_DEFAULT); + herr_t ret_value = H5Ldelete(getId(), name, lapl.getId()); if (ret_value < 0) - throwException("deleteLink", "H5Ldelete failed"); + throwException("unlink", "H5Ldelete failed"); } //-------------------------------------------------------------------------- -// Function: H5Location::deleteLink +// Function: H5Location::unlink ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. // March, 2018 //-------------------------------------------------------------------------- -void H5Location::deleteLink(const H5std_string& name, const LinkAccPropList& lapl) const +void H5Location::unlink(const H5std_string& name, const LinkAccPropList& lapl) const { - deleteLink(name.c_str()); + unlink(name.c_str(), lapl); } -#endif //-------------------------------------------------------------------------- -// Function: H5Location::unlink -///\brief Removes the specified link from this group. -///\param name - IN: Name of the object to be removed -///\exception H5::FileIException/H5::GroupIException/H5::LocationException -// March, 2018 +// Function: H5Location::getObjinfo +///\brief Retrieves information about an HDF5 object. +///\param objinfo - OUT: Struct containing the object info +///\param fields - IN: Indicates the group of information to be retrieved +///\par Description +/// Valid values of \a fields are as follows: +/// \li \c H5O_INFO_BASIC (default) +/// \li \c H5O_INFO_TIME +/// \li \c H5O_INFO_NUM_ATTRS +/// \li \c H5O_INFO_HDR +/// \li \c H5O_INFO_META_SIZE +/// \li \c H5O_INFO_ALL +// July, 2018 //-------------------------------------------------------------------------- -void H5Location::unlink(const char* name, const LinkAccPropList& lapl) const +void H5Location::getObjinfo(H5O_info_t& objinfo, unsigned fields) const { - herr_t ret_value = H5Ldelete(getId(), name, lapl.getId()); + + // Use C API to get information of the object + herr_t ret_value = H5Oget_info2(getId(), &objinfo, fields); + + // Throw exception if C API returns failure if (ret_value < 0) - throwException("unlink", "H5Ldelete failed"); + throwException(inMemFunc("getObjinfo"), "H5Oget_info2 failed"); } //-------------------------------------------------------------------------- -// Function: H5Location::unlink +// Function: H5Location::getObjinfo +///\brief Retrieves information about an HDF5 object given its name. +///\param name - IN: Name of the object to be queried - \c char * +///\param objinfo - OUT: Struct containing the object info +///\param fields - IN: Indicates the group of information to be retrieved +/// - default to H5O_INFO_BASIC +///\param lapl - IN: Link access property list +///\par Description +/// Valid values of \a fields are as follows: +/// \li \c H5O_INFO_BASIC (default) +/// \li \c H5O_INFO_TIME +/// \li \c H5O_INFO_NUM_ATTRS +/// \li \c H5O_INFO_HDR +/// \li \c H5O_INFO_META_SIZE +/// \li \c H5O_INFO_ALL +// July, 2018 +//-------------------------------------------------------------------------- +void H5Location::getObjinfo(const char* name, H5O_info_t& objinfo, unsigned fields, const LinkAccPropList& lapl) const +{ + // Use C API to get information of the object + herr_t ret_value = H5Oget_info_by_name2(getId(), name, &objinfo, fields, lapl.getId()); + + // Throw exception if C API returns failure + if (ret_value < 0) + throwException(inMemFunc("getObjinfo"), "H5Oget_info_by_name2 failed"); +} + +//-------------------------------------------------------------------------- +// Function: H5Location::getObjinfo ///\brief This is an overloaded member function, provided for convenience. -/// It differs from the above function in that it takes an -/// \c H5std_string for \a name. -// March, 2018 +/// It differs from the above function in that it takes +/// a reference to an \c H5std_string for \a name. +///\param name - IN: Name of the object to be queried - \c H5std_string +///\param objinfo - OUT: Struct containing the object info +///\param fields - IN: Indicates the group of information to be retrieved +/// - default to H5O_INFO_BASIC +///\param lapl - IN: Link access property list +// July, 2018 //-------------------------------------------------------------------------- -void H5Location::unlink(const H5std_string& name, const LinkAccPropList& lapl) const +void H5Location::getObjinfo(const H5std_string& name, H5O_info_t& objinfo, unsigned fields, const LinkAccPropList& lapl) const { - unlink(name.c_str(), lapl); + getObjinfo(name.c_str(), objinfo, fields, lapl); +} + +//-------------------------------------------------------------------------- +// Function: H5Location::getObjinfo +///\brief Retrieves information about an HDF5 object given its index. +///\param grp_name - IN: Group name where the object belongs - \c char * +///\param idx_type - IN: Type of index +///\param order - IN: Order to traverse +///\param idx - IN: Object position +///\param objinfo - OUT: Struct containing the object info +///\param fields - IN: Indicates the group of information to be retrieved +/// - default to H5O_INFO_BASIC +///\param lapl - IN: Link access property list +///\par Description +/// Valid values of \a fields are as follows: +/// \li \c H5O_INFO_BASIC (default) +/// \li \c H5O_INFO_TIME +/// \li \c H5O_INFO_NUM_ATTRS +/// \li \c H5O_INFO_HDR +/// \li \c H5O_INFO_META_SIZE +/// \li \c H5O_INFO_ALL +// July, 2018 +//-------------------------------------------------------------------------- +void H5Location::getObjinfo(const char* grp_name, H5_index_t idx_type, + H5_iter_order_t order, hsize_t idx, H5O_info_t& objinfo, unsigned fields, + const LinkAccPropList& lapl) const +{ + // Use C API to get information of the object + herr_t ret_value = H5Oget_info_by_idx2(getId(), grp_name, idx_type, order, + idx, &objinfo, fields, lapl.getId()); + + // Throw exception if C API returns failure + if (ret_value < 0) + throwException(inMemFunc("getObjinfo"), "H5Oget_info_by_idx2 failed"); +} + +//-------------------------------------------------------------------------- +// Function: H5Location::getObjinfo +///\brief This is an overloaded member function, provided for convenience. +/// It differs from the above function in that it takes +/// a reference to an \c H5std_string for \a name. +///\param name - IN: Name of the object to be queried - \c H5std_string +///\param objinfo - OUT: Struct containing the object info +///\param fields - IN: Indicates a group of information to be retrieved +/// - default to H5O_INFO_BASIC +///\param lapl - IN: Link access property list +// July, 2018 +//-------------------------------------------------------------------------- +void H5Location::getObjinfo(const H5std_string& grp_name, H5_index_t idx_type, + H5_iter_order_t order, hsize_t idx, H5O_info_t& objinfo, unsigned fields, + const LinkAccPropList& lapl) const +{ + getObjinfo(grp_name.c_str(), idx_type, order, idx, objinfo, fields, lapl); } #ifndef H5_NO_DEPRECATED_SYMBOLS @@ -1467,6 +1563,7 @@ void H5Location::getObjinfo(const H5std_string& name, H5G_stat_t& statbuf) const { getObjinfo(name.c_str(), statbuf); } + #endif /* H5_NO_DEPRECATED_SYMBOLS */ //-------------------------------------------------------------------------- diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h index 19c49ea..0b41493 100644 --- a/c++/src/H5Location.h +++ b/c++/src/H5Location.h @@ -141,6 +141,27 @@ class H5_DLLCPP H5Location : public IdComponent { unsigned childObjVersion(const char* objname) const; unsigned childObjVersion(const H5std_string& objname) const; + // Retrieves information about an HDF5 object. + void getObjinfo(H5O_info_t& objinfo, unsigned fields = H5O_INFO_BASIC) const; + + // Retrieves information about an HDF5 object, given its name. + void getObjinfo(const char* name, H5O_info_t& objinfo, + unsigned fields = H5O_INFO_BASIC, + const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; + void getObjinfo(const H5std_string& name, H5O_info_t& objinfo, + unsigned fields = H5O_INFO_BASIC, + const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; + + // Retrieves information about an HDF5 object, given its index. + void getObjinfo(const char* grp_name, H5_index_t idx_type, + H5_iter_order_t order, hsize_t idx, H5O_info_t& objinfo, + unsigned fields = H5O_INFO_BASIC, + const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; + void getObjinfo(const H5std_string& grp_name, H5_index_t idx_type, + H5_iter_order_t order, hsize_t idx, H5O_info_t& objinfo, + unsigned fields = H5O_INFO_BASIC, + const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; + #ifndef H5_NO_DEPRECATED_SYMBOLS // Returns the type of an object in this group, given the // object's index. @@ -149,7 +170,7 @@ class H5_DLLCPP H5Location : public IdComponent { H5G_obj_t getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const; // Returns information about an HDF5 object, given by its name, - // at this location. + // at this location. - Deprecated dues to performance issues void getObjinfo(const char* name, hbool_t follow_link, H5G_stat_t& statbuf) const; void getObjinfo(const H5std_string& name, hbool_t follow_link, H5G_stat_t& statbuf) const; void getObjinfo(const char* name, H5G_stat_t& statbuf) const; diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index a33acb3..b95e222 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -227,130 +227,6 @@ int H5Object::iterateAttrs(attr_operator_t user_op, unsigned *_idx, void *op_dat } //-------------------------------------------------------------------------- -// Function: H5Object::getInfo -///\brief Retrieves information about an HDF5 object. -///\param objinfo - OUT: Struct containing the object info -///\param fields - IN: Indicates the group of information to be retrieved -///\par Description -/// Valid values of \a fields are as follows: -/// \li \c H5O_INFO_BASIC (default) -/// \li \c H5O_INFO_TIME -/// \li \c H5O_INFO_NUM_ATTRS -/// \li \c H5O_INFO_HDR -/// \li \c H5O_INFO_META_SIZE -/// \li \c H5O_INFO_ALL -// July, 2018 -//-------------------------------------------------------------------------- -void H5Object::getInfo(H5O_info_t& objinfo, unsigned fields) const -{ - - // Use C API to get information of the object - herr_t ret_value = H5Oget_info2(getId(), &objinfo, fields); - - // Throw exception if C API returns failure - if (ret_value < 0) - throwException(inMemFunc("getInfo"), "H5Oget_info2 failed"); -} - -//-------------------------------------------------------------------------- -// Function: H5Object::getInfo -///\brief Retrieves information about an HDF5 object given its name. -///\param name - IN: Name of the object to be queried - \c char * -///\param objinfo - OUT: Struct containing the object info -///\param fields - IN: Indicates the group of information to be retrieved -/// - default to H5O_INFO_BASIC -///\param lapl - IN: Link access property list -///\par Description -/// Valid values of \a fields are as follows: -/// \li \c H5O_INFO_BASIC (default) -/// \li \c H5O_INFO_TIME -/// \li \c H5O_INFO_NUM_ATTRS -/// \li \c H5O_INFO_HDR -/// \li \c H5O_INFO_META_SIZE -/// \li \c H5O_INFO_ALL -// July, 2018 -//-------------------------------------------------------------------------- -void H5Object::getInfo(const char* name, H5O_info_t& objinfo, unsigned fields, const LinkAccPropList& lapl) const -{ - // Use C API to get information of the object - herr_t ret_value = H5Oget_info_by_name2(getId(), name, &objinfo, fields, lapl.getId()); - - // Throw exception if C API returns failure - if (ret_value < 0) - throwException(inMemFunc("getInfo"), "H5Oget_info_by_name2 failed"); -} - -//-------------------------------------------------------------------------- -// Function: H5Object::getInfo -///\brief This is an overloaded member function, provided for convenience. -/// It differs from the above function in that it takes -/// a reference to an \c H5std_string for \a name. -///\param name - IN: Name of the object to be queried - \c H5std_string -///\param objinfo - OUT: Struct containing the object info -///\param fields - IN: Indicates the group of information to be retrieved -/// - default to H5O_INFO_BASIC -///\param lapl - IN: Link access property list -// July, 2018 -//-------------------------------------------------------------------------- -void H5Object::getInfo(const H5std_string& name, H5O_info_t& objinfo, unsigned fields, const LinkAccPropList& lapl) const -{ - getInfo(name.c_str(), objinfo, fields, lapl); -} - -//-------------------------------------------------------------------------- -// Function: H5Object::getInfo -///\brief Retrieves information about an HDF5 object given its index. -///\param grp_name - IN: Group name where the object belongs - \c char * -///\param idx_type - IN: Type of index -///\param order - IN: Order to traverse -///\param idx - IN: Object position -///\param objinfo - OUT: Struct containing the object info -///\param fields - IN: Indicates the group of information to be retrieved -/// - default to H5O_INFO_BASIC -///\param lapl - IN: Link access property list -///\par Description -/// Valid values of \a fields are as follows: -/// \li \c H5O_INFO_BASIC (default) -/// \li \c H5O_INFO_TIME -/// \li \c H5O_INFO_NUM_ATTRS -/// \li \c H5O_INFO_HDR -/// \li \c H5O_INFO_META_SIZE -/// \li \c H5O_INFO_ALL -// July, 2018 -//-------------------------------------------------------------------------- -void H5Object::getInfo(const char* grp_name, H5_index_t idx_type, - H5_iter_order_t order, hsize_t idx, H5O_info_t& objinfo, unsigned fields, - const LinkAccPropList& lapl) const -{ - // Use C API to get information of the object - herr_t ret_value = H5Oget_info_by_idx2(getId(), grp_name, idx_type, order, - idx, &objinfo, fields, lapl.getId()); - - // Throw exception if C API returns failure - if (ret_value < 0) - throwException(inMemFunc("getInfo"), "H5Oget_info_by_idx2 failed"); -} - -//-------------------------------------------------------------------------- -// Function: H5Object::getInfo -///\brief This is an overloaded member function, provided for convenience. -/// It differs from the above function in that it takes -/// a reference to an \c H5std_string for \a name. -///\param name - IN: Name of the object to be queried - \c H5std_string -///\param objinfo - OUT: Struct containing the object info -///\param fields - IN: Indicates a group of information to be retrieved -/// - default to H5O_INFO_BASIC -///\param lapl - IN: Link access property list -// July, 2018 -//-------------------------------------------------------------------------- -void H5Object::getInfo(const H5std_string& grp_name, H5_index_t idx_type, - H5_iter_order_t order, hsize_t idx, H5O_info_t& objinfo, unsigned fields, - const LinkAccPropList& lapl) const -{ - getInfo(grp_name.c_str(), idx_type, order, idx, objinfo, fields, lapl); -} - -//-------------------------------------------------------------------------- // Function: H5Object::objVersion ///\brief Returns the header version of this HDF5 object. ///\return Object version, which can have the following values: diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h index 268fe58..10b3865 100644 --- a/c++/src/H5Object.h +++ b/c++/src/H5Object.h @@ -92,26 +92,6 @@ class H5_DLLCPP H5Object : public H5Location { // Returns an identifier. virtual hid_t getId() const = 0; - // Returns information about an HDF5 object. - void getInfo(H5O_info_t& objinfo, unsigned fields = H5O_INFO_BASIC) const; - // Returns information about an HDF5 object, given its name. - void getInfo(const char* name, H5O_info_t& objinfo, - unsigned fields = H5O_INFO_BASIC, - const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; - void getInfo(const H5std_string& name, H5O_info_t& objinfo, - unsigned fields = H5O_INFO_BASIC, - const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; - - // Retrieves information about an HDF5 object, given its index. - void getInfo(const char* grp_name, H5_index_t idx_type, - H5_iter_order_t order, hsize_t idx, H5O_info_t& objinfo, - unsigned fields = H5O_INFO_BASIC, - const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; - void getInfo(const H5std_string& grp_name, H5_index_t idx_type, - H5_iter_order_t order, hsize_t idx, H5O_info_t& objinfo, - unsigned fields = H5O_INFO_BASIC, - const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; - // Gets the name of this HDF5 object, i.e., Group, DataSet, or // DataType. ssize_t getObjName(char *obj_name, size_t buf_size = 0) const; diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index e86052b..a3a055d 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -1116,9 +1116,9 @@ static herr_t test_types(H5File& file) /*------------------------------------------------------------------------- - * Function: test_getinfo + * Function: test_getObjinfo * - * Purpose Tests getInfo() + * Purpose Tests getObjinfo() * * Return Success: 0 * @@ -1145,16 +1145,16 @@ static herr_t test_getinfo(H5File& file) // Get dataset header info H5O_info_t oinfo; HDmemset(&oinfo, 0, sizeof(oinfo)); - dataset.getInfo(oinfo, H5O_INFO_HDR); - verify_val(oinfo.hdr.nchunks, 1, "DataSet::getInfo", __LINE__, __FILE__); + dataset.getObjinfo(oinfo, H5O_INFO_HDR); + verify_val(oinfo.hdr.nchunks, 1, "DataSet::getObjinfo", __LINE__, __FILE__); dataset.close(); // Open the dataset we created above and then close it. This is one // way to open an existing dataset for accessing. dataset = file.openDataSet(DSET_DEFAULT_NAME); HDmemset(&oinfo, 0, sizeof(oinfo)); - dataset.getInfo(oinfo, H5O_INFO_ALL); - verify_val(oinfo.hdr.nchunks, 1, "DataSet::getInfo", __LINE__, __FILE__); + dataset.getObjinfo(oinfo, H5O_INFO_ALL); + verify_val(oinfo.hdr.nchunks, 1, "DataSet::getObjinfo", __LINE__, __FILE__); dataset.close(); PASSED(); diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp index 94c811a..bdf6d80 100644 --- a/c++/test/tattr.cpp +++ b/c++/test/tattr.cpp @@ -521,8 +521,8 @@ static void test_attr_basic_read() // Verify the correct number of attributes another way H5O_info_t oinfo; HDmemset(&oinfo, 0, sizeof(oinfo)); - dataset.getInfo(oinfo, H5O_INFO_NUM_ATTRS); - verify_val(oinfo.num_attrs, 3, "DataSet::getInfo", __LINE__, __FILE__); + dataset.getObjinfo(oinfo, H5O_INFO_NUM_ATTRS); + verify_val(oinfo.num_attrs, 3, "DataSet::getObjinfo", __LINE__, __FILE__); // Open an attribute for the dataset Attribute ds_attr=dataset.openAttribute(ATTR1_NAME); @@ -548,8 +548,8 @@ static void test_attr_basic_read() // Verify the correct number of attributes another way HDmemset(&oinfo, 0, sizeof(oinfo)); - group.getInfo(oinfo, H5O_INFO_NUM_ATTRS); - verify_val(oinfo.num_attrs, 1, "Group::getInfo", __LINE__, __FILE__); + group.getObjinfo(oinfo, H5O_INFO_NUM_ATTRS); + verify_val(oinfo.num_attrs, 1, "Group::getObjinfo", __LINE__, __FILE__); // Open an attribute for the group Attribute gr_attr = group.openAttribute(ATTR2_NAME); @@ -672,8 +672,8 @@ static void test_attr_compound_read() // Verify the correct number of attributes another way H5O_info_t oinfo; HDmemset(&oinfo, 0, sizeof(oinfo)); - dataset.getInfo(oinfo, H5O_INFO_NUM_ATTRS); - verify_val(oinfo.num_attrs, 1, "DataSet::getInfo", __LINE__, __FILE__); + dataset.getObjinfo(oinfo, H5O_INFO_NUM_ATTRS); + verify_val(oinfo.num_attrs, 1, "DataSet::getObjinfo", __LINE__, __FILE__); // Open 1st attribute for the dataset Attribute attr = dataset.openAttribute((unsigned)0); diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index dd32364..a2bf1c2 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -660,8 +660,8 @@ static void test_libver_bounds_real( // Verify object header version another way H5O_info_t oinfo; HDmemset(&oinfo, 0, sizeof(oinfo)); - file.getInfo(oinfo, H5O_INFO_HDR); - verify_val(oinfo.hdr.version, oh_vers_create, "H5File::getInfo", __LINE__, __FILE__); + file.getObjinfo(oinfo, H5O_INFO_HDR); + verify_val(oinfo.hdr.version, oh_vers_create, "H5File::getObjinfo", __LINE__, __FILE__); /* * Reopen the file and make sure the root group still has the correct @@ -687,8 +687,8 @@ static void test_libver_bounds_real( // Verify object header version another way HDmemset(&oinfo, 0, sizeof(oinfo)); - group.getInfo(oinfo, H5O_INFO_HDR); - verify_val(oinfo.hdr.version, oh_vers_mod, "Group::getInfo", __LINE__, __FILE__); + group.getObjinfo(oinfo, H5O_INFO_HDR); + verify_val(oinfo.hdr.version, oh_vers_mod, "Group::getObjinfo", __LINE__, __FILE__); group.close(); // close "/G1" diff --git a/c++/test/tobject.cpp b/c++/test/tobject.cpp index bfc13a0..537716f 100644 --- a/c++/test/tobject.cpp +++ b/c++/test/tobject.cpp @@ -545,7 +545,7 @@ static void test_getobjectinfo_same_file() H5O_info_t oinfo1, oinfo2; /* Object info structs */ // Output message about test being performed - SUBTEST("Group::getInfo"); + SUBTEST("Group::getObjinfo"); try { // Create a new HDF5 file @@ -561,9 +561,9 @@ static void test_getobjectinfo_same_file() // Query the info of two groups and verify that they have the same // file number - grp1.getInfo(oinfo1); - grp2.getInfo(oinfo2); - verify_val(oinfo1.fileno, oinfo2.fileno, "file number from getInfo", __LINE__, __FILE__); + grp1.getObjinfo(oinfo1); + grp2.getObjinfo(oinfo2); + verify_val(oinfo1.fileno, oinfo2.fileno, "file number from getObjinfo", __LINE__, __FILE__); // Close groups and file grp1.close(); @@ -584,17 +584,17 @@ static void test_getobjectinfo_same_file() // Query the info of two groups and verify that they have the same // file number - grp1.getInfo(oinfo1); - grp2.getInfo(oinfo2); - verify_val(oinfo1.fileno, oinfo2.fileno, "file number from getInfo", __LINE__, __FILE__); + grp1.getObjinfo(oinfo1); + grp2.getObjinfo(oinfo2); + verify_val(oinfo1.fileno, oinfo2.fileno, "file number from getObjinfo", __LINE__, __FILE__); // Reset object info HDmemset(&oinfo1, 0, sizeof(oinfo1)); HDmemset(&oinfo2, 0, sizeof(oinfo2)); - file1.getInfo(GROUP1NAME, oinfo1); - file1.getInfo(GROUP2NAME, oinfo2); + file1.getObjinfo(GROUP1NAME, oinfo1); + file1.getObjinfo(GROUP2NAME, oinfo2); verify_val(oinfo1.fileno, oinfo2.fileno, "file number from getObjectInfo", __LINE__, __FILE__); // Close groups and files diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp index fa214df..562b127 100644 --- a/c++/test/trefer.cpp +++ b/c++/test/trefer.cpp @@ -481,19 +481,19 @@ static void test_reference_group() fname = group.getFileName(); verify_val(fname, FILE1, "H5Group::getFileName",__LINE__,__FILE__); - // Check object type using Group::getInfo() + // Check object type using Group::getObjinfo() H5O_info_t oinfo; HDmemset(&oinfo, 0, sizeof(oinfo)); - group.getInfo(".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)0, oinfo); - verify_val(oinfo.type, H5O_TYPE_DATASET, "Group::getInfo",__LINE__,__FILE__); + group.getObjinfo(".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)0, oinfo); + verify_val(oinfo.type, H5O_TYPE_DATASET, "Group::getObjinfo",__LINE__,__FILE__); // Check for out of bound query by index try { HDmemset(&oinfo, 0, sizeof(oinfo)); - group.getInfo(".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)9, oinfo); + group.getObjinfo(".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)9, oinfo); // Should FAIL but didn't, so throw an invalid action exception - throw InvalidActionException("Group::getInfo", "Out of bound index."); + throw InvalidActionException("Group::getObjinfo", "Out of bound index."); } catch (Exception& err) {} // do nothing, failure expected // Unlink one of the objects in the dereferenced group, and re-check diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp index 6d585bd..0de66d7 100644 --- a/c++/test/ttypes.cpp +++ b/c++/test/ttypes.cpp @@ -1097,13 +1097,12 @@ static void test_operators() verify_val(flttyp == member_inttyp, false, "DataType::operator==", __LINE__, __FILE__); verify_val(flttyp != member_inttyp, true, "DataType::operator==", __LINE__, __FILE__); - // Get the NATIVE_LONG member from the compound datatype above - IntType member_longtyp = cmptyp.getMemberIntType(2); + // Get the NATIVE_FLOAT member from the compound datatype above + IntType member_flttyp = cmptyp.getMemberIntType(1); // Test various combinations - verify_val(inttyp == member_longtyp, false, "DataType::operator==", __LINE__, __FILE__); - verify_val(flttyp == member_longtyp, false, "DataType::operator==", __LINE__, __FILE__); - verify_val(flttyp != member_longtyp, true, "DataType::operator==", __LINE__, __FILE__); + verify_val(inttyp == member_flttyp, false, "DataType::operator==", __LINE__, __FILE__); + verify_val(flttyp != member_flttyp, false, "DataType::operator==", __LINE__, __FILE__); PASSED(); } -- cgit v0.12 From 09913e2f8e0264dd6f312689d530d0bb5d3c431e Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Sun, 22 Jul 2018 15:22:34 -0500 Subject: Added class DSetAccPropList Description: - Added class DSetAccPropList for the dataset access property list. - Added wrapper for H5Dget_access_plist to class DataSet // Gets the access property list of this dataset. DSetAccPropList getAccessPlist() const; - Added wrappers for H5Pset_chunk_cache and H5Pget_chunk_cache to class DSetAccPropList // Sets the raw data chunk cache parameters. void setChunkCache(size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0) // Retrieves the raw data chunk cache parameters. void getChunkCache(size_t &rdcc_nslots, size_t &rdcc_nbytes, double &rdcc_w0) - Added two more arguments to H5Location::createDataSet: const DSetAccPropList& dapl = DSetAccPropList::DEFAULT const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT - Added one more argument to H5Location::openDataSet: const DSetAccPropList& dapl = DSetAccPropList::DEFAULT Platforms tested: Linux/64 (jelly) Linux/32 (jam) Darwin (osx1010test) --- MANIFEST | 2 + c++/src/CMakeLists.txt | 2 + c++/src/H5AbstractDs.cpp | 1 + c++/src/H5ArrayType.cpp | 1 + c++/src/H5AtomType.cpp | 1 + c++/src/H5Attribute.cpp | 1 + c++/src/H5CommonFG.cpp | 1 + c++/src/H5CompType.cpp | 1 + c++/src/H5Cpp.h | 1 + c++/src/H5DaccProp.cpp | 162 +++++++++++++++++++++++++++++++++++++++++++++++ c++/src/H5DaccProp.h | 68 ++++++++++++++++++++ c++/src/H5DataSet.cpp | 22 +++++++ c++/src/H5DataSet.h | 3 + c++/src/H5DataType.cpp | 1 + c++/src/H5DcreatProp.cpp | 1 + c++/src/H5EnumType.cpp | 1 + c++/src/H5FaccProp.cpp | 10 +++ c++/src/H5File.cpp | 1 + c++/src/H5FloatType.cpp | 1 + c++/src/H5Group.cpp | 1 + c++/src/H5IntType.cpp | 1 + c++/src/H5Library.cpp | 5 ++ c++/src/H5Location.cpp | 54 +++++++++++----- c++/src/H5Location.h | 15 +++-- c++/src/H5Object.cpp | 1 + c++/src/H5PredType.cpp | 23 +++++-- c++/src/H5StrType.cpp | 1 + c++/src/H5VarLenType.cpp | 1 + c++/src/Makefile.am | 22 ++++--- c++/test/dsets.cpp | 115 ++++++++++++++++++++++++++++++++- 30 files changed, 481 insertions(+), 39 deletions(-) create mode 100644 c++/src/H5DaccProp.cpp create mode 100644 c++/src/H5DaccProp.h diff --git a/MANIFEST b/MANIFEST index 02c9928..24b5933 100644 --- a/MANIFEST +++ b/MANIFEST @@ -351,6 +351,8 @@ ./c++/src/H5DataSpace.h ./c++/src/H5DataType.cpp ./c++/src/H5DataType.h +./c++/src/H5DaccProp.cpp +./c++/src/H5DaccProp.h ./c++/src/H5DcreatProp.cpp ./c++/src/H5DcreatProp.h ./c++/src/H5DxferProp.cpp diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 27b71b0..945b352 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -21,6 +21,7 @@ set (CPP_SOURCES ${HDF5_CPP_SRC_SOURCE_DIR}/H5DataSet.cpp ${HDF5_CPP_SRC_SOURCE_DIR}/H5DataSpace.cpp ${HDF5_CPP_SRC_SOURCE_DIR}/H5DataType.cpp + ${HDF5_CPP_SRC_SOURCE_DIR}/H5DaccProp.cpp ${HDF5_CPP_SRC_SOURCE_DIR}/H5DcreatProp.cpp ${HDF5_CPP_SRC_SOURCE_DIR}/H5DxferProp.cpp ${HDF5_CPP_SRC_SOURCE_DIR}/H5EnumType.cpp @@ -58,6 +59,7 @@ set (CPP_HDRS ${HDF5_CPP_SRC_SOURCE_DIR}/H5DataSet.h ${HDF5_CPP_SRC_SOURCE_DIR}/H5DataSpace.h ${HDF5_CPP_SRC_SOURCE_DIR}/H5DataType.h + ${HDF5_CPP_SRC_SOURCE_DIR}/H5DaccProp.h ${HDF5_CPP_SRC_SOURCE_DIR}/H5DcreatProp.h ${HDF5_CPP_SRC_SOURCE_DIR}/H5DxferProp.h ${HDF5_CPP_SRC_SOURCE_DIR}/H5EnumType.h diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp index 823e873..d59a3cb 100644 --- a/c++/src/H5AbstractDs.cpp +++ b/c++/src/H5AbstractDs.cpp @@ -24,6 +24,7 @@ #include "H5DxferProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5DataSpace.h" diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp index 836c837..8ecb6da 100644 --- a/c++/src/H5ArrayType.cpp +++ b/c++/src/H5ArrayType.cpp @@ -21,6 +21,7 @@ #include "H5DcreatProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" diff --git a/c++/src/H5AtomType.cpp b/c++/src/H5AtomType.cpp index a9f6f36..9408452 100644 --- a/c++/src/H5AtomType.cpp +++ b/c++/src/H5AtomType.cpp @@ -21,6 +21,7 @@ #include "H5DcreatProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp index ccba623..33f992a 100644 --- a/c++/src/H5Attribute.cpp +++ b/c++/src/H5Attribute.cpp @@ -29,6 +29,7 @@ #include "H5DcreatProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5AbstractDs.h" diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp index 979816b..6c5fdca 100644 --- a/c++/src/H5CommonFG.cpp +++ b/c++/src/H5CommonFG.cpp @@ -24,6 +24,7 @@ #include "H5DcreatProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5Alltypes.h" diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp index 8252d76..ae22f18 100644 --- a/c++/src/H5CompType.cpp +++ b/c++/src/H5CompType.cpp @@ -22,6 +22,7 @@ #include "H5DxferProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5Alltypes.h" diff --git a/c++/src/H5Cpp.h b/c++/src/H5Cpp.h index b9da80a..01fae45 100644 --- a/c++/src/H5Cpp.h +++ b/c++/src/H5Cpp.h @@ -27,6 +27,7 @@ #include "H5DxferProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5AbstractDs.h" diff --git a/c++/src/H5DaccProp.cpp b/c++/src/H5DaccProp.cpp new file mode 100644 index 0000000..c6ff705 --- /dev/null +++ b/c++/src/H5DaccProp.cpp @@ -0,0 +1,162 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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 "H5Include.h" +#include "H5Exception.h" +#include "H5IdComponent.h" +#include "H5DataSpace.h" +#include "H5PropList.h" +#include "H5LaccProp.h" +#include "H5DaccProp.h" + +namespace H5 { + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +// This DOXYGEN_SHOULD_SKIP_THIS block is a work-around approach to control +// the order of creation and deletion of the global constants. See Design Notes +// in "H5PredType.cpp" for information. + +// Initialize a pointer for the constant +DSetAccPropList* DSetAccPropList::DEFAULT_ = 0; + +//-------------------------------------------------------------------------- +// Function: DSetAccPropList::getConstant +// Purpose: Creates a DSetAccPropList object representing the HDF5 +// constant H5P_DATASET_ACCESS, pointed to by +// DSetAccPropList::DEFAULT_ +// exception H5::PropListIException +// Description +// If DSetAccPropList::DEFAULT_ already points to an allocated +// object, throw a PropListIException. This scenario should +// not happen. +// Programmer Binh-Minh Ribler - 2015 +//-------------------------------------------------------------------------- +DSetAccPropList* DSetAccPropList::getConstant() +{ + // Tell the C library not to clean up, H5Library::termH5cpp will call + // H5close - more dependency if use H5Library::dontAtExit() + if (!IdComponent::H5dontAtexit_called) + { + (void) H5dont_atexit(); + IdComponent::H5dontAtexit_called = true; + } + + // If the constant pointer is not allocated, allocate it. Otherwise, + // throw because it shouldn't be. + if (DEFAULT_ == 0) + DEFAULT_ = new DSetAccPropList(H5P_DATASET_ACCESS); + else + throw PropListIException("DSetAccPropList::getConstant", "DSetAccPropList::getConstant is being invoked on an allocated DEFAULT_"); + return(DEFAULT_); +} + +//-------------------------------------------------------------------------- +// Function: DSetAccPropList::deleteConstants +// Purpose: Deletes the constant object that DSetAccPropList::DEFAULT_ +// points to. +// Programmer Binh-Minh Ribler - 2015 +//-------------------------------------------------------------------------- +void DSetAccPropList::deleteConstants() +{ + if (DEFAULT_ != 0) + delete DEFAULT_; +} + +//-------------------------------------------------------------------------- +// Purpose Constant for dataset creation default property +//-------------------------------------------------------------------------- +const DSetAccPropList& DSetAccPropList::DEFAULT = *getConstant(); + +#endif // DOXYGEN_SHOULD_SKIP_THIS + +//-------------------------------------------------------------------------- +// Function: DSetAccPropList default constructor +///\brief Default constructor: creates a stub dataset creation property list +// Programmer Binh-Minh Ribler - 2000 +//-------------------------------------------------------------------------- +DSetAccPropList::DSetAccPropList() : LinkAccPropList(H5P_DATASET_ACCESS) {} + +//-------------------------------------------------------------------------- +// Function: DSetAccPropList copy constructor +///\brief Copy constructor: same HDF5 object as \a original +/// DSetAccPropList object +// Programmer Binh-Minh Ribler - 2000 +//-------------------------------------------------------------------------- +DSetAccPropList::DSetAccPropList(const DSetAccPropList& orig) : LinkAccPropList(orig) {} + +//-------------------------------------------------------------------------- +// Function: DSetAccPropList overloaded constructor +///\brief Creates a DSetAccPropList object using the id of an +/// existing dataset creation property list. +// Programmer Binh-Minh Ribler - 2000 +//-------------------------------------------------------------------------- +DSetAccPropList::DSetAccPropList(const hid_t plist_id) : LinkAccPropList(plist_id) {} + +//-------------------------------------------------------------------------- +// Function: DSetAccPropList::setChunkCache +///\brief Sets the raw data chunk cache parameters. +///\param rdcc_nslots - IN: Number of chunk slots in the raw data chunk cache +///\param rdcc_nbytes - IN: Total size of the raw data chunk cache +///\param rdcc_w0 - IN: The chunk preemption policy for this dataset +///\exception H5::PropListIException +///\par Description +/// The raw data chunk cache parameters includes the number of +/// objects in the meta data cache and the maximum number of +/// chunks and bytes in the raw data chunk cache. Once set, +/// these values will override the values in the file access +/// property list. +/// +/// For information, please refer to the H5Pset_chunk_cache API in +/// the HDF5 C Reference Manual. +// July 2018 +//-------------------------------------------------------------------------- +void DSetAccPropList::setChunkCache(size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0) const +{ + herr_t ret_value = H5Pset_chunk_cache(id, rdcc_nslots, rdcc_nbytes, rdcc_w0); + if (ret_value < 0) + { + throw PropListIException("DSetAccPropList::setChunkCache", "H5Pset_chunk_cache failed"); + } +} + +//-------------------------------------------------------------------------- +// Function: DSetAccPropList::getChunkCache +///\brief Retrieves the raw data chunk cache parameters. +///\param rdcc_nslots - OUT: Number of chunk slots in the raw data chunk cache +///\param rdcc_nbytes - OUT: Total size of the raw data chunk cache +///\param rdcc_w0 - OUT: The chunk preemption policy for this dataset +///\exception H5::PropListIException +///\par Description +/// For information, please refer to the H5Pget_chunk_cache API in +/// the HDF5 C Reference Manual. +// July 2018 +//-------------------------------------------------------------------------- +void DSetAccPropList::getChunkCache(size_t &rdcc_nslots, size_t &rdcc_nbytes, double &rdcc_w0) const +{ + herr_t ret_value = H5Pget_chunk_cache(id, &rdcc_nslots, &rdcc_nbytes, &rdcc_w0); + if (ret_value < 0) + { + throw PropListIException("DSetAccPropList::getChunkCache", "H5Pget_chunk_cache failed"); + } +} + +//-------------------------------------------------------------------------- +// Function: DSetAccPropList destructor +///\brief Noop destructor. +// Programmer Binh-Minh Ribler - 2000 +//-------------------------------------------------------------------------- +DSetAccPropList::~DSetAccPropList() {} + +} // end namespace diff --git a/c++/src/H5DaccProp.h b/c++/src/H5DaccProp.h new file mode 100644 index 0000000..111b4f5 --- /dev/null +++ b/c++/src/H5DaccProp.h @@ -0,0 +1,68 @@ +// C++ informative line for the emacs editor: -*- C++ -*- +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef __H5DSetAccPropList_H +#define __H5DSetAccPropList_H + +namespace H5 { + +/*! \class DSetAccPropList + \brief Class DSetAccPropList inherits from LinkAccPropList and provides + wrappers for the HDF5 dataset access property functions. +*/ +// Inheritance: LinkAccPropList -> PropList -> IdComponent +class H5_DLLCPP DSetAccPropList : public LinkAccPropList { + public: + ///\brief Default dataset creation property list. + static const DSetAccPropList& DEFAULT; + + // Creates a dataset creation property list. + DSetAccPropList(); + + // Sets the raw data chunk cache parameters. + void setChunkCache(size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0) const; + + // Retrieves the raw data chunk cache parameters. + void getChunkCache(size_t &rdcc_nslots, size_t &rdcc_nbytes, double &rdcc_w0) const; + + ///\brief Returns this class name. + virtual H5std_string fromClass () const { return("DSetAccPropList"); } + + // Copy constructor - same as the original DSetAccPropList. + DSetAccPropList(const DSetAccPropList& orig); + + // Creates a copy of an existing dataset creation property list + // using the property list id. + DSetAccPropList(const hid_t plist_id); + + // Noop destructor. + virtual ~DSetAccPropList(); + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + + // Deletes the global constant, should only be used by the library + static void deleteConstants(); + + private: + static DSetAccPropList* DEFAULT_; + + // Creates the global constant, should only be used by the library + static DSetAccPropList* getConstant(); + +#endif // DOXYGEN_SHOULD_SKIP_THIS + +}; // end of DSetAccPropList +} // namespace H5 + +#endif // __H5DSetAccPropList_H diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp index fbddd8d..db14577 100644 --- a/c++/src/H5DataSet.cpp +++ b/c++/src/H5DataSet.cpp @@ -30,6 +30,7 @@ #include "H5DcreatProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" @@ -172,6 +173,27 @@ DSetCreatPropList DataSet::getCreatePlist() const } //-------------------------------------------------------------------------- +// Function: DataSet::getAccessPlist +///\brief Gets the dataset access property list. +///\return DSetAccPropList instance +///\exception H5::DataSetIException +// July 2018 +//-------------------------------------------------------------------------- +DSetAccPropList DataSet::getAccessPlist() const +{ + hid_t access_plist_id = H5Dget_access_plist(id); + if (access_plist_id < 0) + { + throw DataSetIException("DataSet::getAccessPlist", "H5Dget_access_plist failed"); + } + + // create and return the DSetCreatPropList object + DSetAccPropList access_plist; + f_PropList_setId(&access_plist, access_plist_id); + return(access_plist); +} + +//-------------------------------------------------------------------------- // Function: DataSet::getStorageSize ///\brief Returns the amount of storage required for a dataset. ///\return Size of the storage or 0, for no data diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h index 104ccea..a0a962e 100644 --- a/c++/src/H5DataSet.h +++ b/c++/src/H5DataSet.h @@ -45,6 +45,9 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs { // Gets the creation property list of this dataset. DSetCreatPropList getCreatePlist() const; + // Gets the access property list of this dataset. + DSetAccPropList getAccessPlist() const; + // Returns the address of this dataset in the file. haddr_t getOffset() const; diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp index 28933dd..bb27d47 100644 --- a/c++/src/H5DataType.cpp +++ b/c++/src/H5DataType.cpp @@ -30,6 +30,7 @@ #include "H5DxferProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index c704f85..bb899d7 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -22,6 +22,7 @@ #include "H5DcreatProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp index 00b726c..9a4ccf1 100644 --- a/c++/src/H5EnumType.cpp +++ b/c++/src/H5EnumType.cpp @@ -24,6 +24,7 @@ #include "H5DataSpace.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5AbstractDs.h" diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp index 286f6e7..1657351 100644 --- a/c++/src/H5FaccProp.cpp +++ b/c++/src/H5FaccProp.cpp @@ -11,8 +11,18 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +#ifdef OLD_HEADER_FILENAME +#include +#else +#include +#endif #include +using std::cerr; +using std::endl; + +//#include + #include "H5Include.h" #include "H5Exception.h" #include "H5IdComponent.h" diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp index f5246f9..07d7e84 100644 --- a/c++/src/H5File.cpp +++ b/c++/src/H5File.cpp @@ -29,6 +29,7 @@ #include "H5DcreatProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5CommonFG.h" diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp index 0a2c107..5fb1cb7 100644 --- a/c++/src/H5FloatType.cpp +++ b/c++/src/H5FloatType.cpp @@ -22,6 +22,7 @@ #include "H5DxferProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp index 25e67d3..0c2c4e8 100644 --- a/c++/src/H5Group.cpp +++ b/c++/src/H5Group.cpp @@ -29,6 +29,7 @@ #include "H5DxferProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5AbstractDs.h" diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp index dd9d042..8e19d1e 100644 --- a/c++/src/H5IntType.cpp +++ b/c++/src/H5IntType.cpp @@ -22,6 +22,7 @@ #include "H5DxferProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp index 2cbdfba..fb22296 100644 --- a/c++/src/H5Library.cpp +++ b/c++/src/H5Library.cpp @@ -26,6 +26,7 @@ #include "H5DcreatProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" @@ -184,6 +185,10 @@ void H5Library::initH5cpp() if (ret_value != 0) throw LibraryIException("H5Library::initH5cpp", "Registrating PropList::deleteConstants failed"); + ret_value = std::atexit(DSetAccPropList::deleteConstants); + if (ret_value != 0) + throw LibraryIException("H5Library::initH5cpp", "Registrating DSetAccPropList::deleteConstants failed"); + ret_value = std::atexit(LinkAccPropList::deleteConstants); if (ret_value != 0) throw LibraryIException("H5Library::initH5cpp", "Registrating LinkAccPropList::deleteConstants failed"); diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp index dd82a54..2c49016 100644 --- a/c++/src/H5Location.cpp +++ b/c++/src/H5Location.cpp @@ -28,6 +28,7 @@ using namespace std; #include "H5DxferProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" @@ -903,23 +904,32 @@ Group H5Location::openGroup(const H5std_string& name) const //-------------------------------------------------------------------------- // Function: H5Location::createDataSet ///\brief Creates a new dataset at this location. -///\param name - IN: Name of the dataset to create -///\param data_type - IN: Datatype of the dataset +///\param name - IN: Name of the dataset to create +///\param data_type - IN: Datatype of the dataset ///\param data_space - IN: Dataspace for the dataset -///\param create_plist - IN: Creation properly list for the dataset +///\param dcpl - IN: Dataset creation properly list +///\param lcpl - IN: Link creation properly list +///\param dapl - IN: Dataset access properly list ///\return DataSet instance ///\exception H5::FileIException/H5::GroupIException/H5::LocationException -// Programmer Binh-Minh Ribler - 2000 +// 2000 +// Modification: +// Jul 2018 +// Added LinkCreatPropList and DSetAccPropList but did not +// follow the order in the C function: lcpl, dcpl, dapl, to +// accommodate the existing createDataSet calls. //-------------------------------------------------------------------------- -DataSet H5Location::createDataSet(const char* name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist) const +DataSet H5Location::createDataSet(const char* name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& dcpl, const DSetAccPropList& dapl, const LinkCreatPropList& lcpl) const { // Obtain identifiers for C API hid_t type_id = data_type.getId(); hid_t space_id = data_space.getId(); - hid_t create_plist_id = create_plist.getId(); + hid_t dcpl_id = dcpl.getId(); + hid_t lcpl_id = lcpl.getId(); + hid_t dapl_id = dapl.getId(); // Call C routine H5Dcreate2 to create the named dataset - hid_t dataset_id = H5Dcreate2(getId(), name, type_id, space_id, H5P_DEFAULT, create_plist_id, H5P_DEFAULT); + hid_t dataset_id = H5Dcreate2(getId(), name, type_id, space_id, lcpl_id, dcpl_id, dapl_id); // If the creation of the dataset failed, throw an exception if (dataset_id < 0) @@ -936,11 +946,16 @@ DataSet H5Location::createDataSet(const char* name, const DataType& data_type, c ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 +// 2000 +// Modification: +// Jul 2018 +// Added LinkCreatPropList and DSetAccPropList but did not +// follow the order in the C function: lcpl, dcpl, dapl, to +// accommodate the existing createDataSet calls. //-------------------------------------------------------------------------- -DataSet H5Location::createDataSet(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist) const +DataSet H5Location::createDataSet(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& dcpl, const DSetAccPropList& dapl, const LinkCreatPropList& lcpl) const { - return(createDataSet(name.c_str(), data_type, data_space, create_plist)); + return(createDataSet(name.c_str(), data_type, data_space, dcpl, dapl, lcpl)); } //-------------------------------------------------------------------------- @@ -949,13 +964,17 @@ DataSet H5Location::createDataSet(const H5std_string& name, const DataType& data ///\param name - IN: Name of the dataset to open ///\return DataSet instance ///\exception H5::FileIException/H5::GroupIException/H5::LocationException -// Programmer Binh-Minh Ribler - 2000 +// 2000 +// Modification: +// Jul 2018 +// Added DSetAccPropList argument //-------------------------------------------------------------------------- -DataSet H5Location::openDataSet(const char* name) const +DataSet H5Location::openDataSet(const char* name, const DSetAccPropList& dapl) const { // Call C function H5Dopen2 to open the specified dataset, giving // the location id and the dataset's name - hid_t dataset_id = H5Dopen2(getId(), name, H5P_DEFAULT); + hid_t dapl_id = dapl.getId(); + hid_t dataset_id = H5Dopen2(getId(), name, dapl_id); // If the dataset's opening failed, throw an exception if(dataset_id < 0) @@ -972,11 +991,14 @@ DataSet H5Location::openDataSet(const char* name) const ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function in that it takes an /// \c H5std_string for \a name. -// Programmer Binh-Minh Ribler - 2000 +// 2000 +// Modification: +// Jul 2018 +// Added DSetAccPropList argument //-------------------------------------------------------------------------- -DataSet H5Location::openDataSet(const H5std_string& name) const +DataSet H5Location::openDataSet(const H5std_string& name, const DSetAccPropList& dapl) const { - return(openDataSet( name.c_str())); + return(openDataSet(name.c_str(), dapl)); } //-------------------------------------------------------------------------- diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h index 0b41493..b698081 100644 --- a/c++/src/H5Location.h +++ b/c++/src/H5Location.h @@ -105,13 +105,18 @@ class H5_DLLCPP H5Location : public IdComponent { Group openGroup(const char* name) const; Group openGroup(const H5std_string& name) const; - // Creates a new dataset in this group. - DataSet createDataSet(const char* name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const; - DataSet createDataSet(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const; + // Creates a new dataset in this location. + DataSet createDataSet(const char* name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT, const DSetAccPropList& dapl = DSetAccPropList::DEFAULT, const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT) const; + DataSet createDataSet(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT, const DSetAccPropList& dapl = DSetAccPropList::DEFAULT, const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT) const; + + // Deprecated to add LinkCreatPropList and DSetAccPropList - 1.10.3 + // DataSet createDataSet(const char* name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const; + // DataSet createDataSet(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const; // Opens an existing dataset at this location. - DataSet openDataSet(const char* name) const; - DataSet openDataSet(const H5std_string& name) const; + // DSetAccPropList is added - 1.10.3 + DataSet openDataSet(const char* name, const DSetAccPropList& dapl = DSetAccPropList::DEFAULT) const; + DataSet openDataSet(const H5std_string& name, const DSetAccPropList& dapl = DSetAccPropList::DEFAULT) const; H5L_info_t getLinkInfo(const char* link_name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; H5L_info_t getLinkInfo(const H5std_string& link_name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index b95e222..1c22efe 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -25,6 +25,7 @@ #include "H5DxferProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp index 3f153e5..57ba5e5 100644 --- a/c++/src/H5PredType.cpp +++ b/c++/src/H5PredType.cpp @@ -21,6 +21,7 @@ #include "H5DcreatProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" @@ -914,10 +915,14 @@ September 2015: + PredType + DataSpace + PropList (and its subclasses below) - + FileAccPropList - + FileCreatPropList + DSetMemXferPropList + DSetCreatPropList + + DSetAccPropList + + FileAccPropList + + FileCreatPropList + + LinkAccPropList + + LinkCreatPropList + + ObjCreatPropList The new method includes these main points: @@ -1042,18 +1047,24 @@ September 2015: 4. This section shows the differences between the old and new methods for allocating the following constants - PropList constant, PropList::DEFAULT. + - DSetAccPropList constant, DSetAccPropList::DEFAULT. - DSetCreatPropList constant, DSetCreatPropList::DEFAULT. - DSetMemXferPropList constant, DSetMemXferPropList::DEFAULT. - FileCreatPropList constant, FileCreatPropList::DEFAULT. - FileAccPropList constant, FileAccPropList::DEFAULT. + - LinkAccPropList constant, LinkAccPropList::DEFAULT. + - LinkCreatPropList constant, LinkCreatPropList::DEFAULT. + - ObjCreatPropList constant, ObjCreatPropList::DEFAULT. For these constants, the library has the same changes, except the class names and the HDF5 corresponding constants. Only the items of PropList are listed, and "PropList" can be replaced by any of - DSetCreatPropList, DSetMemXferPropList, FileCreatPropList, - FileAccPropList for those classes. The HDF5 C constant "H5P_DEFAULT" - can be replaced by any of these respectively: H5P_DATASET_CREATE, - H5P_DATASET_XFER, H5P_FILE_CREATE, and H5P_FILE_ACCESS. + DSetAccPropList, DSetCreatPropList, DSetMemXferPropList, + FileCreatPropList, FileAccPropList, LinkAccPropList, LinkCreatPropList, + ObjCreatPropList for those classes. The HDF5 C constant "H5P_DEFAULT" + can be replaced by any of these respectively: H5P_DATASET_ACCESS, + H5P_DATASET_CREATE, H5P_DATASET_XFER, H5P_FILE_CREATE, H5P_FILE_ACCESS, + H5P_LINK_ACCESS, H5P_LINK_CREATE, and H5P_OBJECT_CREATE. Old Method: ---------- diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp index a067d6c..0cf2a4e 100644 --- a/c++/src/H5StrType.cpp +++ b/c++/src/H5StrType.cpp @@ -22,6 +22,7 @@ #include "H5DxferProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp index e70d42f..18cd831 100644 --- a/c++/src/H5VarLenType.cpp +++ b/c++/src/H5VarLenType.cpp @@ -21,6 +21,7 @@ #include "H5DcreatProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" diff --git a/c++/src/Makefile.am b/c++/src/Makefile.am index c02a9e7..ca42211 100644 --- a/c++/src/Makefile.am +++ b/c++/src/Makefile.am @@ -34,21 +34,23 @@ bin_SCRIPTS=h5c++ libhdf5_cpp_la_SOURCES=H5Exception.cpp H5IdComponent.cpp \ H5DataSpace.cpp H5PropList.cpp H5Library.cpp \ H5FaccProp.cpp H5FcreatProp.cpp H5LcreatProp.cpp \ - H5LaccProp.cpp H5DxferProp.cpp H5DcreatProp.cpp \ - H5Location.cpp H5AbstractDs.cpp H5Attribute.cpp \ - H5Object.cpp H5OcreatProp.cpp H5DataType.cpp \ - H5AtomType.cpp H5PredType.cpp H5EnumType.cpp \ - H5IntType.cpp H5FloatType.cpp H5StrType.cpp \ - H5ArrayType.cpp H5VarLenType.cpp H5CompType.cpp \ - H5DataSet.cpp H5CommonFG.cpp H5Group.cpp H5File.cpp + H5LaccProp.cpp H5DaccProp.cpp H5DxferProp.cpp \ + H5DcreatProp.cpp H5Location.cpp H5AbstractDs.cpp \ + H5Attribute.cpp H5Object.cpp H5OcreatProp.cpp \ + H5DataType.cpp H5AtomType.cpp H5PredType.cpp \ + H5EnumType.cpp H5IntType.cpp H5FloatType.cpp \ + H5StrType.cpp H5ArrayType.cpp H5VarLenType.cpp \ + H5CompType.cpp H5DataSet.cpp H5CommonFG.cpp H5Group.cpp \ + H5File.cpp # HDF5 C++ library depends on HDF5 Library. libhdf5_cpp_la_LIBADD=$(LIBHDF5) # Public headers -include_HEADERS=H5Cpp.h H5AbstractDs.h H5AtomType.h H5Attribute.h \ - H5Classes.h H5CommonFG.h H5CompType.h H5DataSet.h \ - H5DataSpace.h H5DataType.h H5OcreatProp.h H5DcreatProp.h\ +include_HEADERS=H5Cpp.h H5AbstractDs.h H5AtomType.h \ + H5Attribute.h H5Classes.h H5CommonFG.h H5CompType.h \ + H5DataSet.h H5DataSpace.h H5DataType.h H5OcreatProp.h \ + H5DaccProp.h H5DcreatProp.h H5DxferProp.h H5EnumType.h H5Exception.h H5FaccProp.h \ H5FcreatProp.h H5File.h H5FloatType.h H5Group.h \ H5IdComponent.h H5Include.h H5IntType.h H5LcreatProp.h \ diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index a3a055d..14f1bd4 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -1121,7 +1121,6 @@ static herr_t test_types(H5File& file) * Purpose Tests getObjinfo() * * Return Success: 0 - * * Failure: -1 * * July, 2018 @@ -1177,13 +1176,124 @@ static herr_t test_getinfo(H5File& file) /*------------------------------------------------------------------------- + * Function: test_chunk_cache + * + * Purpose Tests setting rdcc info on a DAPL, and interaction + * with the corresponding properties in the file structure. + * + * Return Success: 0 + * Failure: number of errors + * + * July 2018 + *------------------------------------------------------------------------- + */ +const int RANK1 = 1; +const H5std_string FILE_ACCPLIST("test_accplist.h5"); + +static herr_t test_chunk_cache(FileAccPropList fapl) +{ + SUBTEST("DSetAccPropList::set/getChunkCache"); + + try { + // Create a default dataset access and file access property lists + FileAccPropList fapl_def; + DSetAccPropList dapl; + + // Verify that chunk cache parameters are the same + int mdc_nelmts = 0; + size_t nslots_1 = 0, nslots_4 = 0, nbytes_1 = 0, nbytes_4 = 0; + double w0_1 = 0.0F, w0_4 = 0.0F; + fapl_def.getCache(mdc_nelmts, nslots_1, nbytes_1, w0_1); + dapl.getChunkCache(nslots_4, nbytes_4, w0_4); + verify_val(nslots_1, nslots_4, "DSetAccPropList::getChunkCache", __LINE__, __FILE__); + verify_val(nbytes_1, nbytes_4, "DSetAccPropList::getChunkCache", __LINE__, __FILE__); + verify_val(w0_1, w0_4, "DSetAccPropList::getChunkCache", __LINE__, __FILE__); + + // Set a link access property on dapl to verify property list inheritance + dapl.setNumLinks((size_t)134); + size_t nlinks = dapl.getNumLinks(); + verify_val(nlinks, (size_t)134, "DSetAccPropList::getNumLinks", __LINE__, __FILE__); + + // Make a copy of the external fapl + FileAccPropList fapl_local(fapl); + + // Set new rdcc settings on fapl local + size_t nslots_2 = nslots_1 * 2; + size_t nbytes_2 = nbytes_1 * 2; + double w0_2 = w0_1 / (double)2.0F; + fapl_local.getCache(mdc_nelmts, nslots_2, nbytes_2, w0_2); + + // Create a new file using default fcpl and the passed-in fapl + H5File file(FILE_ACCPLIST, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl_local); + + // Create dataset creation property list + DSetCreatPropList dcpl; + + // Set chunk dimensions + hsize_t cdims[RANK1]; + cdims[0] = 10; + dcpl.setChunk(RANK1, cdims); + + // Create memory space + hsize_t mdims[RANK1]; + mdims[0] = 10; + DataSpace mspace(RANK1, mdims); + + // Create a dataset using that dataset creation properties + DataSet dataset(file.createDataSet(DSET_CHUNKED_NAME, PredType::NATIVE_INT, mspace, dcpl, dapl)); + + // Get the dataset access property list + DSetAccPropList dapl2 = dataset.getAccessPlist(); + + // Retrieve and verify the raw data chunk cache parameters + nslots_4 = nbytes_4 = 0; + w0_4 = 0.0F; + dapl2.getChunkCache(nslots_4, nbytes_4, w0_4); + verify_val(nslots_2, nslots_4, "DSetCreatPropList::getChunkCache", __LINE__, __FILE__); + verify_val(nbytes_2, nbytes_4, "DSetCreatPropList::getChunkCache", __LINE__, __FILE__); + verify_val(H5_DBL_ABS_EQUAL(w0_2, w0_4), 1, "DSetCreatPropList::getChunkCache", __LINE__, __FILE__); + + + // Set new values on original dapl + size_t nslots_3 = nslots_1 * 2; + size_t nbytes_3 = H5D_CHUNK_CACHE_NBYTES_DEFAULT; + double w0_3 = w0_2 / 2; + dapl.getChunkCache(nslots_3, nbytes_3, w0_3); + + // Close dataset + dataset.close(); + + // Reopen dataset + DataSet dataset2(file.openDataSet(DSET_CHUNKED_NAME, dapl)); + + // Get the dataset access property list + DSetAccPropList dapl3 = dataset2.getAccessPlist(); + + // Retrieve and verify the raw data chunk cache parameters + dapl3.getChunkCache(nslots_4, nbytes_4, w0_4); + verify_val(nslots_3, nslots_4, "DSetCreatPropList::getLayout", __LINE__, __FILE__); + verify_val(nbytes_3, nbytes_4, "DSetCreatPropList::getLayout", __LINE__, __FILE__); + verify_val(H5_DBL_ABS_EQUAL(w0_3, w0_4), 1, "DSetCreatPropList::getLayout", __LINE__, __FILE__); + + + PASSED(); + return 0; + } // end top try block + + catch (Exception& E) + { + return -1; + } +} // test_chunk_cache + + +/*------------------------------------------------------------------------- * Function: test_virtual * * Purpose Tests fixed, unlimited, and printf selections in the same * VDS * * Return Success: 0 - * * Failure: number of errors * * Programmer Binh-Minh Ribler @@ -1305,6 +1415,7 @@ void test_dset() nerrors += test_multiopen (file) < 0 ? 1:0; nerrors += test_types(file) < 0 ? 1:0; nerrors += test_virtual() < 0 ? 1:0; + nerrors += test_chunk_cache(fapl) < 0 ? 1:0; // Close group "emit diagnostics". grp.close(); -- cgit v0.12 From 55a35a8273d74e03efa651cdfd6987703f46d0f3 Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Mon, 23 Jul 2018 09:12:30 -0500 Subject: Updated for C2Cppfunction_map.htm --- MANIFEST | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST b/MANIFEST index 24b5933..0c5f03d 100644 --- a/MANIFEST +++ b/MANIFEST @@ -398,7 +398,7 @@ ./c++/src/H5VarLenType.h ./c++/src/Makefile.am ./c++/src/RM_stylesheet.css -./c++/src/C2Cppfunction_map.mht +./c++/src/C2Cppfunction_map.htm ./c++/src/cpp_doc_config ./c++/src/h5c++.in ./c++/src/footer.html -- cgit v0.12 From f80cb3f866a7b6958590c7ffd01ca048fc29c4e2 Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Mon, 23 Jul 2018 10:57:21 -0500 Subject: Entered entries for HDFFV-10150, HDFFV-10458, HDFFV-1047 --- release_docs/RELEASE.txt | 63 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 1976ed6..80be0ab 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -69,7 +69,53 @@ New Features C++ Library: ------------ - - + - New wrappers + + Added the following items: + + + Class DSetAccPropList for the dataset access property list. + + + Wrapper for H5Dget_access_plist to class DataSet + // Gets the access property list of this dataset. + DSetAccPropList getAccessPlist() const; + + + Wrappers for H5Pset_chunk_cache and H5Pget_chunk_cache to class DSetAccPropList + // Sets the raw data chunk cache parameters. + void setChunkCache(size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0) + + // Retrieves the raw data chunk cache parameters. + void getChunkCache(size_t &rdcc_nslots, size_t &rdcc_nbytes, double &rdcc_w0) + + + New operator!= to class DataType (HDFFV-10472) + // Determines whether two datatypes are not the same. + bool operator!=(const DataType& compared_type) + + + Wrappers for H5Oget_info2, H5Oget_info_by_name2, and H5Oget_info_by_idx2 + (HDFFV-10458) + + // Retrieves information about an HDF5 object. + void getObjinfo(H5O_info_t& objinfo, unsigned fields = H5O_INFO_BASIC) const; + + // Retrieves information about an HDF5 object, given its name. + void getObjinfo(const char* name, H5O_info_t& objinfo, + unsigned fields = H5O_INFO_BASIC, + const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; + void getObjinfo(const H5std_string& name, H5O_info_t& objinfo, + unsigned fields = H5O_INFO_BASIC, + const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; + + // Retrieves information about an HDF5 object, given its index. + void getObjinfo(const char* grp_name, H5_index_t idx_type, + H5_iter_order_t order, hsize_t idx, H5O_info_t& objinfo, + unsigned fields = H5O_INFO_BASIC, + const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; + void getObjinfo(const H5std_string& grp_name, H5_index_t idx_type, + H5_iter_order_t order, hsize_t idx, H5O_info_t& objinfo, + unsigned fields = H5O_INFO_BASIC, + const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; + + (BMR - 2018/07/22, HDFFV-10150, HDFFV-10458, HDFFV-1047) + Java Library: ---------------- @@ -230,7 +276,20 @@ Bug Fixes since HDF5-1.10.2 release C++ APIs -------- - - + - Adding default arguments to existing functions + + Added the following items: + + Two more property list arguments are added to H5Location::createDataSet: + const DSetAccPropList& dapl = DSetAccPropList::DEFAULT + const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT + + + One more property list argument is added to H5Location::openDataSet: + const DSetAccPropList& dapl = DSetAccPropList::DEFAULT + + - Improvement C++ documentation + + Replaced the table in main page of the C++ documentation from mht to htm format + for portability. Testing ------- -- cgit v0.12 From 3c6a39858fef9e7207cd7c3e3057267ec380be0b Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Mon, 23 Jul 2018 11:18:43 -0500 Subject: Fixed typos --- c++/src/H5Library.cpp | 24 ++++++++++++------------ c++/src/H5Location.h | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp index fb22296..fde5599 100644 --- a/c++/src/H5Library.cpp +++ b/c++/src/H5Library.cpp @@ -175,51 +175,51 @@ void H5Library::initH5cpp() int ret_value = 0; ret_value = std::atexit(termH5cpp); if (ret_value != 0) - throw LibraryIException("H5Library::initH5cpp", "Registrating termH5cpp failed"); + throw LibraryIException("H5Library::initH5cpp", "Registering termH5cpp failed"); ret_value = std::atexit(PredType::deleteConstants); if (ret_value != 0) - throw LibraryIException("H5Library::initH5cpp", "Registrating PredType::deleteConstants failed"); + throw LibraryIException("H5Library::initH5cpp", "Registering PredType::deleteConstants failed"); ret_value = std::atexit(PropList::deleteConstants); if (ret_value != 0) - throw LibraryIException("H5Library::initH5cpp", "Registrating PropList::deleteConstants failed"); + throw LibraryIException("H5Library::initH5cpp", "Registering PropList::deleteConstants failed"); ret_value = std::atexit(DSetAccPropList::deleteConstants); if (ret_value != 0) - throw LibraryIException("H5Library::initH5cpp", "Registrating DSetAccPropList::deleteConstants failed"); + throw LibraryIException("H5Library::initH5cpp", "Registering DSetAccPropList::deleteConstants failed"); ret_value = std::atexit(LinkAccPropList::deleteConstants); if (ret_value != 0) - throw LibraryIException("H5Library::initH5cpp", "Registrating LinkAccPropList::deleteConstants failed"); + throw LibraryIException("H5Library::initH5cpp", "Registering LinkAccPropList::deleteConstants failed"); ret_value = std::atexit(LinkCreatPropList::deleteConstants); if (ret_value != 0) - throw LibraryIException("H5Library::initH5cpp", "Registrating LinkCreatPropList::deleteConstants failed"); + throw LibraryIException("H5Library::initH5cpp", "Registering LinkCreatPropList::deleteConstants failed"); ret_value = std::atexit(FileAccPropList::deleteConstants); if (ret_value != 0) - throw LibraryIException("H5Library::initH5cpp", "Registrating FileAccPropList::deleteConstants failed"); + throw LibraryIException("H5Library::initH5cpp", "Registering FileAccPropList::deleteConstants failed"); ret_value = std::atexit(FileCreatPropList::deleteConstants); if (ret_value != 0) - throw LibraryIException("H5Library::initH5cpp", "Registrating FileCreatPropList::deleteConstants failed"); + throw LibraryIException("H5Library::initH5cpp", "Registering FileCreatPropList::deleteConstants failed"); ret_value = std::atexit(DSetMemXferPropList::deleteConstants); if (ret_value != 0) - throw LibraryIException("H5Library::initH5cpp", "Registrating DSetMemXferPropList::deleteConstants failed"); + throw LibraryIException("H5Library::initH5cpp", "Registering DSetMemXferPropList::deleteConstants failed"); ret_value = std::atexit(DSetCreatPropList::deleteConstants); if (ret_value != 0) - throw LibraryIException("H5Library::initH5cpp", "Registrating DSetCreatPropList::deleteConstants failed"); + throw LibraryIException("H5Library::initH5cpp", "Registering DSetCreatPropList::deleteConstants failed"); ret_value = std::atexit(ObjCreatPropList::deleteConstants); if (ret_value != 0) - throw LibraryIException("H5Library::initH5cpp", "Registrating ObjCreatPropList::deleteConstants failed"); + throw LibraryIException("H5Library::initH5cpp", "Registering ObjCreatPropList::deleteConstants failed"); ret_value = std::atexit(DataSpace::deleteConstants); if (ret_value != 0) - throw LibraryIException("H5Library::initH5cpp", "Registrating DataSpace::deleteConstants failed"); + throw LibraryIException("H5Library::initH5cpp", "Registering DataSpace::deleteConstants failed"); } //-------------------------------------------------------------------------- diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h index b698081..dc3db75 100644 --- a/c++/src/H5Location.h +++ b/c++/src/H5Location.h @@ -175,7 +175,7 @@ class H5_DLLCPP H5Location : public IdComponent { H5G_obj_t getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const; // Returns information about an HDF5 object, given by its name, - // at this location. - Deprecated dues to performance issues + // at this location. - Deprecated void getObjinfo(const char* name, hbool_t follow_link, H5G_stat_t& statbuf) const; void getObjinfo(const H5std_string& name, hbool_t follow_link, H5G_stat_t& statbuf) const; void getObjinfo(const char* name, H5G_stat_t& statbuf) const; -- cgit v0.12 From 9838a1a08f946417d6d361b8b2c86307288cc50d Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 24 Jul 2018 08:36:37 -0500 Subject: Add missing '\' in the middle of the public headers list in Makefile.am. --- c++/src/Makefile.am | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/c++/src/Makefile.am b/c++/src/Makefile.am index ca42211..949325a 100644 --- a/c++/src/Makefile.am +++ b/c++/src/Makefile.am @@ -49,11 +49,11 @@ libhdf5_cpp_la_LIBADD=$(LIBHDF5) # Public headers include_HEADERS=H5Cpp.h H5AbstractDs.h H5AtomType.h \ H5Attribute.h H5Classes.h H5CommonFG.h H5CompType.h \ - H5DataSet.h H5DataSpace.h H5DataType.h H5OcreatProp.h \ - H5DaccProp.h H5DcreatProp.h - H5DxferProp.h H5EnumType.h H5Exception.h H5FaccProp.h \ + H5DataSet.h H5DataSpace.h H5DataType.h H5OcreatProp.h \ + H5DaccProp.h H5DcreatProp.h \ + H5DxferProp.h H5EnumType.h H5Exception.h H5FaccProp.h \ H5FcreatProp.h H5File.h H5FloatType.h H5Group.h \ - H5IdComponent.h H5Include.h H5IntType.h H5LcreatProp.h \ + H5IdComponent.h H5Include.h H5IntType.h H5LcreatProp.h \ H5LaccProp.h H5Library.h H5Location.h H5Object.h \ H5PredType.h H5PropList.h H5StrType.h H5CppDoc.h \ H5ArrayType.h H5VarLenType.h -- cgit v0.12 From f5551a9602c0b07569cb4eabe1cc98474f158d1a Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Tue, 24 Jul 2018 08:39:16 -0500 Subject: Fixed missing backslash --- c++/src/Makefile.am | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/c++/src/Makefile.am b/c++/src/Makefile.am index ca42211..5dcca4f 100644 --- a/c++/src/Makefile.am +++ b/c++/src/Makefile.am @@ -50,13 +50,12 @@ libhdf5_cpp_la_LIBADD=$(LIBHDF5) include_HEADERS=H5Cpp.h H5AbstractDs.h H5AtomType.h \ H5Attribute.h H5Classes.h H5CommonFG.h H5CompType.h \ H5DataSet.h H5DataSpace.h H5DataType.h H5OcreatProp.h \ - H5DaccProp.h H5DcreatProp.h - H5DxferProp.h H5EnumType.h H5Exception.h H5FaccProp.h \ - H5FcreatProp.h H5File.h H5FloatType.h H5Group.h \ - H5IdComponent.h H5Include.h H5IntType.h H5LcreatProp.h \ - H5LaccProp.h H5Library.h H5Location.h H5Object.h \ - H5PredType.h H5PropList.h H5StrType.h H5CppDoc.h \ - H5ArrayType.h H5VarLenType.h + H5DaccProp.h H5DcreatProp.h H5DxferProp.h H5EnumType.h \ + H5Exception.h H5FaccProp.h H5FcreatProp.h H5File.h \ + H5FloatType.h H5Group.h H5IdComponent.h H5Include.h \ + H5IntType.h H5LcreatProp.h H5LaccProp.h H5Library.h \ + H5Location.h H5Object.h H5PredType.h H5PropList.h \ + H5StrType.h H5CppDoc.h H5ArrayType.h H5VarLenType.h # h5c++ and libhdf5.settings are generated during configure. Remove only when # distclean. -- cgit v0.12 From b14c8bdb1c5c80ba189b26f82636cde9d20986c3 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 24 Jul 2018 11:59:58 -0500 Subject: Add test file with unwritten datasets --- MANIFEST | 2 + tools/test/h5dump/CMakeTests.cmake | 7 + tools/test/h5dump/h5dumpgentest.c | 93 ++++++++++- tools/testfiles/tintsnodata.ddl | 329 +++++++++++++++++++++++++++++++++++++ tools/testfiles/tintsnodata.h5 | Bin 0 -> 4080 bytes 5 files changed, 427 insertions(+), 4 deletions(-) create mode 100644 tools/testfiles/tintsnodata.ddl create mode 100644 tools/testfiles/tintsnodata.h5 diff --git a/MANIFEST b/MANIFEST index 0c5f03d..1165240 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1797,6 +1797,8 @@ ./tools/testfiles/tints4dims.h5 ./tools/testfiles/tintsattrs.ddl ./tools/testfiles/tintsattrs.h5 +./tools/testfiles/tintsnodata.ddl +./tools/testfiles/tintsnodata.h5 ./tools/testfiles/tlarge_objname.ddl ./tools/testfiles/tlarge_objname.h5 ./tools/testfiles/tldouble.h5 diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index 132fc2b..c2ae0a6 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -125,6 +125,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tints4dimsCountEq.ddl ${HDF5_TOOLS_DIR}/testfiles/tints4dimsStride2.ddl ${HDF5_TOOLS_DIR}/testfiles/tintsattrs.ddl + ${HDF5_TOOLS_DIR}/testfiles/tintsnodata.ddl ${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.ddl #${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl ${HDF5_TOOLS_DIR}/testfiles/tlonglinks.ddl @@ -280,6 +281,7 @@ ${HDF5_TOOLS_DIR}/testfiles/thyperslab.h5 ${HDF5_TOOLS_DIR}/testfiles/tints4dims.h5 ${HDF5_TOOLS_DIR}/testfiles/tintsattrs.h5 + ${HDF5_TOOLS_DIR}/testfiles/tintsnodata.h5 ${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.h5 #${HDF5_TOOLS_DIR}/testfiles/tldouble.h5 ${HDF5_TOOLS_DIR}/testfiles/tlonglinks.h5 @@ -998,6 +1000,8 @@ tints4dimsStride2.out.err tintsattrs.out tintsattrs.out.err + tintsnodata.out + tintsnodata.out.err tlarge_objname.out tlarge_objname.out.err tldouble.out @@ -1168,6 +1172,9 @@ # test for maximum display datasets ADD_H5_TEST (twidedisplay 0 --enable-error-stack -w0 packedbits.h5) + # test for unwritten datasets + ADD_H5_TEST (tintsnodata 0 --enable-error-stack tintsnodata.h5) + # test for signed/unsigned datasets ADD_H5_TEST (packedbits 0 --enable-error-stack packedbits.h5) # test for compound signed/unsigned datasets diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 9e9f6f1..4ef63e5 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -114,6 +114,7 @@ #define FILE84 "tudfilter.h5" #define FILE85 "tgrpnullspace.h5" #define FILE86 "err_attr_dspace.h5" +#define FILE87 "tintsnodata.h5" /*------------------------------------------------------------------------- * prototypes @@ -293,7 +294,7 @@ typedef struct s1_t { #define THRESHOLD10 10 /* Free-space section threshold */ #define FSPACE_PAGE_SIZE 8192 /* File space page size */ -/* "FILE66" macros and for FILE69 */ +/* "FILE66" macros and for FILE69, FILE87 */ #define F66_XDIM 8 #define F66_DATASETU08 "DU08BITS" #define F66_DATASETS08 "DS08BITS" @@ -7526,6 +7527,89 @@ gent_attr_intsize(void) H5Gclose(root); H5Fclose(fid); } +static void +gent_nodata(void) +{ + hid_t fid, dataset, space; + hsize_t dims[2]; + uint8_t dsetu8[F66_XDIM][F66_YDIM8], valu8bits; + uint16_t dsetu16[F66_XDIM][F66_YDIM16], valu16bits; + uint32_t dsetu32[F66_XDIM][F66_YDIM32], valu32bits; + uint64_t dsetu64[F66_XDIM][F66_YDIM64], valu64bits; + int8_t dset8[F66_XDIM][F66_YDIM8], val8bits; + int16_t dset16[F66_XDIM][F66_YDIM16], val16bits; + int32_t dset32[F66_XDIM][F66_YDIM32], val32bits; + int64_t dset64[F66_XDIM][F66_YDIM64], val64bits; + double dsetdbl[F66_XDIM][F66_YDIM8]; + unsigned int i, j; + + fid = H5Fcreate(FILE87, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* Dataset of 8 bits unsigned int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM8; + space = H5Screate_simple(2, dims, NULL); + dataset = H5Dcreate2(fid, F66_DATASETU08, H5T_STD_U8LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 16 bits unsigned int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM16; + space = H5Screate_simple(2, dims, NULL); + dataset = H5Dcreate2(fid, F66_DATASETU16, H5T_STD_U16LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 32 bits unsigned int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM32; + space = H5Screate_simple(2, dims, NULL); + dataset = H5Dcreate2(fid, F66_DATASETU32, H5T_STD_U32LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 64 bits unsigned int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM64; + space = H5Screate_simple(2, dims, NULL); + dataset = H5Dcreate2(fid, F66_DATASETU64, H5T_STD_U64LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 8 bits signed int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM8; + space = H5Screate_simple(2, dims, NULL); + dataset = H5Dcreate2(fid, F66_DATASETS08, H5T_STD_I8LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 16 bits signed int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM16; + space = H5Screate_simple(2, dims, NULL); + dataset = H5Dcreate2(fid, F66_DATASETS16, H5T_STD_I16LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 32 bits signed int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM32; + space = H5Screate_simple(2, dims, NULL); + dataset = H5Dcreate2(fid, F66_DATASETS32, H5T_STD_I32LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 64 bits signed int */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM64; + space = H5Screate_simple(2, dims, NULL); + dataset = H5Dcreate2(fid, F66_DATASETS64, H5T_STD_I64LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Sclose(space); + H5Dclose(dataset); + + /* Double Dummy set for failure tests */ + dims[0] = F66_XDIM; dims[1] = F66_YDIM8; + space = H5Screate_simple(2, dims, NULL); + dataset = H5Dcreate2(fid, F66_DUMMYDBL, H5T_IEEE_F64BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Sclose(space); + H5Dclose(dataset); + H5Fclose(fid); +} + /*------------------------------------------------------------------------- * Function: gent_charsets @@ -10484,12 +10568,12 @@ static void gent_null_space_group(void) * Then write an illegal version to the shared dataspace message * to trigger the error. * This is to verify HDFFV-10333 that h5dump will exit - * gracefully when encountered error similar to + * gracefully when encountered error similar to * H5O_attr_decode in the jira issue. * *------------------------------------------------------------------------- */ -static void +static void gent_err_attr_dspace() { hid_t fid = -1; /* File identifier */ @@ -10535,7 +10619,7 @@ gent_err_attr_dspace() if(H5Fclose(fid) < 0) goto error; - /* This section of code will write an illegal version to the "version" field + /* This section of code will write an illegal version to the "version" field of the shared dataspace message */ if((fd = HDopen(FILE86, O_RDWR, 0633)) < 0) goto error; @@ -10647,6 +10731,7 @@ int main(void) gent_intattrscalars(); gent_intsattrs(); gent_bitnopaquefields(); + gent_nodata(); gent_intsfourdims(); gent_null_space_group(); diff --git a/tools/testfiles/tintsnodata.ddl b/tools/testfiles/tintsnodata.ddl new file mode 100644 index 0000000..c20f337 --- /dev/null +++ b/tools/testfiles/tintsnodata.ddl @@ -0,0 +1,329 @@ +HDF5 "tintsnodata.h5" { +GROUP "/" { + DATASET "DS08BITS" { + DATATYPE H5T_STD_I8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + 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 { + (0,0): 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + } + DATASET "DS16BITS" { + DATATYPE H5T_STD_I16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + 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 { + (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + } + DATASET "DS32BITS" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + 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 { + (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + } + DATASET "DS64BITS" { + DATATYPE H5T_STD_I64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + 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 { + (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,63): 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,63): 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,63): 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,63): 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,63): 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,63): 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,63): 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,63): 0 + } + } + DATASET "DU08BITS" { + DATATYPE H5T_STD_U8LE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + 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 { + (0,0): 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + } + DATASET "DU16BITS" { + DATATYPE H5T_STD_U16LE + DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) } + 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 { + (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + } + DATASET "DU32BITS" { + DATATYPE H5T_STD_U32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + 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 { + (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + } + DATASET "DU64BITS" { + DATATYPE H5T_STD_U64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + 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 { + (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (0,63): 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,63): 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (2,63): 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (3,63): 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (4,63): 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (5,63): 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (6,63): 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (7,63): 0 + } + } + DATASET "DummyDBL" { + DATATYPE H5T_IEEE_F64BE + DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) } + 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 { + (0,0): 0, 0, 0, 0, 0, 0, 0, 0, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 0, 0, 0, 0, 0, 0, 0, + (4,0): 0, 0, 0, 0, 0, 0, 0, 0, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0, + (6,0): 0, 0, 0, 0, 0, 0, 0, 0, + (7,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + } +} +} diff --git a/tools/testfiles/tintsnodata.h5 b/tools/testfiles/tintsnodata.h5 new file mode 100644 index 0000000..741da09 Binary files /dev/null and b/tools/testfiles/tintsnodata.h5 differ -- cgit v0.12 From 14c060bbebfe8d43c95c547724c94d477864efd5 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 24 Jul 2018 14:15:32 -0500 Subject: Add missing test option --- tools/test/h5dump/CMakeTests.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index c2ae0a6..24588e9 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -1173,7 +1173,7 @@ ADD_H5_TEST (twidedisplay 0 --enable-error-stack -w0 packedbits.h5) # test for unwritten datasets - ADD_H5_TEST (tintsnodata 0 --enable-error-stack tintsnodata.h5) + ADD_H5_TEST (tintsnodata 0 --enable-error-stack -p tintsnodata.h5) # test for signed/unsigned datasets ADD_H5_TEST (packedbits 0 --enable-error-stack packedbits.h5) -- cgit v0.12 From 076ae17a5dac6d3af75f705dc888895b8c9cc98a Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 24 Jul 2018 14:47:07 -0500 Subject: Update bine/release to create batch scripts and build-unix-sh, and to put files in a subdirectory. --- bin/release | 71 +++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/bin/release b/bin/release index 040711a..e51a054 100755 --- a/bin/release +++ b/bin/release @@ -188,45 +188,47 @@ tar2zip() # Returns 0 if successful; 1 otherwise # # need function to create another temporary directory, extract the - # $tmpdir/$HDF5_VERS.tar into it, add (create) build-unix.sh, - # CTestScript.cmake, HDF5config.cmake, SZIP.tar.gz and ZLib.tar.gz, - # and then tar.gz it. + # $tmpdir/$HDF5_VERS.tar into it, create build-VS*.bat files, + # add CTestScript.cmake, HDF5config.cmake, SZIP.tar.gz + # and ZLib.tar.gz, and then zip it. tar2cmakezip() { if [ $# -ne 3 ]; then - echo "usage: tar2cmakezip " + echo "usage: tar2cmakezip " return 1 fi cmziptmpdir=/tmp/cmziptmpdir$$ - mkdir -p $cmziptmpdir + cmziptmpsubdir=$cmziptmpdir/CMake-$HDF5_VERS + mkdir -p $cmziptmpsubdir version=$1 tarfile=$2 zipfile=$3 # step 1: untar tarball in cmgztmpdir - (cd $cmziptmpdir; tar xf -) < $tarfile + (cd $cmziptmpsubdir; tar xf -) < $tarfile # sanity check - if [ ! -d $cmziptmpdir/$version ]; then - echo "untar did not create $cmziptmpdir/$version source dir" + if [ ! -d $cmziptmpsubdir/$version ]; then + echo "untar did not create $cmziptmpsubdir/$version source dir" # cleanup rm -rf $cmziptmpdir 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 + (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2013 -C Release -V -O hdf5.log" > build-VS2013-32.bat; chmod 755 build-VS2013-32.bat) + (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201364 -C Release -V -O hdf5.log" > build-VS2013-64.bat; chmod 755 build-VS2013-64.bat) + (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2015 -C Release -V -O hdf5.log" > build-VS2015-32.bat; chmod 755 build-VS2015-32.bat) + (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201564 -C Release -V -O hdf5.log" > build-VS2015-64.bat; chmod 755 build-VS2015-64.bat) + (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2017 -C Release -V -O hdf5.log" > build-VS2017-32.bat; chmod 755 build-VS2017-32.bat) + (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -V -O hdf5.log" > build-VS2017-64.bat; chmod 755 build-VS2017-32.bat) # 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 $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 + cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmziptmpsubdir + cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpsubdir + cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.7-Source.tar.gz $cmziptmpsubdir + cp $cmziptmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpsubdir + cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmziptmpsubdir + cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmziptmpsubdir # step 4: convert text files # There maybe a simpler way to do this. @@ -234,12 +236,13 @@ tar2cmakezip() # -k Keep the date stamp # -q quiet mode # grep redirect output to /dev/null because -q or -s are not portable. - find $cmziptmpdir/$version | \ + find $cmziptmpsubdir/$version | \ while read inf; do \ if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \ unix2dos -q -k $inf; \ fi\ done + # step 3: make zipball # -9 maximum compression # -y Store symbolic links as such in the zip archive @@ -284,9 +287,9 @@ tar2cmakezip() # Returns 0 if successful; 1 otherwise # # need function to create another temporary directory, extract the - # $tmpdir/$HDF5_VERS.tar into it, add (create) build-unix.sh, - # CTestScript.cmake, HDF5config.cmake, SZIP.tar.gz and ZLib.tar.gz, - # and then tar.gz it. + # $tmpdir/$HDF5_VERS.tar into it, create build-unix.sh, + # add CTestScript.cmake, HDF5config.cmake, SZIP.tar.gz + # and ZLib.tar.gz, and then tar.gz it. tar2cmaketgz() { if [ $# -ne 3 ]; then @@ -294,16 +297,17 @@ tar2cmaketgz() return 1 fi cmgztmpdir=/tmp/cmgztmpdir$$ - mkdir -p $cmgztmpdir + cmgztmpsubdir=$cmgztmpdir/CMake-$HDF5_VERS + mkdir -p $cmgztmpsubdir version=$1 tarfile=$2 tgzfile=$3 # step 1: untar tarball in cmgztmpdir - (cd $cmgztmpdir; tar xf -) < $tarfile + (cd $cmgztmpsubdir; tar xf -) < $tarfile # sanity check - if [ ! -d $cmgztmpdir/$version ]; then - echo "untar did not create $cmgztmpdir/$version source dir" + if [ ! -d $cmgztmpsubdir/$version ]; then + echo "untar did not create $cmgztmpsubdir/$version source dir" # cleanup rm -rf $cmgztmpdir return 1 @@ -311,14 +315,15 @@ tar2cmaketgz() # step 2: add build-unix.sh script - (cd $cmgztmpdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -V -O hdf5.log" > build-unix.sh; chmod 755 build-unix.sh) + (cd $cmgztmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -V -O hdf5.log" > build-unix.sh; chmod 755 build-unix.sh) # 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 $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 + cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmgztmpsubdir + cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir + cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.7-Source.tar.gz $cmgztmpsubdir + cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir + cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir + cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmgztmpsubdir tar czf $DEST/CMake-$HDF5_VERS.tar.gz -C $cmgztmpdir . || exit 1 # cleanup -- cgit v0.12 From ab31eafa2ec0084f3a9ce4fd86c3b344f3aee296 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 24 Jul 2018 15:21:55 -0500 Subject: Correct typo in comment in config/gnu-flags. --- config/gnu-flags | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/gnu-flags b/config/gnu-flags index ac054bf..225f072 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -85,7 +85,7 @@ case "$cc_vendor-$cc_version" in esac case "$host_os-$host_cpu" in - # cygwin needs the "-std-c99" flag removed, so make + # cygwin needs the "-std=c99" flag removed, so make # a specific case for Cygwin without the flag and a default # case to add the flag everywhere else cygwin-*) -- cgit v0.12 From 208ff1410d1b000fc559e391c30700c1d143b684 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 24 Jul 2018 15:48:29 -0500 Subject: Correct a few typos. --- bin/release | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/release b/bin/release index e51a054..8a28c2e 100755 --- a/bin/release +++ b/bin/release @@ -190,7 +190,7 @@ tar2zip() # need function to create another temporary directory, extract the # $tmpdir/$HDF5_VERS.tar into it, create build-VS*.bat files, # add CTestScript.cmake, HDF5config.cmake, SZIP.tar.gz - # and ZLib.tar.gz, and then zip it. + # ZLib.tar.gz, HDF5 examples, and then zip it. tar2cmakezip() { if [ $# -ne 3 ]; then @@ -220,7 +220,7 @@ tar2cmakezip() (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2015 -C Release -V -O hdf5.log" > build-VS2015-32.bat; chmod 755 build-VS2015-32.bat) (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201564 -C Release -V -O hdf5.log" > build-VS2015-64.bat; chmod 755 build-VS2015-64.bat) (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2017 -C Release -V -O hdf5.log" > build-VS2017-32.bat; chmod 755 build-VS2017-32.bat) - (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -V -O hdf5.log" > build-VS2017-64.bat; chmod 755 build-VS2017-32.bat) + (cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -V -O hdf5.log" > build-VS2017-64.bat; chmod 755 build-VS2017-64.bat) # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmziptmpsubdir @@ -289,7 +289,7 @@ tar2cmakezip() # need function to create another temporary directory, extract the # $tmpdir/$HDF5_VERS.tar into it, create build-unix.sh, # add CTestScript.cmake, HDF5config.cmake, SZIP.tar.gz - # and ZLib.tar.gz, and then tar.gz it. + # ZLib.tar.gz, HDF5 examples, and then tar.gz it. tar2cmaketgz() { if [ $# -ne 3 ]; then -- cgit v0.12 From ac5871c39cd9cd26b4a26041da7f265d5bba64dd Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 24 Jul 2018 16:10:33 -0500 Subject: Update HDF5 examples to correct version. --- bin/release | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/release b/bin/release index 8a28c2e..afdbb51 100755 --- a/bin/release +++ b/bin/release @@ -225,7 +225,7 @@ tar2cmakezip() # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmziptmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpsubdir - cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.7-Source.tar.gz $cmziptmpsubdir + cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.8-Source.tar.gz $cmziptmpsubdir cp $cmziptmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpsubdir cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmziptmpsubdir cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmziptmpsubdir @@ -320,7 +320,7 @@ tar2cmaketgz() # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmgztmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir - cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.7-Source.tar.gz $cmgztmpsubdir + cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.8-Source.tar.gz $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmgztmpsubdir -- cgit v0.12 From 5550fb330a00ef75b6ab6daa6d8dae8bcf832185 Mon Sep 17 00:00:00 2001 From: Jordan Henderson Date: Wed, 25 Jul 2018 13:16:41 -0500 Subject: RELEASE.txt updates for HDFFV-10467 and HDFFV-10509 --- release_docs/RELEASE.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 80be0ab..5ace8a6 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -197,6 +197,44 @@ Bug Fixes since HDF5-1.10.2 release (DER - 2018/02/26, HDFFV-10356) + - A bug was discovered in the parallel library which caused partial + parallel reads of filtered datasets to return incorrect data. The + library used the incorrect dataspace for each chunk read, causing + the selection used in each chunk to be wrong. + + The bug was not caught during testing because all of the current + tests which do parallel reads of filtered data read all of the data + using an H5S_ALL selection. Several tests were added which exercise + partial parallel reads. + + (JTH - 2018/07/16, HDFFV-10467) + + - A bug was discovered in the parallel library which caused parallel + writes of filtered datasets to trigger an assertion failure in the + file free space manager. + + This occurred when the filter used caused chunks to repeatedly shrink + and grow over the course of several dataset writes. The previous chunk + information, such as the size of the chunk and the offset in the file, + was being cached and not updated after each write, causing the next write + to the chunk to retrieve the incorrect cached information and run into + issues when reallocating space in the file for the chunk. + + (JTH - 2018/07/16, HDFFV-10509) + + - A bug was discovered in the parallel library which caused the + H5D__mpio_array_gatherv() function to allocate too much memory. + + When the function is called with the 'allgather' parameter set + to a non-true value, the function will receive data from all MPI + ranks and gather it to the single rank specied by the 'root' + parameter. However, the bug in the function caused memory for + the received data to be allocated on all MPI ranks, not just the + singular rank specified as the receiver. In some circumstances, + this would cause an application to fail due to the large amounts + of memory being allocated. + + (JTH - 2018/07/16, HDFFV-10467) Configuration ------------- -- cgit v0.12 From e1e10743cf342509b5e89b50fc43fb1d52a9c8d2 Mon Sep 17 00:00:00 2001 From: Jordan Henderson Date: Thu, 26 Jul 2018 12:50:26 -0500 Subject: Add configure check for MPI_Mprobe and MPI_Imrecv functions Add line to libhdf5settings file for status of Parallel writes to filtered datasets status Surround Parallel Compression code in MPI_VERSION >= 3 checks Add disabled message for Parallel Compression built w/ MPI-2 Modify Parallel Compression tests to only run the parallel filtered read tests when parallel filtered writes are disabled Update big I/O code to handle being built with MPI-2 Add checks to CMakeLists.txt for MPI_Mprobe and MPI_Imrecv --- CMakeLists.txt | 8 ++++++++ configure.ac | 31 +++++++++++++++++++++++++++++++ src/H5Dio.c | 3 ++- src/H5Dmpio.c | 24 ++++++++++++++++++++++++ src/H5Ppublic.h | 3 ++- src/H5Smpio.c | 35 ++++++++++++++++++++++++++++++++--- src/libhdf5.settings.in | 35 ++++++++++++++++++----------------- testpar/t_filters_parallel.c | 14 ++++++++++++++ 8 files changed, 131 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0640b9..165ea9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -559,6 +559,14 @@ 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) + + # Used by Parallel Compression feature + CHECK_FUNCTION_EXISTS (MPI_Mprobe "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_Mprobe) + CHECK_FUNCTION_EXISTS (MPI_Imrecv "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_Imrecv) + if (NOT H5_HAVE_MPI_Mprobe OR NOT H5_HAVE_MPI_Imrecv) + message (WARNING "The MPI_Mprobe and/or MPI_Imrecv functions could not be located. + Parallel writes of filtered data will be disabled.") + endif () else () message (STATUS "Parallel libraries not found") endif () diff --git a/configure.ac b/configure.ac index 18ede67..5dc965e 100644 --- a/configure.ac +++ b/configure.ac @@ -2532,6 +2532,7 @@ esac AC_SUBST([ADD_PARALLEL_FILES]) ADD_PARALLEL_FILES="no" AC_SUBST([MPE]) MPE=no AC_SUBST([INSTRUMENT_LIBRARY]) INSTRUMENT_LIBRARY=no +AC_SUBST([PARALLEL_FILTERED_WRITES]) if test -n "$PARALLEL"; then ## The 'testpar' directory should participate in the build @@ -2687,6 +2688,33 @@ if test -n "$PARALLEL"; then if test "X-$MPE" = "X-yes"; then AC_DEFINE([HAVE_MPE], [1], [Define if we have MPE support]) fi + + ## ---------------------------------------------------------------------- + ## Check for the MPI-3 functions necessary for the Parallel Compression + ## feature. If these are not present, issue a warning that Parallel + ## Compression will be disabled. + ## + AC_MSG_CHECKING([for MPI_Mprobe and MPI_Imrecv functions]) + + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include + ]], + [[ + MPI_Message message; + MPI_Init(0, (void *) 0); + MPI_Mprobe(0, 0, 0, &message, (void *) 0); + MPI_Imrecv((void *) 0, 0, 0, (void *) 0, (void *) 0); + ]] + )], + [AC_MSG_RESULT([yes]) + PARALLEL_FILTERED_WRITES=yes], + [AC_MSG_RESULT([no]) + AC_MSG_WARN([A simple MPI program using the MPI_Mprobe and MPI_Imrecv functions could not be compiled and linked. + Parallel writes of filtered data will be disabled.]) + PARALLEL_FILTERED_WRITES=no] + ) fi ## ---------------------------------------------------------------------- @@ -2977,6 +3005,9 @@ AC_SUBST([WORDS_BIGENDIAN]) ## Parallel support? (set above except empty if none) PARALLEL=${PARALLEL:-no} +## Parallel writes to filtered datasets support? +PARALLEL_FILTERED_WRITES=${PARALLEL_FILTERED_WRITES:-no} + ## Compiler with version information. This consists of the full path ## name of the compiler and the reported version number. AC_SUBST([CC_VERSION]) diff --git a/src/H5Dio.c b/src/H5Dio.c index 452105e..5fea91f 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -1189,7 +1189,8 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, "data transforms needed to be applied", "optimized MPI types flag wasn't set", "one of the dataspaces was neither simple nor scalar", - "dataset was not contiguous or chunked" }; + "dataset was not contiguous or chunked", + "parallel writes to filtered datasets are disabled" }; if(H5CX_get_mpio_local_no_coll_cause(&local_no_collective_cause) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get local no collective cause value") diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index d721ae6..5ebdc06 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -229,9 +229,11 @@ static herr_t H5D__mpio_get_sum_chunk(const H5D_io_info_t *io_info, static herr_t H5D__construct_filtered_io_info_list(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm, H5D_filtered_collective_io_info_t **chunk_list, size_t *num_entries); +#if MPI_VERSION >= 3 static herr_t H5D__chunk_redistribute_shared_chunks(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm, H5D_filtered_collective_io_info_t *local_chunk_array, size_t *local_chunk_array_num_entries); +#endif static herr_t H5D__mpio_array_gatherv(void *local_array, size_t local_array_num_entries, size_t array_entry_size, void **gathered_array, size_t *gathered_array_num_entries, hbool_t allgather, int root, MPI_Comm comm, int (*sort_func)(const void *, const void *)); @@ -244,8 +246,10 @@ static herr_t H5D__filtered_collective_chunk_entry_io(H5D_filtered_collective_io static int H5D__cmp_chunk_addr(const void *chunk_addr_info1, const void *chunk_addr_info2); static int H5D__cmp_filtered_collective_io_info_entry(const void *filtered_collective_io_info_entry1, const void *filtered_collective_io_info_entry2); +#if MPI_VERSION >= 3 static int H5D__cmp_filtered_collective_io_info_entry_owner(const void *filtered_collective_io_info_entry1, const void *filtered_collective_io_info_entry2); +#endif /*********************/ @@ -330,6 +334,18 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space, * use collective IO will defer until each chunk IO is reached. */ +#if MPI_VERSION < 3 + /* + * Don't allow parallel writes to filtered datasets if the MPI version + * is less than 3. The functions needed (MPI_Mprobe and MPI_Imrecv) will + * not be available. + */ + if (io_info->op_type == H5D_IO_OP_WRITE && + io_info->dset->shared->layout.type == H5D_CHUNKED && + io_info->dset->shared->dcpl_cache.pline.nused > 0) + local_cause |= H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED; +#endif + /* Check for independent I/O */ if(local_cause & H5D_MPIO_SET_INDEPENDENT) global_cause = local_cause; @@ -2127,6 +2143,7 @@ H5D__cmp_filtered_collective_io_info_entry(const void *filtered_collective_io_in FUNC_LEAVE_NOAPI(H5F_addr_cmp(addr1, addr2)) } /* end H5D__cmp_filtered_collective_io_info_entry() */ +#if MPI_VERSION >= 3 /*------------------------------------------------------------------------- * Function: H5D__cmp_filtered_collective_io_info_entry_owner @@ -2157,6 +2174,7 @@ H5D__cmp_filtered_collective_io_info_entry_owner(const void *filtered_collective FUNC_LEAVE_NOAPI(owner1 - owner2) } /* end H5D__cmp_filtered_collective_io_info_entry_owner() */ +#endif /*------------------------------------------------------------------------- @@ -2585,8 +2603,12 @@ H5D__construct_filtered_io_info_list(const H5D_io_info_t *io_info, const H5D_typ /* Redistribute shared chunks to new owners as necessary */ if (io_info->op_type == H5D_IO_OP_WRITE) +#if MPI_VERSION >= 3 if (H5D__chunk_redistribute_shared_chunks(io_info, type_info, fm, local_info_array, &num_chunks_selected) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to redistribute shared chunks") +#else + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to redistribute shared chunks - MPI version < 3 (MPI_Mprobe and MPI_Imrecv missing)") +#endif *chunk_list = local_info_array; *num_entries = num_chunks_selected; @@ -2595,6 +2617,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__construct_filtered_io_info_list() */ +#if MPI_VERSION >= 3 /*------------------------------------------------------------------------- * Function: H5D__chunk_redistribute_shared_chunks @@ -2893,6 +2916,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__chunk_redistribute_shared_chunks() */ +#endif /*------------------------------------------------------------------------- diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 58f3d18..c5596e5 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -166,7 +166,8 @@ typedef enum H5D_mpio_no_collective_cause_t { H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED = 0x08, H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES = 0x10, H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET = 0x20, - H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE = 0x40 + H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED = 0x40, + H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE = 0x80 } H5D_mpio_no_collective_cause_t; /********************/ diff --git a/src/H5Smpio.c b/src/H5Smpio.c index db81ffc..2bd275a 100644 --- a/src/H5Smpio.c +++ b/src/H5Smpio.c @@ -271,29 +271,58 @@ H5S_mpio_create_point_datatype (size_t elmt_size, hsize_t num_points, 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") +#if MPI_VERSION < 3 + /* Allocate block sizes for MPI datatype call */ + if(NULL == (blocks = (int *)H5MM_malloc(sizeof(int) * bigio_count))) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks") + + for(u = 0; u < bigio_count; u++) + blocks[u] = 1; +#endif + for(i=0 ; i= 3 if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed_block(bigio_count, 1, &disp[i*bigio_count], elmt_type, &inner_types[i]))) { - HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed_block failed", mpi_code); + HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed_block failed", mpi_code); } +#else + if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed((int)bigio_count, + blocks, + &disp[i*bigio_count], + elmt_type, + &inner_types[i]))) { + HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed failed", mpi_code) + } +#endif inner_blocks[i] = 1; inner_disps[i] = 0; } if(remaining_points) { +#if MPI_VERSION >= 3 if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed_block(remaining_points, 1, &disp[num_big_types*bigio_count], elmt_type, &inner_types[num_big_types]))) { HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed_block failed", mpi_code); - } + } +#else + if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed((int)remaining_points, + blocks, + &disp[num_big_types*bigio_count], + elmt_type, + &inner_types[num_big_types]))) { + HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed failed", mpi_code) + } +#endif inner_blocks[num_big_types] = 1; inner_disps[num_big_types] = 0; - } + } if(MPI_SUCCESS != (mpi_code = MPI_Type_create_struct(total_types, inner_blocks, diff --git a/src/libhdf5.settings.in b/src/libhdf5.settings.in index 51b24dc..61fa1eb 100644 --- a/src/libhdf5.settings.in +++ b/src/libhdf5.settings.in @@ -67,20 +67,21 @@ Languages: Features: --------- - Parallel HDF5: @PARALLEL@ - High-level library: @HDF5_HL@ - Threadsafety: @THREADSAFE@ - Default API mapping: @DEFAULT_API_VERSION@ - With deprecated public symbols: @DEPRECATED_SYMBOLS@ - I/O filters (external): @EXTERNAL_FILTERS@ - MPE: @MPE@ - Direct VFD: @DIRECT_VFD@ - dmalloc: @HAVE_DMALLOC@ - Packages w/ extra debug output: @INTERNAL_DEBUG_OUTPUT@ - API tracing: @TRACE_API@ - Using memory checker: @USINGMEMCHECKER@ -Memory allocation sanity checks: @MEMORYALLOCSANITYCHECK@ - Metadata trace file: @METADATATRACEFILE@ - Function stack tracing: @CODESTACK@ - Strict file format checks: @STRICT_FORMAT_CHECKS@ - Optimization instrumentation: @INSTRUMENT_LIBRARY@ + Parallel HDF5: @PARALLEL@ +Parallel Filtered Dataset Writes: @PARALLEL_FILTERED_WRITES@ + High-level library: @HDF5_HL@ + Threadsafety: @THREADSAFE@ + Default API mapping: @DEFAULT_API_VERSION@ + With deprecated public symbols: @DEPRECATED_SYMBOLS@ + I/O filters (external): @EXTERNAL_FILTERS@ + MPE: @MPE@ + Direct VFD: @DIRECT_VFD@ + dmalloc: @HAVE_DMALLOC@ + Packages w/ extra debug output: @INTERNAL_DEBUG_OUTPUT@ + API tracing: @TRACE_API@ + Using memory checker: @USINGMEMCHECKER@ + Memory allocation sanity checks: @MEMORYALLOCSANITYCHECK@ + Metadata trace file: @METADATATRACEFILE@ + Function stack tracing: @CODESTACK@ + Strict file format checks: @STRICT_FORMAT_CHECKS@ + Optimization instrumentation: @INSTRUMENT_LIBRARY@ diff --git a/testpar/t_filters_parallel.c b/testpar/t_filters_parallel.c index 3647732..f436c8f 100644 --- a/testpar/t_filters_parallel.c +++ b/testpar/t_filters_parallel.c @@ -37,6 +37,7 @@ size_t cur_filter_idx = 0; static herr_t set_dcpl_filter(hid_t dcpl); +#if MPI_VERSION >= 3 /* Tests for writing data in parallel */ static void test_write_one_chunk_filtered_dataset(void); static void test_write_filtered_dataset_no_overlap(void); @@ -52,6 +53,7 @@ static void test_write_cmpd_filtered_dataset_no_conversion_unshared(void); static void test_write_cmpd_filtered_dataset_no_conversion_shared(void); static void test_write_cmpd_filtered_dataset_type_conversion_unshared(void); static void test_write_cmpd_filtered_dataset_type_conversion_shared(void); +#endif /* Tests for reading data in parallel */ static void test_read_one_chunk_filtered_dataset(void); @@ -69,8 +71,10 @@ static void test_read_cmpd_filtered_dataset_no_conversion_shared(void); static void test_read_cmpd_filtered_dataset_type_conversion_unshared(void); static void test_read_cmpd_filtered_dataset_type_conversion_shared(void); +#if MPI_VERSION >= 3 /* Other miscellaneous tests */ static void test_shrinking_growing_chunks(void); +#endif /* * Tests for attempting to round-trip the data going from @@ -82,7 +86,9 @@ static void test_shrinking_growing_chunks(void); * written in parallel -> read serially */ static void test_write_serial_read_parallel(void); +#if MPI_VERSION >= 3 static void test_write_parallel_read_serial(void); +#endif static MPI_Comm comm = MPI_COMM_WORLD; static MPI_Info info = MPI_INFO_NULL; @@ -90,6 +96,7 @@ static int mpi_rank; static int mpi_size; static void (*tests[])(void) = { +#if MPI_VERSION >= 3 test_write_one_chunk_filtered_dataset, test_write_filtered_dataset_no_overlap, test_write_filtered_dataset_overlap, @@ -104,6 +111,7 @@ static void (*tests[])(void) = { test_write_cmpd_filtered_dataset_no_conversion_shared, test_write_cmpd_filtered_dataset_type_conversion_unshared, test_write_cmpd_filtered_dataset_type_conversion_shared, +#endif test_read_one_chunk_filtered_dataset, test_read_filtered_dataset_no_overlap, test_read_filtered_dataset_overlap, @@ -119,8 +127,10 @@ static void (*tests[])(void) = { test_read_cmpd_filtered_dataset_type_conversion_unshared, test_read_cmpd_filtered_dataset_type_conversion_shared, test_write_serial_read_parallel, +#if MPI_VERSION >= 3 test_write_parallel_read_serial, test_shrinking_growing_chunks, +#endif }; /* @@ -143,6 +153,7 @@ set_dcpl_filter(hid_t dcpl) } } +#if MPI_VERSION >= 3 /* * Tests parallel write of filtered data in the special * case where a dataset is composed of a single chunk. @@ -2458,6 +2469,7 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(void) return; } +#endif /* * Tests parallel read of filtered data in the special @@ -5528,6 +5540,7 @@ test_write_serial_read_parallel(void) return; } +#if MPI_VERSION >= 3 /* * Tests parallel write of filtered data * to a dataset. After the write has @@ -5839,6 +5852,7 @@ test_shrinking_growing_chunks(void) return; } +#endif int main(int argc, char** argv) -- cgit v0.12 From 256fc4754b02dc2f684c792e48a913de15a2fc52 Mon Sep 17 00:00:00 2001 From: Jordan Henderson Date: Fri, 27 Jul 2018 12:49:42 -0500 Subject: Switch to CheckSymbolExists in CMake --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 165ea9e..74c7095 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -561,8 +561,8 @@ if (HDF5_ENABLE_PARALLEL) CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info) # Used by Parallel Compression feature - CHECK_FUNCTION_EXISTS (MPI_Mprobe "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_Mprobe) - CHECK_FUNCTION_EXISTS (MPI_Imrecv "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_Imrecv) + CHECK_SYMBOL_EXISTS (MPI_Mprobe "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_Mprobe) + CHECK_SYMBOL_EXISTS (MPI_Imrecv "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_Imrecv) if (NOT H5_HAVE_MPI_Mprobe OR NOT H5_HAVE_MPI_Imrecv) message (WARNING "The MPI_Mprobe and/or MPI_Imrecv functions could not be located. Parallel writes of filtered data will be disabled.") -- cgit v0.12 From d075c0854d1ffb5a8eae23c5eb9a4456067f30c9 Mon Sep 17 00:00:00 2001 From: Jordan Henderson Date: Fri, 27 Jul 2018 14:58:01 -0500 Subject: Add quotes to places where MPI_C_LIBRARIES are linked against --- src/CMakeLists.txt | 8 ++++---- testpar/CMakeLists.txt | 4 ++-- tools/lib/CMakeLists.txt | 4 ++-- tools/src/h5diff/CMakeLists.txt | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9a1f545..3c5526f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -858,7 +858,7 @@ target_include_directories(H5detect PRIVATE "${HDF5_BINARY_DIR};$<$:${MPI_C_LIBRARIES}> $<$:ws2_32.lib> + PRIVATE "$<$:${MPI_C_LIBRARIES}>" $<$:ws2_32.lib> INTERFACE $<$:"-O0"> ) @@ -874,7 +874,7 @@ target_include_directories(H5make_libsettings PRIVATE "${HDF5_BINARY_DIR};$<$:${MPI_C_LIBRARIES}> $<$:ws2_32.lib> + PRIVATE "$<$:${MPI_C_LIBRARIES}>" $<$:ws2_32.lib> INTERFACE $<$:"-O0"> ) @@ -911,7 +911,7 @@ target_compile_definitions(${HDF5_LIB_TARGET} ) TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC) target_link_libraries (${HDF5_LIB_TARGET} - PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} $<$:${MPI_C_LIBRARIES}> + PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} "$<$:${MPI_C_LIBRARIES}>" PUBLIC $<$>:${CMAKE_DL_LIBS}> ) set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET}) @@ -955,7 +955,7 @@ if (BUILD_SHARED_LIBS) ) TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED) target_link_libraries (${HDF5_LIBSH_TARGET} - PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} $<$:${MPI_C_LIBRARIES}> + 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}") diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index e843811..c08a69e 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -26,7 +26,7 @@ target_include_directories(testphdf5 ) TARGET_C_PROPERTIES (testphdf5 STATIC) target_link_libraries (testphdf5 - PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$:${MPI_C_LIBRARIES}> + PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$:${MPI_C_LIBRARIES}>" ) set_target_properties (testphdf5 PROPERTIES FOLDER test/par) @@ -37,7 +37,7 @@ MACRO (ADD_H5P_EXE file) ) TARGET_C_PROPERTIES (${file} STATIC) target_link_libraries (${file} - PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$:${MPI_C_LIBRARIES}> + 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/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index 32166bc..a03b60a 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -41,7 +41,7 @@ target_include_directories(${HDF5_TOOLS_LIB_TARGET} TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} STATIC) target_link_libraries (${HDF5_TOOLS_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET} - PRIVATE $<$:${MPI_C_LIBRARIES}> + 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) @@ -61,7 +61,7 @@ if (BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (${HDF5_TOOLS_LIBSH_TARGET} SHARED) target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET} - PRIVATE $<$:${MPI_C_LIBRARIES}> + 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") diff --git a/tools/src/h5diff/CMakeLists.txt b/tools/src/h5diff/CMakeLists.txt index b990e3a..671e6b6 100644 --- a/tools/src/h5diff/CMakeLists.txt +++ b/tools/src/h5diff/CMakeLists.txt @@ -37,7 +37,7 @@ if (H5_HAVE_PARALLEL) ) 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}>) + 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 () -- cgit v0.12 From 4578eb0fc128fc4316c9f5b5a03228586e0bc96b Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Sat, 28 Jul 2018 08:00:32 -0500 Subject: Fixed document format Platforms tested: Linux/64 (jelly) (only in comment sections) --- c++/src/H5ArrayType.cpp | 1 + c++/src/H5CompType.cpp | 1 + c++/src/H5DataType.cpp | 3 +++ c++/src/H5DcreatProp.cpp | 1 + c++/src/H5DxferProp.cpp | 1 + c++/src/H5EnumType.cpp | 1 + c++/src/H5FloatType.cpp | 1 + c++/src/H5Group.cpp | 1 + c++/src/H5IntType.cpp | 1 + c++/src/H5LaccProp.cpp | 2 ++ c++/src/H5LcreatProp.cpp | 2 ++ c++/src/H5StrType.cpp | 1 + c++/src/H5VarLenType.cpp | 1 + 13 files changed, 17 insertions(+) diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp index 8ecb6da..0dab8ef 100644 --- a/c++/src/H5ArrayType.cpp +++ b/c++/src/H5ArrayType.cpp @@ -143,6 +143,7 @@ ArrayType& ArrayType::operator=(const ArrayType& rhs) // Function: ArrayType::decode ///\brief Returns an ArrayType object via DataType* by decoding the /// binary object description of this type. +/// ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp index ae22f18..fe96bb0 100644 --- a/c++/src/H5CompType.cpp +++ b/c++/src/H5CompType.cpp @@ -129,6 +129,7 @@ CompType::CompType(const H5Location& loc, const H5std_string& dtype_name) : Data // Function: CompType::decode ///\brief Returns a CompType object via DataType* by decoding the /// binary object description of this datatype. +/// ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp index bb27d47..081cc03 100644 --- a/c++/src/H5DataType.cpp +++ b/c++/src/H5DataType.cpp @@ -281,6 +281,7 @@ hid_t DataType::p_decode() const // Function: DataType::decode ///\brief Returns a DataType instance by decoding the binary object /// description of this datatype. +/// ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- @@ -301,6 +302,7 @@ DataType* DataType::decode() const //-------------------------------------------------------------------------- // Function: DataType::encode ///\brief Creates a binary object description of this datatype. +/// ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- @@ -333,6 +335,7 @@ void DataType::encode() // Function: DataType::hasBinaryDesc ///\brief Determines whether this datatype has a binary object /// description. +/// ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index bb899d7..79ff100 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -253,6 +253,7 @@ void DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_p // Function: DSetCreatPropList::setNbit ///\brief Sets up for the use of the Nbit compression filter. ///\exception H5::PropListIException +/// ///\par Description /// The associate C function sets an Nbit compression filter, /// H5Z_FILTER_NBIT, for a dataset. For more information about diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp index 90ecf88..9cc6961 100644 --- a/c++/src/H5DxferProp.cpp +++ b/c++/src/H5DxferProp.cpp @@ -299,6 +299,7 @@ ssize_t DSetMemXferPropList::getDataTransform(char* exp, size_t buf_size) const // Function: DSetMemXferPropList::getDataTransform ///\brief This is an overloaded member function, provided for convenience. /// It takes no parameter and returns a \c H5std_string for the expression. +/// ///\exception H5::PropListIException // Programmer Binh-Minh Ribler - Mar, 2014 //-------------------------------------------------------------------------- diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp index 9a4ccf1..f9adc47 100644 --- a/c++/src/H5EnumType.cpp +++ b/c++/src/H5EnumType.cpp @@ -151,6 +151,7 @@ EnumType::EnumType(const H5Location& loc, const H5std_string& dtype_name) : Data // Function: EnumType::decode ///\brief Returns an EnumType object via DataType* by decoding the /// binary object description of this type. +/// ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp index 5fb1cb7..aba826e 100644 --- a/c++/src/H5FloatType.cpp +++ b/c++/src/H5FloatType.cpp @@ -133,6 +133,7 @@ FloatType::FloatType(const H5Location& loc, const H5std_string& dtype_name) : At // Function: FloatType::decode ///\brief Returns an FloatType object via DataType* by decoding the /// binary object description of this type. +/// ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp index 0c2c4e8..7132bdf 100644 --- a/c++/src/H5Group.cpp +++ b/c++/src/H5Group.cpp @@ -66,6 +66,7 @@ Group::Group(const Group& original) : H5Object(), CommonFG(), id(original.id) //-------------------------------------------------------------------------- // Function: Group::closeObjId ///\brief Closes an object, which was opened with Group::getObjId +/// ///\exception H5::FileIException or H5::GroupIException // Programmer Binh-Minh Ribler - March, 2017 //-------------------------------------------------------------------------- diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp index 8e19d1e..49c638e 100644 --- a/c++/src/H5IntType.cpp +++ b/c++/src/H5IntType.cpp @@ -132,6 +132,7 @@ IntType::IntType(const H5Location& loc, const H5std_string& dtype_name) : AtomTy // Function: IntType::decode ///\brief Returns an IntType object via DataType* by decoding the /// binary object description of this type. +/// ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- diff --git a/c++/src/H5LaccProp.cpp b/c++/src/H5LaccProp.cpp index 49ffa2b..1905cce 100644 --- a/c++/src/H5LaccProp.cpp +++ b/c++/src/H5LaccProp.cpp @@ -107,6 +107,7 @@ LinkAccPropList::LinkAccPropList(const hid_t plist_id) : PropList(plist_id) {} ///\brief Set the number of soft or user-defined link traversals allowed /// before the library assumes it has found a cycle and aborts the /// traversal. +/// ///\exception H5::PropListIException // Programmer Binh-Minh Ribler - March 1, 2017 //-------------------------------------------------------------------------- @@ -124,6 +125,7 @@ void LinkAccPropList::setNumLinks(size_t nlinks) const // Function: LinkAccPropList::getNumLinks ///\brief Gets the number of soft or user-defined links that can be /// traversed before a failure occurs. +/// ///\exception H5::PropListIException // Programmer Binh-Minh Ribler - March 1, 2017 //-------------------------------------------------------------------------- diff --git a/c++/src/H5LcreatProp.cpp b/c++/src/H5LcreatProp.cpp index 8bece44..695c1fe 100644 --- a/c++/src/H5LcreatProp.cpp +++ b/c++/src/H5LcreatProp.cpp @@ -105,6 +105,7 @@ LinkCreatPropList::LinkCreatPropList(const hid_t plist_id) : PropList(plist_id) //-------------------------------------------------------------------------- // Function: LinkCreatPropList::setCharEncoding ///\brief Sets the character encoding of the string. +/// ///\exception H5::PropListIException // March, 2018 //-------------------------------------------------------------------------- @@ -121,6 +122,7 @@ void LinkCreatPropList::setCharEncoding(H5T_cset_t encoding) const //-------------------------------------------------------------------------- // Function: LinkCreatPropList::getCharEncoding ///\brief Gets the character encoding of the string. +///\return The character encoding ///\exception H5::PropListIException // March, 2018 //-------------------------------------------------------------------------- diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp index 0cf2a4e..f5b65e4 100644 --- a/c++/src/H5StrType.cpp +++ b/c++/src/H5StrType.cpp @@ -186,6 +186,7 @@ StrType::StrType(const H5Location& loc, const H5std_string& dtype_name) : AtomTy // Function: StrType::decode ///\brief Returns an StrType object via DataType* by decoding the /// binary object description of this type. +/// ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp index 18cd831..094af61 100644 --- a/c++/src/H5VarLenType.cpp +++ b/c++/src/H5VarLenType.cpp @@ -133,6 +133,7 @@ VarLenType::VarLenType(const H5Location& loc, const H5std_string& dtype_name) : // Function: VarLenType::decode ///\brief Returns an VarLenType object via DataType* by decoding the /// binary object description of this type. +/// ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- -- cgit v0.12 From 49a8da4ea79677804131aef87287f80b30658fd1 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 30 Jul 2018 08:57:12 -0500 Subject: HDFFV-10534 --- java/src/hdf/hdf5lib/exceptions/HDF5Exception.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java b/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java index 1b55437..1e4b5fd 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java @@ -30,7 +30,7 @@ package hdf.hdf5lib.exceptions; * error code returned by the HDF5 library. * */ -public class HDF5Exception extends Exception { +public class HDF5Exception extends RuntimeException { protected String detailMessage; /** -- cgit v0.12 From 91f20982daf2f76d4b8f3ba4f4659db7cd62c821 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 30 Jul 2018 11:51:11 -0500 Subject: HDFFV-10534 add note --- release_docs/RELEASE.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 5ace8a6..9161b3c 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -119,6 +119,12 @@ New Features Java Library: ---------------- + - Java HDFLibraryException class + + Change parent class from Exception to RuntimeException. + + (ADB - 2018/07/30, HDFFV10534) + - JNI Read and Write Refactored variable-length functions, H5DreadVL and H5AreadVL, @@ -160,7 +166,7 @@ Bug Fixes since HDF5-1.10.2 release H5Adelete failed when deleting the last "large" attribute that is stored densely via fractal heap/v2 b-tree. - + After removing the attribute, update the ainfo message. If the number of attributes goes to zero, remove the message. -- cgit v0.12 From b33ba00c9cf0b5a94d1c0a102b6e47046830362e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 30 Jul 2018 12:39:28 -0500 Subject: HDFFV-9755 Document BUILD_STATIC_EXECS --- CMakeLists.txt | 2 +- release_docs/INSTALL_CMake.txt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0640b9..6a6d708 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -430,7 +430,7 @@ set (CMAKE_POSITION_INDEPENDENT_CODE ON) #----------------------------------------------------------------------------- # Option to Build Static executables #----------------------------------------------------------------------------- -option (BUILD_STATIC_EXECS "Build Static Executabless" OFF) +option (BUILD_STATIC_EXECS "Build Static Executables" OFF) if (BUILD_STATIC_EXECS) if (NOT WIN32) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static") diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index a5864be..0a697f8 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -643,6 +643,11 @@ else () H5_DEFAULT_PLUGINDIR "/usr/local/hdf5/lib/plugin" endif () +NOTE: + The BUILD_STATIC_EXECS ("Build Static Executables") option is only valid + on some unix operating system. It adds the "-static" flag to cflags. This + flag is not available on windows and some modern linux systems will + ignore the flag. ======================================================================== -- cgit v0.12 From c0ff42f67699273f845b0101c481854e23a5a98a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 30 Jul 2018 15:09:50 -0500 Subject: HDFFV-10508 Document binary diffs --- release_docs/RELEASE.txt | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 9161b3c..bbef7f9 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -39,6 +39,7 @@ CONTENTS - Tested Configuration Features Summary - More Tested Platforms - Known Problems +- CMake vs. Autotools installations New Features @@ -511,3 +512,37 @@ Known Problems in the HDF5 source. Please report any new problems found to help@hdfgroup.org. + +CMake vs. Autotools installations +================================= +While both build systems produce similar results, there are differences. +Each system produces the same set of folders on linux (only CMake works +on standard Windows); bin, include, lib and share. Autotools places the +COPYING and RELEASE.txt file in the root folder, CMake places them in +the share folder. + +The bin folder contains the tools and the build scripts. Additionally, CMake +creates dynamic versions of the tools with the suffix "-shared". + build scripts + ------------- + Autotools: h5c++, h5cc, h5fc + CMake: h5c++, h5cc, h5hlc++, h5hlcc + +The include folder holds the header files and the fortran mod files. CMake +places the fortran mod files into separate shared and static subfolders, +while Autotools places one set of mod files into the include folder. Because +Cmake produces a tools library, the header files for tools will appear in +the include folder. + +The lib folder contains the library files, and CMake adds the pkgconfig +subfolder with the hdf5*.pc files used by the bin/build scripts created by +the CMake build. CMake uses links to the main library file, while autotools +builds copies library files. In addition, because CMake creates the tools +library and the C-stub libraries for the Fortran libraries, these libraries +are present only for CMake builds. The names of the szip libaries are different +between the build systems. + +The share folder will have the most differences because CMake builds include +a number of CMake specific files for support of CMakes find_package and support +for the HDF5 Examples CMake project. + -- cgit v0.12 From 2770f0bf9fcdd13e652398025c838999ab71296f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 30 Jul 2018 15:46:42 -0500 Subject: HDFFV-10508 pubconf changes found --- config/cmake/H5pubconf.h.in | 46 +++++++++++------------------- config/cmake/HDF5UseFortran.cmake | 6 ++-- config/cmake_ext_mod/ConfigureChecks.cmake | 5 ---- 3 files changed, 20 insertions(+), 37 deletions(-) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index e4c9a2e..1bc590a 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -161,24 +161,12 @@ /* Define to 1 if you have the `fseeko' function. */ #cmakedefine H5_HAVE_FSEEKO @H5_HAVE_FSEEKO@ -/* Define to 1 if you have the `fseeko64' function. */ -#cmakedefine H5_HAVE_FSEEKO64 @H5_HAVE_FSEEKO64@ - -/* Define to 1 if you have the `fstat64' function. */ -#cmakedefine H5_HAVE_FSTAT64 @H5_HAVE_FSTAT64@ - -/* Define to 1 if you have the `ftello' function. */ -#cmakedefine H5_HAVE_FTELLO @H5_HAVE_FTELLO@ - -/* Define to 1 if you have the `ftello64' function. */ -#cmakedefine H5_HAVE_FTELLO64 @H5_HAVE_FTELLO64@ - -/* Define to 1 if you have the `ftruncate64' function. */ -#cmakedefine H5_HAVE_FTRUNCATE64 @H5_HAVE_FTRUNCATE64@ - /* Define if the compiler understands the __FUNCTION__ keyword */ #cmakedefine H5_HAVE_FUNCTION @H5_HAVE_FUNCTION@ +/* Determine if INTEGER*16 is available */ +#cmakedefine H5_HAVE_Fortran_INTEGER_SIZEOF_16 @H5_HAVE_Fortran_INTEGER_SIZEOF_16@ + /* Define to 1 if you have the `GetConsoleScreenBufferInfo' function. */ #cmakedefine H5_HAVE_GETCONSOLESCREENBUFFERINFO @H5_HAVE_GETCONSOLESCREENBUFFERINFO@ @@ -270,10 +258,10 @@ /* Define to 1 if you have the header file. */ #cmakedefine H5_HAVE_MPE_H @H5_HAVE_MPE_H@ -/* Define if `MPI_Comm_c2f' and `MPI_Comm_f2c' exists */ +/* Define if MPI_Comm_c2f and MPI_Comm_f2c exists */ #cmakedefine H5_HAVE_MPI_MULTI_LANG_Comm @H5_HAVE_MPI_MULTI_LANG_Comm@ -/* Define if `MPI_Info_c2f' and `MPI_Info_f2c' exists */ +/* Define if MPI_Info_c2f and MPI_Info_f2c exists */ #cmakedefine H5_HAVE_MPI_MULTI_LANG_Info @H5_HAVE_MPI_MULTI_LANG_Info@ /* Define if we have parallel support */ @@ -348,22 +336,22 @@ /* Define to 1 if you have the `strdup' function. */ #cmakedefine H5_HAVE_STRDUP @H5_HAVE_STRDUP@ -/* Define to 1 if you have the `strtoll' function. */ -#cmakedefine H5_HAVE_STRTOLL @H5_HAVE_STRTOLL@ - -/* Define to 1 if you have the `strtoull' function. */ -#cmakedefine H5_HAVE_STRTOULL @H5_HAVE_STRTOULL@ - /* Define to 1 if you have the header file. */ #cmakedefine H5_HAVE_STRINGS_H @H5_HAVE_STRINGS_H@ /* Define to 1 if you have the header file. */ #cmakedefine H5_HAVE_STRING_H @H5_HAVE_STRING_H@ -/* Define if `struct text_info' is defined */ +/* Define to 1 if you have the `strtoll' function. */ +#cmakedefine H5_HAVE_STRTOLL @H5_HAVE_STRTOLL@ + +/* Define to 1 if you have the `strtoull' function. */ +#cmakedefine H5_HAVE_STRTOULL @H5_HAVE_STRTOULL@ + +/* Define if struct text_info is defined */ #cmakedefine H5_HAVE_STRUCT_TEXT_INFO @H5_HAVE_STRUCT_TEXT_INFO@ -/* Define if `struct videoconfig' is defined */ +/* Define if struct videoconfig is defined */ #cmakedefine H5_HAVE_STRUCT_VIDEOCONFIG @H5_HAVE_STRUCT_VIDEOCONFIG@ /* Define to 1 if you have the `symlink' function. */ @@ -402,7 +390,7 @@ /* Define if we have thread safe support */ #cmakedefine H5_HAVE_THREADSAFE @H5_HAVE_THREADSAFE@ -/* Define if `timezone' is a global variable */ +/* Define if timezone is a global variable */ #cmakedefine H5_HAVE_TIMEZONE @H5_HAVE_TIMEZONE@ /* Define if the ioctl TIOCGETD is defined */ @@ -414,7 +402,7 @@ /* Define to 1 if you have the `tmpfile' function. */ #cmakedefine H5_HAVE_TMPFILE @H5_HAVE_TMPFILE@ -/* Define if `tm_gmtoff' is a member of `struct tm' */ +/* Define if tm_gmtoff is a member of `struct tm' */ #cmakedefine H5_HAVE_TM_GMTOFF @H5_HAVE_TM_GMTOFF@ /* Define to 1 if you have the header file. */ @@ -435,7 +423,7 @@ /* Define if your system has window style path name. */ #cmakedefine H5_HAVE_WINDOW_PATH @H5_HAVE_WINDOW_PATH@ -/* Define to 1 if you have the header file. */ +/* Define to 1 if you have the header file. */ #cmakedefine H5_HAVE_WINSOCK2_H @H5_HAVE_WINSOCK2_H@ /* Define to 1 if you have the header file. */ @@ -453,7 +441,7 @@ /* Define if the compiler understands __inline__ */ #cmakedefine H5_HAVE___INLINE__ @H5_HAVE___INLINE__@ -/* Define if HDF5's high-level library headers should be included in hdf5.h */ +/* Define if the high-level library headers should be included in hdf5.h */ #cmakedefine H5_INCLUDE_HL @H5_INCLUDE_HL@ /* Define if your system can convert long double to (unsigned) long long diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 0e948fe..9c585a0 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -23,9 +23,9 @@ include (CheckFortranFunctionExists) CHECK_INCLUDE_FILES(quadmath.h C_HAVE_QUADMATH) if (${C_HAVE_QUADMATH}) - set(${HDF_PREFIX}_HAVE_QUADMATH 1) + set(${HDF_PREFIX}_HAVE_QUADMATH_H 1) else () - set(${HDF_PREFIX}_HAVE_QUADMATH 0) + set(${HDF_PREFIX}_HAVE_QUADMATH_H 0) endif () # The provided CMake Fortran macros don't provide a general compile/run function @@ -425,7 +425,7 @@ set (PROG_SRC #include #define CHECK_FLOAT128 ${SIZEOF___FLOAT128} #if CHECK_FLOAT128!=0 -# if ${${HDF_PREFIX}_HAVE_QUADMATH}!=0 +# if ${${HDF_PREFIX}_HAVE_QUADMATH_H}!=0 #include # endif # ifdef FLT128_DIG diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index b0deab7..9be30f7 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -322,17 +322,12 @@ if (NOT WINDOWS OR MINGW) HDF_FUNCTION_TEST (HAVE_OFF64_T) if (${HDF_PREFIX}_HAVE_OFF64_T) CHECK_FUNCTION_EXISTS (lseek64 ${HDF_PREFIX}_HAVE_LSEEK64) - CHECK_FUNCTION_EXISTS (fseeko64 ${HDF_PREFIX}_HAVE_FSEEKO64) - CHECK_FUNCTION_EXISTS (ftello64 ${HDF_PREFIX}_HAVE_FTELLO64) - CHECK_FUNCTION_EXISTS (ftruncate64 ${HDF_PREFIX}_HAVE_FTRUNCATE64) endif () CHECK_FUNCTION_EXISTS (fseeko ${HDF_PREFIX}_HAVE_FSEEKO) - CHECK_FUNCTION_EXISTS (ftello ${HDF_PREFIX}_HAVE_FTELLO) HDF_FUNCTION_TEST (HAVE_STAT64_STRUCT) if (HAVE_STAT64_STRUCT) - CHECK_FUNCTION_EXISTS (fstat64 ${HDF_PREFIX}_HAVE_FSTAT64) CHECK_FUNCTION_EXISTS (stat64 ${HDF_PREFIX}_HAVE_STAT64) endif () endif () -- cgit v0.12 From 8f79022bc63c7eca3af66eec7c2a99585a7c5397 Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Mon, 30 Jul 2018 16:17:27 -0500 Subject: Fixed typo in H5_H5CONFIG_F_IKIND name --- config/cmake/H5pubconf.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index e4c9a2e..8403aba 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -74,7 +74,7 @@ #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@ +#cmakedefine H5_H5CONFIG_F_IKIND @H5_H5CONFIG_F_IKIND@ /* Define number of valid Fortran INTEGER KINDs */ #cmakedefine H5_H5CONFIG_F_NUM_IKIND @H5_H5CONFIG_F_NUM_IKIND@ -- cgit v0.12 From 323635f2b57e32db00c5ba27ebb8ef40f2dc5894 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 30 Jul 2018 16:31:39 -0500 Subject: HDFFV-10508 correct sizeof --- config/cmake/ConfigureChecks.cmake | 8 +++++--- config/cmake/HDF5UseFortran.cmake | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 0d955d0..a5444ef 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -167,14 +167,16 @@ endif () # Check if C has __float128 extension #----------------------------------------------------------------------------- -CHECK_TYPE_SIZE("__float128" SIZEOF___FLOAT128) -if (${HAVE_SIZEOF___FLOAT128}) +CHECK_TYPE_SIZE("__float128" ${HDF_PREFIX}_SIZEOF___FLOAT128) +if (${${HDF_PREFIX}_SIZEOF___FLOAT128}) set (${HDF_PREFIX}_HAVE_FLOAT128 1) else () set (${HDF_PREFIX}_HAVE_FLOAT128 0) - set (SIZEOF___FLOAT128 0) + set (${HDF_PREFIX}_SIZEOF___FLOAT128 0) endif () +CHECK_TYPE_SIZE("_Quad" ${HDF_PREFIX}_SIZEOF__QUAD) + #----------------------------------------------------------------------------- # Macro to determine the various conversion capabilities #----------------------------------------------------------------------------- diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 9c585a0..c7f4f8b 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -341,8 +341,8 @@ endif () 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}) +if (NOT(${${HDF_PREFIX}_SIZEOF___FLOAT128} EQUAL 0)) + if (NOT(${${HDF_PREFIX}_SIZEOF___FLOAT128} 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. @@ -423,7 +423,7 @@ set (PROG_SRC " #include #include -#define CHECK_FLOAT128 ${SIZEOF___FLOAT128} +#define CHECK_FLOAT128 ${${HDF_PREFIX}_SIZEOF___FLOAT128} #if CHECK_FLOAT128!=0 # if ${${HDF_PREFIX}_HAVE_QUADMATH_H}!=0 #include @@ -462,7 +462,7 @@ list (GET PROG_OUTPUT 1 FLT128_DIG) if (SIZEOF___FLOAT128 EQUAL 0 OR FLT128_DIG EQUAL 0) set (${HDF_PREFIX}_HAVE_FLOAT128 0) - set (SIZEOF___FLOAT128 0) + set (${HDF_PREFIX}_SIZEOF___FLOAT128 0) set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${LDBL_DIG}) else () set(${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${FLT128_DIG}) -- cgit v0.12 From d10569026367716a80329472723142026c2a641b Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Mon, 30 Jul 2018 17:01:44 -0500 Subject: Removed FORTRAN_SIZEOF_LONG_DOUBLE from public .h files --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 18ede67..ae09559 100644 --- a/configure.ac +++ b/configure.ac @@ -564,7 +564,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([HAVE_Fortran_INTEGER_SIZEOF_16]) AC_SUBST([FORTRAN_HAVE_C_LONG_DOUBLE]) AC_SUBST([FORTRAN_C_LONG_DOUBLE_IS_UNIQUE]) - AC_SUBST([FORTRAN_SIZEOF_LONG_DOUBLE]) AC_SUBST([H5CONFIG_F_NUM_RKIND]) AC_SUBST([H5CONFIG_F_RKIND]) AC_SUBST([H5CONFIG_F_RKIND_SIZEOF]) -- cgit v0.12 From 496372dc18b6cf649c3eb158fefd8ef4d83c2355 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 30 Jul 2018 17:10:00 -0500 Subject: HDFFV-10508 more config fixes --- config/cmake/ConfigureChecks.cmake | 3 +++ config/cmake/H5pubconf.h.in | 4 ++-- config/cmake/HDF5UseFortran.cmake | 2 +- config/cmake_ext_mod/HDFUseCXX.cmake | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index a5444ef..6d1e3ce 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -176,6 +176,9 @@ else () endif () CHECK_TYPE_SIZE("_Quad" ${HDF_PREFIX}_SIZEOF__QUAD) +if (NOT ${${HDF_PREFIX}_SIZEOF__QUAD}) + set (${HDF_PREFIX}_SIZEOF__QUAD 0) +endif () #----------------------------------------------------------------------------- # Macro to determine the various conversion capabilities diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 6908977..ccfe581 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -30,7 +30,7 @@ #cmakedefine H5_AC_APPLE_UNIVERSAL_BUILD @H5_AC_APPLE_UNIVERSAL_BUILD@ /* Define if C++ compiler recognizes offsetof */ -#cmakedefine H5_CXX_HAVE_OFFSETOF @H5_CXX_HAVE_OFFSETOF@ +#cmakedefine H5_CXX_HAVE_OFFSETOF @CXX_HAVE_OFFSETOF@ /* Define the default plugins path to compile */ #cmakedefine H5_DEFAULT_PLUGINDIR "@H5_DEFAULT_PLUGINDIR@" @@ -402,7 +402,7 @@ /* Define to 1 if you have the `tmpfile' function. */ #cmakedefine H5_HAVE_TMPFILE @H5_HAVE_TMPFILE@ -/* Define if tm_gmtoff is a member of `struct tm' */ +/* Define if tm_gmtoff is a member of struct tm */ #cmakedefine H5_HAVE_TM_GMTOFF @H5_HAVE_TM_GMTOFF@ /* Define to 1 if you have the header file. */ diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index c7f4f8b..1f66bad 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -460,7 +460,7 @@ string (REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}") list (GET PROG_OUTPUT 0 LDBL_DIG) list (GET PROG_OUTPUT 1 FLT128_DIG) -if (SIZEOF___FLOAT128 EQUAL 0 OR FLT128_DIG EQUAL 0) +if (${HDF_PREFIX}_SIZEOF___FLOAT128 EQUAL 0 OR FLT128_DIG EQUAL 0) set (${HDF_PREFIX}_HAVE_FLOAT128 0) set (${HDF_PREFIX}_SIZEOF___FLOAT128 0) set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${LDBL_DIG}) diff --git a/config/cmake_ext_mod/HDFUseCXX.cmake b/config/cmake_ext_mod/HDFUseCXX.cmake index 3afcdb6..f293ec5 100644 --- a/config/cmake_ext_mod/HDFUseCXX.cmake +++ b/config/cmake_ext_mod/HDFUseCXX.cmake @@ -98,11 +98,11 @@ endmacro () if (CMAKE_CXX_COMPILER_LOADED) foreach (test OLD_HEADER_FILENAME - ${HDF_PREFIX}_NO_NAMESPACE - ${HDF_PREFIX}_NO_STD + HDF_NO_NAMESPACE + HDF_NO_STD BOOL_NOTDEFINED NO_STATIC_CAST - ${HDF_PREFIX}_CXX_HAVE_OFFSETOF + CXX_HAVE_OFFSETOF ) HDF_CXX_FUNCTION_TEST (${test}) endforeach () -- cgit v0.12 From b8945eac22af04537ee3794b3bd518d261eb644a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 31 Jul 2018 09:28:17 -0500 Subject: HDFFV-10508 spelling and grammer --- release_docs/INSTALL_CMake.txt | 2 +- release_docs/RELEASE.txt | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 0a697f8..708e713 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -645,7 +645,7 @@ endif () NOTE: The BUILD_STATIC_EXECS ("Build Static Executables") option is only valid - on some unix operating system. It adds the "-static" flag to cflags. This + on some unix operating systems. It adds the "-static" flag to cflags. This flag is not available on windows and some modern linux systems will ignore the flag. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index bbef7f9..34cb212 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -536,13 +536,12 @@ the include folder. The lib folder contains the library files, and CMake adds the pkgconfig subfolder with the hdf5*.pc files used by the bin/build scripts created by -the CMake build. CMake uses links to the main library file, while autotools -builds copies library files. In addition, because CMake creates the tools +the CMake build. In addition, because CMake creates the tools library and the C-stub libraries for the Fortran libraries, these libraries -are present only for CMake builds. The names of the szip libaries are different +are present only for CMake builds. The names of the szip libraries are different between the build systems. The share folder will have the most differences because CMake builds include -a number of CMake specific files for support of CMakes find_package and support +a number of CMake specific files for support of CMake's find_package and support for the HDF5 Examples CMake project. -- cgit v0.12 From 2822921c23c5e34b7d73044a6800808629349d3d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 31 Jul 2018 09:41:11 -0500 Subject: HDFFV-10508 clarify library differences --- release_docs/RELEASE.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 34cb212..d70aa65 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -522,7 +522,9 @@ COPYING and RELEASE.txt file in the root folder, CMake places them in the share folder. The bin folder contains the tools and the build scripts. Additionally, CMake -creates dynamic versions of the tools with the suffix "-shared". +creates dynamic versions of the tools with the suffix "-shared". Autotools +installs one set of tools depending on the "--enable-shared" configuration +option. build scripts ------------- Autotools: h5c++, h5cc, h5fc @@ -531,15 +533,15 @@ creates dynamic versions of the tools with the suffix "-shared". The include folder holds the header files and the fortran mod files. CMake places the fortran mod files into separate shared and static subfolders, while Autotools places one set of mod files into the include folder. Because -Cmake produces a tools library, the header files for tools will appear in +CMake produces a tools library, the header files for tools will appear in the include folder. The lib folder contains the library files, and CMake adds the pkgconfig subfolder with the hdf5*.pc files used by the bin/build scripts created by -the CMake build. In addition, because CMake creates the tools -library and the C-stub libraries for the Fortran libraries, these libraries -are present only for CMake builds. The names of the szip libraries are different -between the build systems. +the CMake build. CMake separates the C interface code from the fortran code by +creating C-stub libraries for each Fortran library. In addition, only CMake +creates the tools library and are present only for CMake builds. The names +of the szip libraries are different between the build systems. The share folder will have the most differences because CMake builds include a number of CMake specific files for support of CMake's find_package and support -- cgit v0.12 From 77cb2dca17bf739fe8cf0979793bb0f00347a692 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 31 Jul 2018 09:56:12 -0500 Subject: HDFFV-10508 rework sentence --- release_docs/RELEASE.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index d70aa65..b40f8ed 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -540,8 +540,8 @@ The lib folder contains the library files, and CMake adds the pkgconfig subfolder with the hdf5*.pc files used by the bin/build scripts created by the CMake build. CMake separates the C interface code from the fortran code by creating C-stub libraries for each Fortran library. In addition, only CMake -creates the tools library and are present only for CMake builds. The names -of the szip libraries are different between the build systems. +installs the tools library. The names of the szip libraries are different +between the build systems. The share folder will have the most differences because CMake builds include a number of CMake specific files for support of CMake's find_package and support -- cgit v0.12 From 5e138dc1e91a4ec61d9383397e0e11c6bbbcbe5e Mon Sep 17 00:00:00 2001 From: Jordan Henderson Date: Tue, 31 Jul 2018 10:45:43 -0500 Subject: Add hdf5settings section for parallel compression status in CMake builds --- CMakeLists.txt | 2 ++ config/cmake/libhdf5.settings.cmake.in | 35 +++++++++++++++++----------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74c7095..0302f4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -561,11 +561,13 @@ if (HDF5_ENABLE_PARALLEL) CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info) # Used by Parallel Compression feature + set (PARALLEL_FILTERED_WRITES ON) CHECK_SYMBOL_EXISTS (MPI_Mprobe "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_Mprobe) CHECK_SYMBOL_EXISTS (MPI_Imrecv "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_Imrecv) if (NOT H5_HAVE_MPI_Mprobe OR NOT H5_HAVE_MPI_Imrecv) message (WARNING "The MPI_Mprobe and/or MPI_Imrecv functions could not be located. Parallel writes of filtered data will be disabled.") + set (PARALLEL_FILTERED_WRITES OFF) endif () else () message (STATUS "Parallel libraries not found") diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in index 891e3a7..8c0de97 100644 --- a/config/cmake/libhdf5.settings.cmake.in +++ b/config/cmake/libhdf5.settings.cmake.in @@ -64,20 +64,21 @@ Languages: Features: --------- - Parallel HDF5: @HDF5_ENABLE_PARALLEL@ - High-level library: @HDF5_BUILD_HL_LIB@ - Threadsafety: @HDF5_ENABLE_THREADSAFE@ - Default API mapping: @DEFAULT_API_VERSION@ - With deprecated public symbols: @HDF5_ENABLE_DEPRECATED_SYMBOLS@ - I/O filters (external): @EXTERNAL_FILTERS@ - MPE: @H5_HAVE_LIBLMPE@ - Direct VFD: @H5_HAVE_DIRECT@ - dmalloc: @H5_HAVE_LIBDMALLOC@ - Packages w/ extra debug output: @INTERNAL_DEBUG_OUTPUT@ - API Tracing: @HDF5_ENABLE_TRACE@ - Using memory checker: @HDF5_ENABLE_USING_MEMCHECKER@ -Memory allocation sanity checks: @HDF5_MEMORY_ALLOC_SANITY_CHECK@ - Metadata trace file: @METADATATRACEFILE@ - Function Stack Tracing: @HDF5_ENABLE_CODESTACK@ - Strict File Format Checks: @HDF5_STRICT_FORMAT_CHECKS@ - Optimization Instrumentation: @HDF5_Enable_Instrument@ + Parallel HDF5: @HDF5_ENABLE_PARALLEL@ +Parallel Filtered Dataset Writes: @PARALLEL_FILTERED_WRITES@ + High-level library: @HDF5_BUILD_HL_LIB@ + Threadsafety: @HDF5_ENABLE_THREADSAFE@ + Default API mapping: @DEFAULT_API_VERSION@ + With deprecated public symbols: @HDF5_ENABLE_DEPRECATED_SYMBOLS@ + I/O filters (external): @EXTERNAL_FILTERS@ + MPE: @H5_HAVE_LIBLMPE@ + Direct VFD: @H5_HAVE_DIRECT@ + dmalloc: @H5_HAVE_LIBDMALLOC@ + Packages w/ extra debug output: @INTERNAL_DEBUG_OUTPUT@ + API Tracing: @HDF5_ENABLE_TRACE@ + Using memory checker: @HDF5_ENABLE_USING_MEMCHECKER@ + Memory allocation sanity checks: @HDF5_MEMORY_ALLOC_SANITY_CHECK@ + Metadata trace file: @METADATATRACEFILE@ + Function Stack Tracing: @HDF5_ENABLE_CODESTACK@ + Strict File Format Checks: @HDF5_STRICT_FORMAT_CHECKS@ + Optimization Instrumentation: @HDF5_Enable_Instrument@ -- cgit v0.12 From 9aa2eaeb9ed9c94f63973cb55f13de256558497c Mon Sep 17 00:00:00 2001 From: Jordan Henderson Date: Tue, 31 Jul 2018 13:42:19 -0500 Subject: Add Autotools and CMake checks for big I/O MPI-3 functions --- CMakeLists.txt | 10 ++++++++++ config/cmake/libhdf5.settings.cmake.in | 1 + configure.ac | 32 ++++++++++++++++++++++++++++++++ src/libhdf5.settings.in | 1 + 4 files changed, 44 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0302f4f..40f8eb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -569,6 +569,16 @@ if (HDF5_ENABLE_PARALLEL) Parallel writes of filtered data will be disabled.") set (PARALLEL_FILTERED_WRITES OFF) endif () + + # Used by big I/O feature + set (LARGE_PARALLEL_IO ON) + CHECK_SYMBOL_EXISTS (MPI_Get_elements_x "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_Get_elements_x) + CHECK_SYMBOL_EXISTS (MPI_Type_size_x "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_Type_size_x) + if (NOT H5_HAVE_MPI_Get_elements_x OR NOT H5_HAVE_MPI_Type_size_x) + message (WARNING "The MPI_Get_elements_x and/or MPI_Type_size_x functions could not be located. + Reading/Writing >2GB of data in a single parallel I/O operation will be disabled.") + set (LARGE_PARALLEL_IO OFF) + endif () else () message (STATUS "Parallel libraries not found") endif () diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in index 8c0de97..6a489e7 100644 --- a/config/cmake/libhdf5.settings.cmake.in +++ b/config/cmake/libhdf5.settings.cmake.in @@ -66,6 +66,7 @@ Features: --------- Parallel HDF5: @HDF5_ENABLE_PARALLEL@ Parallel Filtered Dataset Writes: @PARALLEL_FILTERED_WRITES@ + Large Parallel I/O: @LARGE_PARALLEL_IO@ High-level library: @HDF5_BUILD_HL_LIB@ Threadsafety: @HDF5_ENABLE_THREADSAFE@ Default API mapping: @DEFAULT_API_VERSION@ diff --git a/configure.ac b/configure.ac index 5dc965e..f7262f5 100644 --- a/configure.ac +++ b/configure.ac @@ -2533,6 +2533,7 @@ AC_SUBST([ADD_PARALLEL_FILES]) ADD_PARALLEL_FILES="no" AC_SUBST([MPE]) MPE=no AC_SUBST([INSTRUMENT_LIBRARY]) INSTRUMENT_LIBRARY=no AC_SUBST([PARALLEL_FILTERED_WRITES]) +AC_SUBST([LARGE_PARALLEL_IO]) if test -n "$PARALLEL"; then ## The 'testpar' directory should participate in the build @@ -2715,6 +2716,34 @@ if test -n "$PARALLEL"; then Parallel writes of filtered data will be disabled.]) PARALLEL_FILTERED_WRITES=no] ) + + ## ---------------------------------------------------------------------- + ## Check for the MPI-3 functions necessary for the big I/O feature. + ## If these are not present, issue a warning that the big I/O feature + ## will be disabled. + ## + AC_MSG_CHECKING([for MPI_Get_elements_x and MPI_Type_size_x functions]) + + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include + ]], + [[ + MPI_Count count; + MPI_Init(0, (void *) 0); + MPI_Get_elements_x(0, 0, &count); + MPI_Type_size_x(0, &count); + ]] + )], + [AC_MSG_RESULT([yes]) + LARGE_PARALLEL_IO=yes], + [AC_MSG_RESULT([no]) + AC_MSG_WARN([A simple MPI program using the MPI_Get_elements_x and MPI_Type_size_x functions could not be compiled and linked. + Reading/Writing >2GB of data in a single parallel I/O operation will be disabled.]) + LARGE_PARALLEL_IO=no] + ) + fi ## ---------------------------------------------------------------------- @@ -3008,6 +3037,9 @@ PARALLEL=${PARALLEL:-no} ## Parallel writes to filtered datasets support? PARALLEL_FILTERED_WRITES=${PARALLEL_FILTERED_WRITES:-no} +## >2GB writes in parallel support? +LARGE_PARALLEL_IO=${LARGE_PARALLEL_IO:-no} + ## Compiler with version information. This consists of the full path ## name of the compiler and the reported version number. AC_SUBST([CC_VERSION]) diff --git a/src/libhdf5.settings.in b/src/libhdf5.settings.in index 61fa1eb..531cd00 100644 --- a/src/libhdf5.settings.in +++ b/src/libhdf5.settings.in @@ -69,6 +69,7 @@ Features: --------- Parallel HDF5: @PARALLEL@ Parallel Filtered Dataset Writes: @PARALLEL_FILTERED_WRITES@ + Large Parallel I/O: @LARGE_PARALLEL_IO@ High-level library: @HDF5_HL@ Threadsafety: @THREADSAFE@ Default API mapping: @DEFAULT_API_VERSION@ -- cgit v0.12 From 2c17b198612cfcb11038f4896f439e6e43aca29b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 2 Aug 2018 10:22:37 -0500 Subject: Set CMAKE_REQUIRED_INCLUDES instead of using path in call --- CMakeLists.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd69fb2..02819ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -555,15 +555,16 @@ if (HDF5_ENABLE_PARALLEL) 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}" ) + set (CMAKE_REQUIRED_LIBRARIES "${MPI_C_LIBRARIES}") + set (CMAKE_REQUIRED_INCLUDES "${MPI_C_INCLUDE_DIRS}") # 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) + CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm) + CHECK_SYMBOL_EXISTS (MPI_Info_c2f "mpi.h" H5_HAVE_MPI_MULTI_LANG_Info) # Used by Parallel Compression feature set (PARALLEL_FILTERED_WRITES ON) - CHECK_SYMBOL_EXISTS (MPI_Mprobe "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_Mprobe) - CHECK_SYMBOL_EXISTS (MPI_Imrecv "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_Imrecv) + CHECK_SYMBOL_EXISTS (MPI_Mprobe "/mpi.h" H5_HAVE_MPI_Mprobe) + CHECK_SYMBOL_EXISTS (MPI_Imrecv "mpi.h" H5_HAVE_MPI_Imrecv) if (NOT H5_HAVE_MPI_Mprobe OR NOT H5_HAVE_MPI_Imrecv) message (WARNING "The MPI_Mprobe and/or MPI_Imrecv functions could not be located. Parallel writes of filtered data will be disabled.") @@ -572,8 +573,8 @@ if (HDF5_ENABLE_PARALLEL) # Used by big I/O feature set (LARGE_PARALLEL_IO ON) - CHECK_SYMBOL_EXISTS (MPI_Get_elements_x "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_Get_elements_x) - CHECK_SYMBOL_EXISTS (MPI_Type_size_x "${MPI_C_INCLUDE_DIRS}/mpi.h" H5_HAVE_MPI_Type_size_x) + CHECK_SYMBOL_EXISTS (MPI_Get_elements_x "mpi.h" H5_HAVE_MPI_Get_elements_x) + CHECK_SYMBOL_EXISTS (MPI_Type_size_x "mpi.h" H5_HAVE_MPI_Type_size_x) if (NOT H5_HAVE_MPI_Get_elements_x OR NOT H5_HAVE_MPI_Type_size_x) message (WARNING "The MPI_Get_elements_x and/or MPI_Type_size_x functions could not be located. Reading/Writing >2GB of data in a single parallel I/O operation will be disabled.") -- cgit v0.12 From b4571f619018f428569cbae5d025935ac5f1788e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 2 Aug 2018 10:38:54 -0500 Subject: Typo fix --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 02819ee..eb860d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -563,7 +563,7 @@ if (HDF5_ENABLE_PARALLEL) # Used by Parallel Compression feature set (PARALLEL_FILTERED_WRITES ON) - CHECK_SYMBOL_EXISTS (MPI_Mprobe "/mpi.h" H5_HAVE_MPI_Mprobe) + CHECK_SYMBOL_EXISTS (MPI_Mprobe "mpi.h" H5_HAVE_MPI_Mprobe) CHECK_SYMBOL_EXISTS (MPI_Imrecv "mpi.h" H5_HAVE_MPI_Imrecv) if (NOT H5_HAVE_MPI_Mprobe OR NOT H5_HAVE_MPI_Imrecv) message (WARNING "The MPI_Mprobe and/or MPI_Imrecv functions could not be located. -- cgit v0.12 From 762c14fde587f2ff4f9b9cdaa6b2232a481edde4 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Sun, 5 Aug 2018 11:12:39 -0500 Subject: Improve error handling of exceptions --- java/src/jni/exceptionImp.c | 5 +++ java/src/jni/h5aImp.c | 12 ++++--- java/src/jni/h5eImp.c | 8 +++-- java/src/jni/h5lImp.c | 8 +++-- java/src/jni/h5oImp.c | 87 +++++++++++++++++++++++++++------------------ 5 files changed, 77 insertions(+), 43 deletions(-) diff --git a/java/src/jni/exceptionImp.c b/java/src/jni/exceptionImp.c index afad5d5..ded632d 100644 --- a/java/src/jni/exceptionImp.c +++ b/java/src/jni/exceptionImp.c @@ -83,9 +83,14 @@ typedef struct H5E_num_t { } \ jm = ENVPTR->GetMethodID(ENVPAR jc, "", "(Ljava/lang/String;)V"); \ if (jm == NULL) { \ + printf("FATAL ERROR: GetMethodID failed\n"); \ return JNI_FALSE; \ } \ ex = ENVPTR->NewObjectA (ENVPAR jc, jm, (jvalue*)(args)); \ + if (ex == NULL) { \ + printf("FATAL ERROR: Creation failed\n"); \ + return JNI_FALSE; \ + } \ if (ENVPTR->Throw(ENVPAR (jthrowable)ex) < 0) { \ printf("FATAL ERROR: %s: Throw failed\n", (className)); \ return JNI_FALSE; \ diff --git a/java/src/jni/h5aImp.c b/java/src/jni/h5aImp.c index 13f5207..437f25f 100644 --- a/java/src/jni/h5aImp.c +++ b/java/src/jni/h5aImp.c @@ -966,7 +966,7 @@ Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1idx UNPIN_JAVA_STRING(obj_name, aName); if (status < 0) { - h5libraryError(env); + h5libraryError(env); } /* end if */ else { args[0].z = ainfo.corder_valid; @@ -1002,7 +1002,7 @@ Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1name UNPIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName); if (status < 0) { - h5libraryError(env); + h5libraryError(env); } /* end if */ else { args[0].z = ainfo.corder_valid; @@ -1166,8 +1166,12 @@ H5A_iterate_cb constructor = CBENVPTR->GetMethodID(CBENVPAR cls, "", "(ZJIJ)V"); if (constructor != 0) { cb_info_t = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); - - status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, g_id, str, cb_info_t, op_data); + if (cb_info_t == NULL) { + printf("FATAL ERROR: Creation failed\n"); + } + else { + status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, g_id, str, cb_info_t, op_data); + } } /* end if (constructor != 0) */ } /* end if (cls != 0) */ } /* end if (mid != 0) */ diff --git a/java/src/jni/h5eImp.c b/java/src/jni/h5eImp.c index 24ddcbc..df7e35f 100644 --- a/java/src/jni/h5eImp.c +++ b/java/src/jni/h5eImp.c @@ -508,8 +508,12 @@ H5E_walk_cb constructor = CBENVPTR->GetMethodID(CBENVPAR cls, "", "(JJJILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); if (constructor != 0) { cb_info_t = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); - - status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, nindx, cb_info_t, op_data); + if (cb_info_t == NULL) { + printf("FATAL ERROR: Creation failed\n"); + } + else { + status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, nindx, cb_info_t, op_data); + } } /* end if (constructor != 0) */ } /* end if(cls != 0) */ } /* end if (mid != 0) */ diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c index ac71845..7391490 100644 --- a/java/src/jni/h5lImp.c +++ b/java/src/jni/h5lImp.c @@ -574,8 +574,12 @@ H5L_iterate_cb constructor = CBENVPTR->GetMethodID(CBENVPAR cls, "", "(IZJIJ)V"); if (constructor != 0) { cb_info_t = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); - - status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, g_id, str, cb_info_t, op_data); + if (cb_info_t == NULL) { + printf("FATAL ERROR: Creation failed\n"); + } + else { + status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, g_id, str, cb_info_t, op_data); + } } /* end if */ } /* end if */ } /* end if */ diff --git a/java/src/jni/h5oImp.c b/java/src/jni/h5oImp.c index 7665c70..b7bcdb6 100644 --- a/java/src/jni/h5oImp.c +++ b/java/src/jni/h5oImp.c @@ -372,41 +372,58 @@ H5O_iterate_cb constructor = CBENVPTR->GetMethodID(CBENVPAR cls, "", "(IIIIJJJJJJ)V"); if (constructor != 0) { hdrinfobuf = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); - - args[0].j = (jlong)info->meta_size.obj.index_size; - args[1].j = (jlong)info->meta_size.obj.heap_size; - // get a reference to the H5_ih_info_t class - cls = CBENVPTR->FindClass(CBENVPAR "hdf/hdf5lib/structs/H5_ih_info_t"); - if (cls != 0) { - // get a reference to the constructor; the name is - constructor = CBENVPTR->GetMethodID(CBENVPAR cls, "", "(JJ)V"); - if (constructor != 0) { - ihinfobuf1 = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); - args[0].j = (jlong)info->meta_size.attr.index_size; - args[1].j = (jlong)info->meta_size.attr.heap_size; - ihinfobuf2 = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); - - args[0].j = (jlong)info->fileno; - args[1].j = (jlong)info->addr; - args[2].i = info->type; - args[3].i = (jint)info->rc; - args[4].j = (jlong)info->num_attrs; - args[5].j = info->atime; - args[6].j = info->mtime; - args[7].j = info->ctime; - args[8].j = info->btime; - args[9].l = hdrinfobuf; - args[10].l = ihinfobuf1; - args[11].l = ihinfobuf2; - // get a reference to the H5O_info_t class - cls = CBENVPTR->FindClass(CBENVPAR "hdf/hdf5lib/structs/H5O_info_t"); - if (cls != 0) { - // get a reference to the constructor; the name is - constructor = CBENVPTR->GetMethodID(CBENVPAR cls, "", "(JJIIJJJJJLhdf/hdf5lib/structs/H5O_hdr_info_t;Lhdf/hdf5lib/structs/H5_ih_info_t;Lhdf/hdf5lib/structs/H5_ih_info_t;)V"); - if (constructor != 0) { - cb_info_t = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); - - status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, g_id, str, cb_info_t, op_data); + if (ihinfobuf2 == NULL) { + printf("FATAL ERROR: Creation failed\n"); + } + else { + args[0].j = (jlong)info->meta_size.obj.index_size; + args[1].j = (jlong)info->meta_size.obj.heap_size; + // get a reference to the H5_ih_info_t class + cls = CBENVPTR->FindClass(CBENVPAR "hdf/hdf5lib/structs/H5_ih_info_t"); + if (cls != 0) { + // get a reference to the constructor; the name is + constructor = CBENVPTR->GetMethodID(CBENVPAR cls, "", "(JJ)V"); + if (constructor != 0) { + ihinfobuf1 = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); + if (ihinfobuf1 == NULL) { + printf("FATAL ERROR: Creation failed\n"); + } + else { + args[0].j = (jlong)info->meta_size.attr.index_size; + args[1].j = (jlong)info->meta_size.attr.heap_size; + ihinfobuf2 = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); + if (ihinfobuf2 == NULL) { + printf("FATAL ERROR: Creation failed\n"); + } + else { + args[0].j = (jlong)info->fileno; + args[1].j = (jlong)info->addr; + args[2].i = info->type; + args[3].i = (jint)info->rc; + args[4].j = (jlong)info->num_attrs; + args[5].j = info->atime; + args[6].j = info->mtime; + args[7].j = info->ctime; + args[8].j = info->btime; + args[9].l = hdrinfobuf; + args[10].l = ihinfobuf1; + args[11].l = ihinfobuf2; + // get a reference to the H5O_info_t class + cls = CBENVPTR->FindClass(CBENVPAR "hdf/hdf5lib/structs/H5O_info_t"); + if (cls != 0) { + // get a reference to the constructor; the name is + constructor = CBENVPTR->GetMethodID(CBENVPAR cls, "", "(JJIIJJJJJLhdf/hdf5lib/structs/H5O_hdr_info_t;Lhdf/hdf5lib/structs/H5_ih_info_t;Lhdf/hdf5lib/structs/H5_ih_info_t;)V"); + if (constructor != 0) { + cb_info_t = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); + if (cb_info_t == NULL) { + printf("FATAL ERROR: Creation failed\n"); + } + else { + status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, g_id, str, cb_info_t, op_data); + } + } + } + } } } } -- cgit v0.12 From ca7d4f85a5054fc406e62ccb009169e139f0105c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 6 Aug 2018 09:15:08 -0500 Subject: HDFFV-10544 exception variable as local class --- .../hdf5lib/exceptions/HDF5LibraryException.java | 23 +++++++++++++++++----- java/src/jni/exceptionImp.c | 12 +++++------ java/src/jni/exceptionImp.h | 8 ++++---- 3 files changed, 28 insertions(+), 15 deletions(-) diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java index 5ae977d..ad5c2ab 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java @@ -30,6 +30,9 @@ import hdf.hdf5lib.HDF5Constants; @SuppressWarnings("serial") public class HDF5LibraryException extends HDF5Exception { + private final long majorErrorNumber; + private final long minorErrorNumber; + /** * Constructs an HDF5LibraryException with no specified detail * message. @@ -44,9 +47,10 @@ public class HDF5LibraryException extends HDF5Exception { } catch (Exception e) { } - ; - detailMessage = getMinorError(getMinorErrorNumber()); + this.majorErrorNumber = _getMajorErrorNumber(); + this.minorErrorNumber = _getMinorErrorNumber(); + detailMessage = getMinorError(minorErrorNumber()); } /** @@ -65,7 +69,8 @@ public class HDF5LibraryException extends HDF5Exception { } catch (Exception e) { } - ; + this.majorErrorNumber = _getMajorErrorNumber(); + this.minorErrorNumber = _getMinorErrorNumber(); } /** @@ -74,7 +79,11 @@ public class HDF5LibraryException extends HDF5Exception { * * @return the major error number */ - public native long getMajorErrorNumber(); + public native long getMajorErrorNumber() + { + return majorErrorNumber; + } + private native long _getMajorErrorNumber(); /** * Get the minor error number of the first error on the HDF5 library error @@ -82,7 +91,11 @@ public class HDF5LibraryException extends HDF5Exception { * * @return the minor error number */ - public native long getMinorErrorNumber(); + public native long getMinorErrorNumber() + { + return minorErrorNumber; + } + private native long _getMinorErrorNumber(); /** * Return a error message for the minor error number. diff --git a/java/src/jni/exceptionImp.c b/java/src/jni/exceptionImp.c index ded632d..e122eb2 100644 --- a/java/src/jni/exceptionImp.c +++ b/java/src/jni/exceptionImp.c @@ -179,13 +179,13 @@ Java_hdf_hdf5lib_exceptions_HDF5LibraryException_printStackTrace0 /* * Class: hdf_hdf5lib_exceptions_HDFLibraryException - * Method: getMajorErrorNumber + * Method: _getMajorErrorNumber * Signature: ()J * * Extract the HDF-5 major error number from the HDF-5 error stack. */ JNIEXPORT jlong JNICALL -Java_hdf_hdf5lib_exceptions_HDF5LibraryException_getMajorErrorNumber +Java_hdf_hdf5lib_exceptions_HDF5LibraryException__1getMajorErrorNumber (JNIEnv *env, jobject obj) { H5E_num_t err_nums; @@ -195,17 +195,17 @@ Java_hdf_hdf5lib_exceptions_HDF5LibraryException_getMajorErrorNumber H5Ewalk2(H5E_DEFAULT, H5E_WALK_DOWNWARD, walk_error_callback, &err_nums); return err_nums.maj_num; -} /* end Java_hdf_hdf5lib_exceptions_HDF5LibraryException_getMajorErrorNumber() */ +} /* end Java_hdf_hdf5lib_exceptions_HDF5LibraryException__1getMajorErrorNumber() */ /* * Class: hdf_hdf5lib_exceptions_HDFLibraryException - * Method: getMinorErrorNumber + * Method: _getMinorErrorNumber * Signature: ()J * * Extract the HDF-5 minor error number from the HDF-5 error stack. */ JNIEXPORT jlong JNICALL -Java_hdf_hdf5lib_exceptions_HDF5LibraryException_getMinorErrorNumber +Java_hdf_hdf5lib_exceptions_HDF5LibraryException__1getMinorErrorNumber (JNIEnv *env, jobject obj) { H5E_num_t err_nums; @@ -215,7 +215,7 @@ Java_hdf_hdf5lib_exceptions_HDF5LibraryException_getMinorErrorNumber H5Ewalk2(H5E_DEFAULT, H5E_WALK_DOWNWARD, walk_error_callback, &err_nums); return err_nums.min_num; -} /* end Java_hdf_hdf5lib_exceptions_HDF5LibraryException_getMinorErrorNumber() */ +} /* end Java_hdf_hdf5lib_exceptions_HDF5LibraryException__1getMinorErrorNumber() */ /* * Routine to raise particular Java exceptions from C diff --git a/java/src/jni/exceptionImp.h b/java/src/jni/exceptionImp.h index 423e537..5873202 100644 --- a/java/src/jni/exceptionImp.h +++ b/java/src/jni/exceptionImp.h @@ -55,20 +55,20 @@ Java_hdf_hdf5lib_exceptions_HDF5LibraryException_printStackTrace0 /* * Class: hdf_hdf5lib_exceptions_HDFLibraryException - * Method: getMajorErrorNumber + * Method: _getMajorErrorNumber * Signature: ()J */ JNIEXPORT jlong JNICALL -Java_hdf_hdf5lib_exceptions_HDF5LibraryException_getMajorErrorNumber +Java_hdf_hdf5lib_exceptions_HDF5LibraryException__1getMajorErrorNumber (JNIEnv *env, jobject obj); /* * Class: hdf_hdf5lib_exceptions_HDFLibraryException - * Method: getMinorErrorNumber + * Method: _getMinorErrorNumber * Signature: ()J */ JNIEXPORT jlong JNICALL -Java_hdf_hdf5lib_exceptions_HDF5LibraryException_getMinorErrorNumber +Java_hdf_hdf5lib_exceptions_HDF5LibraryException__1getMinorErrorNumber (JNIEnv *env, jobject obj); #ifdef __cplusplus -- cgit v0.12 From 2f4832fe09e85d8ef083c50caa9b50913cdb5400 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 6 Aug 2018 09:23:21 -0500 Subject: HDFFV-10544 add class name to error text --- java/src/jni/exceptionImp.c | 2 +- java/src/jni/h5aImp.c | 2 +- java/src/jni/h5eImp.c | 2 +- java/src/jni/h5lImp.c | 2 +- java/src/jni/h5oImp.c | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/java/src/jni/exceptionImp.c b/java/src/jni/exceptionImp.c index e122eb2..69f8dde 100644 --- a/java/src/jni/exceptionImp.c +++ b/java/src/jni/exceptionImp.c @@ -88,7 +88,7 @@ typedef struct H5E_num_t { } \ ex = ENVPTR->NewObjectA (ENVPAR jc, jm, (jvalue*)(args)); \ if (ex == NULL) { \ - printf("FATAL ERROR: Creation failed\n"); \ + printf("FATAL ERROR: %s: Creation failed\n", (className)); \ return JNI_FALSE; \ } \ if (ENVPTR->Throw(ENVPAR (jthrowable)ex) < 0) { \ diff --git a/java/src/jni/h5aImp.c b/java/src/jni/h5aImp.c index 437f25f..c0dc182 100644 --- a/java/src/jni/h5aImp.c +++ b/java/src/jni/h5aImp.c @@ -1167,7 +1167,7 @@ H5A_iterate_cb if (constructor != 0) { cb_info_t = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); if (cb_info_t == NULL) { - printf("FATAL ERROR: Creation failed\n"); + printf("FATAL ERROR: hdf/hdf5lib/structs/H5A_info_t: Creation failed\n"); } else { status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, g_id, str, cb_info_t, op_data); diff --git a/java/src/jni/h5eImp.c b/java/src/jni/h5eImp.c index df7e35f..10a02b0 100644 --- a/java/src/jni/h5eImp.c +++ b/java/src/jni/h5eImp.c @@ -509,7 +509,7 @@ H5E_walk_cb if (constructor != 0) { cb_info_t = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); if (cb_info_t == NULL) { - printf("FATAL ERROR: Creation failed\n"); + printf("FATAL ERROR: hdf/hdf5lib/structs/H5E_error2_t: Creation failed\n"); } else { status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, nindx, cb_info_t, op_data); diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c index 7391490..f1734fd 100644 --- a/java/src/jni/h5lImp.c +++ b/java/src/jni/h5lImp.c @@ -575,7 +575,7 @@ H5L_iterate_cb if (constructor != 0) { cb_info_t = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); if (cb_info_t == NULL) { - printf("FATAL ERROR: Creation failed\n"); + printf("FATAL ERROR: hdf/hdf5lib/structs/H5L_info_t: Creation failed\n"); } else { status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, g_id, str, cb_info_t, op_data); diff --git a/java/src/jni/h5oImp.c b/java/src/jni/h5oImp.c index b7bcdb6..3b4c068 100644 --- a/java/src/jni/h5oImp.c +++ b/java/src/jni/h5oImp.c @@ -373,7 +373,7 @@ H5O_iterate_cb if (constructor != 0) { hdrinfobuf = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); if (ihinfobuf2 == NULL) { - printf("FATAL ERROR: Creation failed\n"); + printf("FATAL ERROR: hdf/hdf5lib/structs/H5O_hdr_info_t: Creation failed\n"); } else { args[0].j = (jlong)info->meta_size.obj.index_size; @@ -386,14 +386,14 @@ H5O_iterate_cb if (constructor != 0) { ihinfobuf1 = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); if (ihinfobuf1 == NULL) { - printf("FATAL ERROR: Creation failed\n"); + printf("FATAL ERROR: hdf/hdf5lib/structs/H5_ih_info_t: Creation failed\n"); } else { args[0].j = (jlong)info->meta_size.attr.index_size; args[1].j = (jlong)info->meta_size.attr.heap_size; ihinfobuf2 = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); if (ihinfobuf2 == NULL) { - printf("FATAL ERROR: Creation failed\n"); + printf("FATAL ERROR: hdf/hdf5lib/structs/H5_ih_info_t: Creation failed\n"); } else { args[0].j = (jlong)info->fileno; @@ -416,7 +416,7 @@ H5O_iterate_cb if (constructor != 0) { cb_info_t = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); if (cb_info_t == NULL) { - printf("FATAL ERROR: Creation failed\n"); + printf("FATAL ERROR: hdf/hdf5lib/structs/H5O_info_t: Creation failed\n"); } else { status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, g_id, str, cb_info_t, op_data); -- cgit v0.12 From 565ee9e7f927b95cdfcd3a157eaeeb1f609bc70b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 6 Aug 2018 09:39:44 -0500 Subject: HDFFV-10544 add release note --- release_docs/RELEASE.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index b40f8ed..531b60c 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -163,6 +163,20 @@ Bug Fixes since HDF5-1.10.2 release Library ------- + - Java HDF5LibraryException class + + The error minor and major values would be lost after the + constructor executed. + + Created two local class variables to hold the values obtained during + execution of the constructor. Refactored the class functions to retrieve + the class values rather then calling the native functions. + The native functions were renamed and called only during execution + of the constructor. + Added error checking to calling class constructors in JNI classes. + + (ADB - 2018/08/06, HDFFV-10544) + - H5Adelete H5Adelete failed when deleting the last "large" attribute that -- cgit v0.12 From 9efb9b7426cbee4a2554f8f183fe8d790b5543b5 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 6 Aug 2018 09:44:41 -0500 Subject: HDFFV-10544 correct typo --- java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java index ad5c2ab..22bfe91 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java @@ -50,7 +50,7 @@ public class HDF5LibraryException extends HDF5Exception { this.majorErrorNumber = _getMajorErrorNumber(); this.minorErrorNumber = _getMinorErrorNumber(); - detailMessage = getMinorError(minorErrorNumber()); + detailMessage = getMinorError(minorErrorNumber); } /** -- cgit v0.12 From 4d5255106cc35f1bb171ee6a67c2da6123163d32 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 6 Aug 2018 09:56:01 -0500 Subject: HDFFV-10544 remove native from class function --- java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java index 22bfe91..3a1361a 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java @@ -79,7 +79,7 @@ public class HDF5LibraryException extends HDF5Exception { * * @return the major error number */ - public native long getMajorErrorNumber() + public long getMajorErrorNumber() { return majorErrorNumber; } @@ -91,7 +91,7 @@ public class HDF5LibraryException extends HDF5Exception { * * @return the minor error number */ - public native long getMinorErrorNumber() + public long getMinorErrorNumber() { return minorErrorNumber; } -- cgit v0.12 From 6e4c036d5dc476396428f4b044e23043a80e8df7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 6 Aug 2018 11:00:28 -0500 Subject: HDFFV-10544 Correct var name --- java/src/jni/h5oImp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/java/src/jni/h5oImp.c b/java/src/jni/h5oImp.c index 3b4c068..6093e46 100644 --- a/java/src/jni/h5oImp.c +++ b/java/src/jni/h5oImp.c @@ -372,8 +372,8 @@ H5O_iterate_cb constructor = CBENVPTR->GetMethodID(CBENVPAR cls, "", "(IIIIJJJJJJ)V"); if (constructor != 0) { hdrinfobuf = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); - if (ihinfobuf2 == NULL) { - printf("FATAL ERROR: hdf/hdf5lib/structs/H5O_hdr_info_t: Creation failed\n"); + if (hdrinfobuf == NULL) { + printf("H5O_iterate_cb ERROR: hdf/hdf5lib/structs/H5O_hdr_info_t: Creation failed\n"); } else { args[0].j = (jlong)info->meta_size.obj.index_size; @@ -386,14 +386,14 @@ H5O_iterate_cb if (constructor != 0) { ihinfobuf1 = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); if (ihinfobuf1 == NULL) { - printf("FATAL ERROR: hdf/hdf5lib/structs/H5_ih_info_t: Creation failed\n"); + printf("H5O_iterate_cb ERROR: hdf/hdf5lib/structs/H5_ih_info_t: Creation failed\n"); } else { args[0].j = (jlong)info->meta_size.attr.index_size; args[1].j = (jlong)info->meta_size.attr.heap_size; ihinfobuf2 = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); if (ihinfobuf2 == NULL) { - printf("FATAL ERROR: hdf/hdf5lib/structs/H5_ih_info_t: Creation failed\n"); + printf("H5O_iterate_cb ERROR: hdf/hdf5lib/structs/H5_ih_info_t: Creation failed\n"); } else { args[0].j = (jlong)info->fileno; @@ -416,7 +416,7 @@ H5O_iterate_cb if (constructor != 0) { cb_info_t = CBENVPTR->NewObjectA(CBENVPAR cls, constructor, args); if (cb_info_t == NULL) { - printf("FATAL ERROR: hdf/hdf5lib/structs/H5O_info_t: Creation failed\n"); + printf("H5O_iterate_cb ERROR: hdf/hdf5lib/structs/H5O_info_t: Creation failed\n"); } else { status = CBENVPTR->CallIntMethod(CBENVPAR visit_callback, mid, g_id, str, cb_info_t, op_data); -- cgit v0.12 From f9074881cdfe04e96e7faa43e955b42428d9fcb9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 6 Aug 2018 11:30:52 -0500 Subject: HDFFV-10544 Add more descriptive text --- java/src/jni/exceptionImp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/src/jni/exceptionImp.c b/java/src/jni/exceptionImp.c index 69f8dde..ccda0d2 100644 --- a/java/src/jni/exceptionImp.c +++ b/java/src/jni/exceptionImp.c @@ -83,16 +83,16 @@ typedef struct H5E_num_t { } \ jm = ENVPTR->GetMethodID(ENVPAR jc, "", "(Ljava/lang/String;)V"); \ if (jm == NULL) { \ - printf("FATAL ERROR: GetMethodID failed\n"); \ + printf("THROWEXCEPTION FATAL ERROR: GetMethodID failed\n"); \ return JNI_FALSE; \ } \ ex = ENVPTR->NewObjectA (ENVPAR jc, jm, (jvalue*)(args)); \ if (ex == NULL) { \ - printf("FATAL ERROR: %s: Creation failed\n", (className)); \ + printf("THROWEXCEPTION FATAL ERROR: %s: Creation failed\n", (className)); \ return JNI_FALSE; \ } \ if (ENVPTR->Throw(ENVPAR (jthrowable)ex) < 0) { \ - printf("FATAL ERROR: %s: Throw failed\n", (className)); \ + printf("THROWEXCEPTION FATAL ERROR: %s: Throw failed\n", (className)); \ return JNI_FALSE; \ } \ return JNI_TRUE; \ -- cgit v0.12 From bd27f0d419b35f3a940a299063bfcefdc663e178 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 7 Aug 2018 11:45:23 -0500 Subject: Add RELEASE.txt entry for HDFFV-10475 --- release_docs/RELEASE.txt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 531b60c..744f24f 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -266,7 +266,7 @@ Bug Fixes since HDF5-1.10.2 release indicate any problem, but GCC 8 issued errors. Moved the attribute before the function name, as required. - (ADB 2018/05/22, HDFFV-10473) + (ADB - 2018/05/22, HDFFV-10473) - Reworked java test suite into individual JUnit tests. @@ -276,7 +276,7 @@ Bug Fixes since HDF5-1.10.2 release 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) + (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 @@ -290,7 +290,7 @@ Bug Fixes since HDF5-1.10.2 release The additional language (C++ and Fortran) checks have also been localized to only be checked when that language is enabled. - (ADB 2018/05/08) + (ADB - 2018/05/08) - The --enable-debug/production configure flags are listed as 'deprecated' when they should really be listed as 'removed'. @@ -305,6 +305,17 @@ Bug Fixes since HDF5-1.10.2 release (DER - 2018/05/31, HDFFV-10505) + - Applied patches to address Cywin build issues + + There were three issues for Cygwin builds: + - Shared libs were not built. + - The -std=c99 flag caused a SIG_SETMASK undeclared error. + - Undefined errors when buildbing test shared libraries. + + Patches to address these issues were received and incorporated in this version. + + (LRK - 2018/07/18, HDFFV-10475) + Performance ------------- - -- cgit v0.12 From a3385675b3cdc2102457a9f91877cc27778ab29a Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 7 Aug 2018 13:18:56 -0500 Subject: Reorder bugfix release notes from latest to earliest, and miscellaneous format cleanup. --- release_docs/RELEASE.txt | 114 ++++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 55 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 744f24f..f4170ac 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -187,37 +187,6 @@ Bug Fixes since HDF5-1.10.2 release (VC - 2018/07/20, HDFFV-9277) - - Error checks in h5stat and when decoding messages - - h5stat exited with seg fault/core dumped when - errors are encountered in the internal library. - - Add error checks and --enable-error-stack option to h5stat. - Add range checks when decoding messages: old fill value, old - layout and refcount. - - (VC - 2018/07/11, HDFFV-10333) - - - 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) - - A bug was discovered in the parallel library which caused partial parallel reads of filtered datasets to return incorrect data. The library used the incorrect dataspace for each chunk read, causing @@ -257,8 +226,63 @@ Bug Fixes since HDF5-1.10.2 release (JTH - 2018/07/16, HDFFV-10467) + - Error checks in h5stat and when decoding messages + + h5stat exited with seg fault/core dumped when + errors are encountered in the internal library. + + Add error checks and --enable-error-stack option to h5stat. + Add range checks when decoding messages: old fill value, old + layout and refcount. + + (VC - 2018/07/11, HDFFV-10333) + + - 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) + Configuration ------------- + - Applied patches to address Cywin build issues + + There were three issues for Cygwin builds: + - Shared libs were not built. + - The -std=c99 flag caused a SIG_SETMASK undeclared error. + - Undefined errors when buildbing test shared libraries. + + Patches to address these issues were received and incorporated in this version. + + (LRK - 2018/07/18, HDFFV-10475) + + - The --enable-debug/production configure flags are listed as 'deprecated' + when they should really be listed as 'removed'. + + In the autotools overhaul several years ago, we removed these flags and + implemented a new --enable-build-mode= flag. This was done because we + changed the semantics of the modes and didn't want users to silently + be exposed to them. The newer system is also more flexible and us to + add other modes (like 'clean'). + + The --enable-debug/production flags are now listed as removed. + + (DER - 2018/05/31, HDFFV-10505) + - Moved the location of gcc attribute. The gcc attribute(no_sanitize), named as the macro HDF_NO_UBSAN, @@ -292,30 +316,6 @@ Bug Fixes since HDF5-1.10.2 release (ADB - 2018/05/08) - - The --enable-debug/production configure flags are listed as 'deprecated' - when they should really be listed as 'removed'. - - In the autotools overhaul several years ago, we removed these flags and - implemented a new --enable-build-mode= flag. This was done because we - changed the semantics of the modes and didn't want users to silently - be exposed to them. The newer system is also more flexible and us to - add other modes (like 'clean'). - - The --enable-debug/production flags are now listed as removed. - - (DER - 2018/05/31, HDFFV-10505) - - - Applied patches to address Cywin build issues - - There were three issues for Cygwin builds: - - Shared libs were not built. - - The -std=c99 flag caused a SIG_SETMASK undeclared error. - - Undefined errors when buildbing test shared libraries. - - Patches to address these issues were received and incorporated in this version. - - (LRK - 2018/07/18, HDFFV-10475) - Performance ------------- - @@ -356,11 +356,15 @@ Bug Fixes since HDF5-1.10.2 release + One more property list argument is added to H5Location::openDataSet: const DSetAccPropList& dapl = DSetAccPropList::DEFAULT + (BMR - 2018/07/21, PR# 1146) + - Improvement C++ documentation Replaced the table in main page of the C++ documentation from mht to htm format for portability. + (BMR - 2018/07/17, PR# 1141) + Testing ------- -- cgit v0.12 From 01c9aa1e76857bf22771342dadf87af08979aa33 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 9 Aug 2018 10:59:32 -0500 Subject: Update Drop Site options and Coverage settings --- CMakeLists.txt | 11 ++++++++--- CTestConfig.cmake | 21 ++++++++++++++++----- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb860d2..4cdb31c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -443,9 +443,14 @@ endif () #----------------------------------------------------------------------------- option (HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF) if (HDF5_ENABLE_COVERAGE) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage") - set (LDFLAGS "${LDFLAGS} -fprofile-arcs -ftest-coverage") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 --coverage -fprofile-arcs -ftest-coverage") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g --coverage -O0 -fprofile-arcs -ftest-coverage") + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") + set (LDFLAGS "${LDFLAGS} -fprofile-arcs -ftest-coverage") + link_libraries (gcov) + else () + set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage") + endif () endif () #----------------------------------------------------------------------------- diff --git a/CTestConfig.cmake b/CTestConfig.cmake index 6bad67e..5b35688 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -19,12 +19,23 @@ set (CTEST_PROJECT_NAME "HDF5") 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") +if (CTEST_DROP_SITE_INIT) + set (CTEST_DROP_SITE "${CTEST_DROP_SITE_INIT}") else () - set (CTEST_DROP_SITE "cdash.hdfgroup.org") - set (CTEST_DROP_LOCATION "/submit.php?project=HDF5") + if (CDASH_LOCAL) + set (CTEST_DROP_SITE "cdash-internal.hdfgroup.org") + else () + set (CTEST_DROP_SITE "cdash.hdfgroup.org") + endif () +endif () +if (CTEST_DROP_LOCATION_INIT) + set (CTEST_DROP_LOCATION "${CTEST_DROP_LOCATION_INIT}") +else () + if (CDASH_LOCAL) + set (CTEST_DROP_LOCATION "/submit.php?project=HDF5Trunk") + else () + set (CTEST_DROP_LOCATION "/submit.php?project=HDF5") + endif () endif () set (CTEST_DROP_SITE_CDASH TRUE) -- cgit v0.12 From 90699af5f43f18af5e5f376ac28b86ca4bc92659 Mon Sep 17 00:00:00 2001 From: Jordan Henderson Date: Thu, 9 Aug 2018 11:26:10 -0500 Subject: RELEASE.txt changes for MPI updates --- release_docs/RELEASE.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index f4170ac..5af77f5 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -55,6 +55,23 @@ New Features (ADB - 2018/07/16) + - Added checks to CMake and Autotools for the following + MPI functions: + + MPI_Mprobe - Used for the Parallel Compression feature + MPI_Imrecv - Used for the Parallel Compression feature + + MPI_Get_elements_x - Used for the "big Parallel I/O" feature + MPI_Type_size_x - Used for the "big Parallel I/O" feature + + (JTH - 2018/08/02, HDFFV-10512) + + - Added section to the libhdf5.settings file to indicate + the status of the Parallel Compression and "big Parallel I/O" + features. + + (JTH - 2018/08/02, HDFFV-10512) + Library: -------- - @@ -226,6 +243,18 @@ Bug Fixes since HDF5-1.10.2 release (JTH - 2018/07/16, HDFFV-10467) + - Added checks of the defined MPI_VERSION to guard against usage of + MPI-3 functions in the Parallel Compression and "big Parallel I/O" + features when HDF5 is built with MPI-2. Previously, the configure + step would pass but the build itself would fail when it could not + locate the MPI-3 functions used. + + As a result of these new checks, HDF5 can again be built with MPI-2, + but the Parallel Compression feature will be disabled as it relies + on the MPI-3 functions used. + + (JTH - 2018/08/02, HDFFV-10512) + - Error checks in h5stat and when decoding messages h5stat exited with seg fault/core dumped when -- cgit v0.12 From 4f4f177b0af6063c0c22ec2e1a9ca99549bc8aac Mon Sep 17 00:00:00 2001 From: Jordan Henderson Date: Thu, 9 Aug 2018 11:38:23 -0500 Subject: Rearrange issues by date order --- release_docs/RELEASE.txt | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 5af77f5..96a91b1 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -47,16 +47,7 @@ New Features Configuration: ------------- - - Add option to execute swmr shell scripts from CMake. - - Option TEST_SHELL_SCRIPTS redirects processing into a - separate ShellTests.cmake file for UNIX types. The tests - execute the shell scripts if a SH program is found. - - (ADB - 2018/07/16) - - - Added checks to CMake and Autotools for the following - MPI functions: + - Added configuration checks for the following MPI functions: MPI_Mprobe - Used for the Parallel Compression feature MPI_Imrecv - Used for the Parallel Compression feature @@ -72,6 +63,14 @@ New Features (JTH - 2018/08/02, HDFFV-10512) + - Add option to execute swmr shell scripts from CMake. + + Option TEST_SHELL_SCRIPTS redirects processing into a + separate ShellTests.cmake file for UNIX types. The tests + execute the shell scripts if a SH program is found. + + (ADB - 2018/07/16) + Library: -------- - @@ -194,6 +193,18 @@ Bug Fixes since HDF5-1.10.2 release (ADB - 2018/08/06, HDFFV-10544) + - Added checks of the defined MPI_VERSION to guard against usage of + MPI-3 functions in the Parallel Compression and "big Parallel I/O" + features when HDF5 is built with MPI-2. Previously, the configure + step would pass but the build itself would fail when it could not + locate the MPI-3 functions used. + + As a result of these new checks, HDF5 can again be built with MPI-2, + but the Parallel Compression feature will be disabled as it relies + on the MPI-3 functions used. + + (JTH - 2018/08/02, HDFFV-10512) + - H5Adelete H5Adelete failed when deleting the last "large" attribute that @@ -243,18 +254,6 @@ Bug Fixes since HDF5-1.10.2 release (JTH - 2018/07/16, HDFFV-10467) - - Added checks of the defined MPI_VERSION to guard against usage of - MPI-3 functions in the Parallel Compression and "big Parallel I/O" - features when HDF5 is built with MPI-2. Previously, the configure - step would pass but the build itself would fail when it could not - locate the MPI-3 functions used. - - As a result of these new checks, HDF5 can again be built with MPI-2, - but the Parallel Compression feature will be disabled as it relies - on the MPI-3 functions used. - - (JTH - 2018/08/02, HDFFV-10512) - - Error checks in h5stat and when decoding messages h5stat exited with seg fault/core dumped when -- cgit v0.12