summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlrknox <lrknox>2017-03-22 17:01:22 (GMT)
committerlrknox <lrknox>2017-03-22 17:01:22 (GMT)
commitd37561605bda978ef8e5de03997dca4e493e213b (patch)
treed64fe8f0c74ccc063323dfb3ae3fdb24fac55380
parent36a30ecfd288afdf8ea62a858644e622ce72fd58 (diff)
parentd605ce46b37a1ca33d1e474fda78009e9bdabb18 (diff)
downloadhdf5-d37561605bda978ef8e5de03997dca4e493e213b.zip
hdf5-d37561605bda978ef8e5de03997dca4e493e213b.tar.gz
hdf5-d37561605bda978ef8e5de03997dca4e493e213b.tar.bz2
Merge branch 'hdf5_1_10' of https://bitbucket.hdfgroup.org/scm/~lrknox/hdf5_lrk into hdf5_1_10
-rw-r--r--c++/src/H5AbstractDs.h6
-rw-r--r--c++/src/H5ArrayType.cpp8
-rw-r--r--c++/src/H5ArrayType.h6
-rw-r--r--c++/src/H5AtomType.h6
-rw-r--r--c++/src/H5Attribute.h5
-rw-r--r--c++/src/H5CommonFG.cpp2
-rw-r--r--c++/src/H5CommonFG.h6
-rw-r--r--c++/src/H5CompType.cpp6
-rw-r--r--c++/src/H5CompType.h6
-rw-r--r--c++/src/H5DataSet.h5
-rw-r--r--c++/src/H5DataSpace.h6
-rw-r--r--c++/src/H5DataType.cpp62
-rw-r--r--c++/src/H5DataType.h6
-rw-r--r--c++/src/H5DcreatProp.cpp16
-rw-r--r--c++/src/H5DcreatProp.h6
-rw-r--r--c++/src/H5DxferProp.h6
-rw-r--r--c++/src/H5EnumType.cpp6
-rw-r--r--c++/src/H5EnumType.h6
-rw-r--r--c++/src/H5Exception.h4
-rw-r--r--c++/src/H5FaccProp.h5
-rw-r--r--c++/src/H5FcreatProp.cpp72
-rw-r--r--c++/src/H5FcreatProp.h16
-rw-r--r--c++/src/H5File.cpp143
-rw-r--r--c++/src/H5File.h6
-rw-r--r--c++/src/H5FloatType.cpp6
-rw-r--r--c++/src/H5FloatType.h6
-rw-r--r--c++/src/H5Group.cpp48
-rw-r--r--c++/src/H5Group.h6
-rw-r--r--c++/src/H5IdComponent.cpp10
-rw-r--r--c++/src/H5IdComponent.h2
-rw-r--r--c++/src/H5IntType.cpp6
-rw-r--r--c++/src/H5IntType.h6
-rw-r--r--c++/src/H5LaccProp.h5
-rw-r--r--c++/src/H5Library.h5
-rw-r--r--c++/src/H5Location.cpp19
-rw-r--r--c++/src/H5Location.h5
-rw-r--r--c++/src/H5Object.cpp5
-rw-r--r--c++/src/H5Object.h4
-rw-r--r--c++/src/H5OcreatProp.cpp9
-rw-r--r--c++/src/H5OcreatProp.h5
-rw-r--r--c++/src/H5PredType.h5
-rw-r--r--c++/src/H5PropList.cpp61
-rw-r--r--c++/src/H5PropList.h12
-rw-r--r--c++/src/H5StrType.cpp6
-rw-r--r--c++/src/H5StrType.h6
-rw-r--r--c++/src/H5VarLenType.cpp6
-rw-r--r--c++/src/H5VarLenType.h6
-rw-r--r--c++/test/tfile.cpp54
-rw-r--r--c++/test/titerate.cpp6
-rw-r--r--c++/test/trefer.cpp24
-rw-r--r--c++/test/ttypes.cpp3
-rw-r--r--c++/test/tvlstr.cpp41
-rw-r--r--config/cmake/H5pubconf.h.in95
-rwxr-xr-xconfig/cmake/scripts/CTestScript.cmake9
-rwxr-xr-xconfig/cmake/scripts/HDF5options.cmake4
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake16
-rw-r--r--configure.ac1
-rw-r--r--release_docs/INSTALL_CMake.txt300
-rw-r--r--release_docs/RELEASE.txt145
-rw-r--r--release_docs/USING_HDF5_CMake.txt4
-rw-r--r--src/H5AC.c13
-rw-r--r--src/H5C.c21
-rw-r--r--src/H5Fint.c16
-rw-r--r--src/H5MF.c6
-rw-r--r--src/H5PB.c12
-rw-r--r--src/H5PBprivate.h2
-rw-r--r--src/H5private.h8
-rw-r--r--src/H5system.c33
-rw-r--r--src/H5win32defs.h16
-rw-r--r--testpar/t_cache_image.c2021
-rw-r--r--tools/test/h5repack/CMakeTests.cmake2
71 files changed, 2923 insertions, 594 deletions
diff --git a/c++/src/H5AbstractDs.h b/c++/src/H5AbstractDs.h
index eaa9d14..f0859c8 100644
--- a/c++/src/H5AbstractDs.h
+++ b/c++/src/H5AbstractDs.h
@@ -91,6 +91,8 @@ class H5_DLLCPP AbstractDs {
private:
// This member function is implemented by DataSet and Attribute - pure virtual.
virtual hid_t p_get_type() const = 0;
-};
-}
+
+}; // end of AbstractDs
+} // namespace H5
+
#endif // __AbstractDs_H
diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp
index 3cdcc0a..c8bd0fc 100644
--- a/c++/src/H5ArrayType.cpp
+++ b/c++/src/H5ArrayType.cpp
@@ -77,11 +77,12 @@ ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims)
// Function: ArrayType overloaded constructor
///\brief Creates an ArrayType instance by opening an HDF5 array datatype
/// given its name, provided as a C character string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Array type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openArrayType(const char*) to
// improve usability.
// -BMR, Dec 2016
@@ -94,12 +95,13 @@ ArrayType::ArrayType(const H5Location& loc, const char *dtype_name) : DataType()
//--------------------------------------------------------------------------
// Function: ArrayType overloaded constructor
///\brief Creates an ArrayType instance by opening an HDF5 array datatype
-/// given its name, provided as an \c H5std_string.
+/// given its name, provided as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Array type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openArrayType(const H5std_string&)
// to improve usability.
// -BMR, Dec 2016
diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h
index 15b6bb3..dd9db51 100644
--- a/c++/src/H5ArrayType.h
+++ b/c++/src/H5ArrayType.h
@@ -60,6 +60,8 @@ class H5_DLLCPP ArrayType : public DataType {
// Default constructor
ArrayType();
-};
-}
+
+}; // end of ArrayType
+} // namespace H5
+
#endif // __H5ArrayType_H
diff --git a/c++/src/H5AtomType.h b/c++/src/H5AtomType.h
index a1e0262..f4c70fd 100644
--- a/c++/src/H5AtomType.h
+++ b/c++/src/H5AtomType.h
@@ -78,6 +78,8 @@ class H5_DLLCPP AtomType : public DataType {
// Constructor that takes an existing id
AtomType(const hid_t existing_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+
+}; // end of AtomType
+} // namespace H5
+
#endif // __H5AtomType_H
diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h
index 0243cd9..6d6df2c 100644
--- a/c++/src/H5Attribute.h
+++ b/c++/src/H5Attribute.h
@@ -101,6 +101,7 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
// Friend function to set Attribute id. For library use only.
friend void f_Attribute_setId(Attribute* attr, hid_t new_id);
-};
-}
+}; // end of Attribute
+} // namespace H5
+
#endif // __H5Attribute_H
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index 5c01055..f3390aa 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -381,4 +381,4 @@ void f_DataSet_setId(DataSet* dset, hid_t new_id)
#endif // DOXYGEN_SHOULD_SKIP_THIS
-}
+} // end namespace
diff --git a/c++/src/H5CommonFG.h b/c++/src/H5CommonFG.h
index 588d49a..0c7b799 100644
--- a/c++/src/H5CommonFG.h
+++ b/c++/src/H5CommonFG.h
@@ -84,10 +84,8 @@ class H5_DLLCPP CommonFG {
#endif // DOXYGEN_SHOULD_SKIP_THIS
-}; // end of CommonFG declaration
+}; // end of CommonFG
+} // namespace H5
-#ifndef H5_NO_NAMESPACE
-}
-#endif
#endif // __CommonFG_H
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index 037527f..7db2cfe 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -91,11 +91,12 @@ CompType::CompType(const DataSet& dataset) : DataType()
// Function: CompType overloaded constructor
///\brief Creates an CompType instance by opening an HDF5 compound
/// given its name, provided as a C character string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Compound type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openCompType(const char*) to
// improve usability.
// -BMR, Dec 2016
@@ -109,11 +110,12 @@ CompType::CompType(const H5Location& loc, const char *dtype_name) : DataType()
// Function: CompType overloaded constructor
///\brief Creates an CompType instance by opening an HDF5 compound
/// datatype given its name, provided as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Compound type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openCompType(const H5Location&)
// to improve usability.
// -BMR, Dec 2016
diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h
index 222044d..042b59f 100644
--- a/c++/src/H5CompType.h
+++ b/c++/src/H5CompType.h
@@ -115,6 +115,8 @@ class H5_DLLCPP CompType : public DataType {
// Contains common code that is used by the member functions
// getMemberXxxType
hid_t p_get_member_type(unsigned member_num) const;
-};
-}
+
+}; // end of CompType
+} // namespace H5
+
#endif // __H5CompType_H
diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h
index 93f9782..f9e29ff 100644
--- a/c++/src/H5DataSet.h
+++ b/c++/src/H5DataSet.h
@@ -130,6 +130,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
// Friend function to set DataSet id. For library use only.
friend void f_DataSet_setId(DataSet* dset, hid_t new_id);
-};
-}
+}; // end of DataSet
+} // namespace H5
+
#endif // __H5DataSet_H
diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h
index 969e146..281e865 100644
--- a/c++/src/H5DataSpace.h
+++ b/c++/src/H5DataSpace.h
@@ -149,6 +149,8 @@ class H5_DLLCPP DataSpace : public IdComponent {
friend void f_DataSpace_setId(DataSpace *dspace, hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+
+}; // end of DataSpace
+} // namespace H5
+
#endif // __H5DataSpace_H
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index 1cfc259..2795485 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -109,13 +109,13 @@ DataType::DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type,
//--------------------------------------------------------------------------
// Function: DataType overload constructor - dereference
-///\brief Given a reference, ref, to an hdf5 group, creates a
-/// DataType object
-///\param attr - IN: Specifying location where the referenced object is in
-///\param ref - IN: Reference pointer
-///\param ref_type - IN: Reference type - default to H5R_OBJECT
-///\param plist - IN: Property list - default to PropList::DEFAULT
-///\exception H5::ReferenceException
+// brief Given a reference, ref, to an hdf5 group, creates a
+// DataType object
+// param attr - IN: Specifying location where the referenced object is in
+// param ref - IN: Reference pointer
+// param ref_type - IN: Reference type - default to H5R_OBJECT
+// param plist - IN: Property list - default to PropList::DEFAULT
+// exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// Jul, 2008
@@ -162,11 +162,12 @@ DataType::DataType(const PredType& pred_type) : H5Object()
// Function: DataType overloaded constructor
///\brief Creates a DataType instance by opening an HDF5 datatype given
/// its name as a char*.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Datatype name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openDataType(const char*) to
// improve usability.
// -BMR, Dec 2016
@@ -180,11 +181,12 @@ DataType::DataType(const H5Location& loc, const char *dtype_name) : H5Object()
// Function: DataType overloaded constructor
///\brief Creates a DataType instance by opening an HDF5 datatype given
/// its name as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Datatype name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openDataType(const H5std_string&) to
// improve usability.
// -BMR, Dec 2016
@@ -300,27 +302,6 @@ bool DataType::operator==(const DataType& compared_type) const
}
//--------------------------------------------------------------------------
-// Function: DataType::p_opentype (private)
-///\brief Opens an HDF5 datatype given its name
-///\param dtype_name - IN: Datatype name
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
-// Description
-// This function was introduced in 1.10.1 to be used by the new
-// XxxType constructors that were introduced to replace the
-// existing functions CommonFG::openXxxType(), which is awkward
-// to use. -BMR, Dec 2016
-//--------------------------------------------------------------------------
-hid_t DataType::p_opentype(const H5Location& loc, const char *dtype_name) const
-{
- // Call C function to open the named datatype at this location
- hid_t ret_value = H5Topen2(loc.getId(), dtype_name, H5P_DEFAULT);
- if (ret_value < 0)
- throw DataTypeIException("DataType constructor", "H5Topen2 failed");
- return(ret_value);
-}
-
-//--------------------------------------------------------------------------
// Function: DataType::p_commit (private)
//\brief Commits a transient datatype to a file, creating a new
// named datatype
@@ -787,6 +768,26 @@ hid_t DataType::getId() const
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
+// Function: DataType::p_opentype (private)
+///\brief Opens an HDF5 datatype given its name
+///\param loc - IN: Location of the type
+///\param dtype_name - IN: Datatype name
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - Dec 2016
+// Description
+// This function was introduced in 1.10.1 to be used by the new
+// XxxType constructors that open a datatype. -BMR, Dec 2016
+//--------------------------------------------------------------------------
+hid_t DataType::p_opentype(const H5Location& loc, const char *dtype_name) const
+{
+ // Call C function to open the named datatype at this location
+ hid_t ret_value = H5Topen2(loc.getId(), dtype_name, H5P_DEFAULT);
+ if (ret_value < 0)
+ throw DataTypeIException("DataType constructor", "H5Topen2 failed");
+ return(ret_value);
+}
+
+//--------------------------------------------------------------------------
// Function: DataType::p_setId
///\brief Sets the identifier of this object to a new value.
///
@@ -861,4 +862,5 @@ DataType::~DataType()
cerr << inMemFunc("~DataType - ") << close_error.getDetailMsg() << endl;
}
}
+
} // end namespace
diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h
index 6501bb9..c2ea2a3 100644
--- a/c++/src/H5DataType.h
+++ b/c++/src/H5DataType.h
@@ -155,6 +155,8 @@ class H5_DLLCPP DataType : public H5Object {
friend void f_DataType_setId(DataType* dtype, hid_t new_id);
void p_commit(hid_t loc_id, const char* name);
-};
-}
+
+}; // end of DataType
+} // namespace H5
+
#endif // __H5DataType_H
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index e1be3c4..966ca16 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -744,13 +744,13 @@ void DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char* name,
// Function: DSetCreatPropList::setVirtual
///\brief Maps elements of a virtual dataset to elements of the source
/// dataset.
-///\param vspace - IN: Dataspace the virtual dataset, possibly an
+///\param vspace - IN: Dataspace the virtual dataset, possibly an
/// unlimited selection
-///\param src_fname - IN: Name of the HDF5 file where the source dataset
+///\param src_fname - IN: Name of the HDF5 file where the source dataset
/// is located (\a char*)
-///\param src_fname - IN: Path to the dataset in the file specified by
+///\param src_dsname - IN: Path to the dataset in the file specified by
/// \a src_file_name (\a char*)
-///\param sspace - IN: Dataspace with a selection applied, possibly
+///\param sspace - IN: Dataspace with a selection applied, possibly
/// an unlimited selection
///\exception H5::PropListIException
///\par Description
@@ -771,13 +771,13 @@ void DSetCreatPropList::setVirtual(const DataSpace& vspace, const char *src_fnam
// Function: DSetCreatPropList::setVirtual
///\brief Maps elements of a virtual dataset to elements of the source
/// dataset.
-///\param vspace - IN: Dataspace the virtual dataset, possibly an
+///\param vspace - IN: Dataspace the virtual dataset, possibly an
/// unlimited selection
-///\param src_fname - IN: Name of the HDF5 file where the source dataset
+///\param src_fname - IN: Name of the HDF5 file where the source dataset
/// is located (\a H5std_string)
-///\param src_fname - IN: Path to the dataset in the file specified by
+///\param src_dsname - IN: Path to the dataset in the file specified by
/// \a src_file_name (\a H5std_string)
-///\param sspace - IN: Dataspace with a selection applied, possibly
+///\param sspace - IN: Dataspace with a selection applied, possibly
/// an unlimited selection
///\exception H5::PropListIException
///\par Description
diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h
index 5371e03..f0475eb 100644
--- a/c++/src/H5DcreatProp.h
+++ b/c++/src/H5DcreatProp.h
@@ -146,6 +146,8 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
static DSetCreatPropList* getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+
+}; // end of DSetCreatPropList
+} // namespace H5
+
#endif // __H5DSCreatPropList_H
diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h
index f1c363f..39d3ba8 100644
--- a/c++/src/H5DxferProp.h
+++ b/c++/src/H5DxferProp.h
@@ -127,6 +127,8 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
static DSetMemXferPropList* getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+
+}; // end of DSetMemXferPropList
+} // namespace H5
+
#endif // __H5DSetMemXferPropList_H
diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp
index 49f60e6..9072aab 100644
--- a/c++/src/H5EnumType.cpp
+++ b/c++/src/H5EnumType.cpp
@@ -114,10 +114,11 @@ EnumType::EnumType(const IntType& data_type) : DataType()
///\brief Creates an EnumType instance by opening an HDF5 enum datatype
/// given its name, provided as a C character string.
///\param dtype_name - IN: Enum datatype name
+///\param loc - IN: Location of the type
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openEnumType(const char*) to
// improve usability.
// -BMR, Dec 2016
@@ -131,11 +132,12 @@ EnumType::EnumType(const H5Location& loc, const char *dtype_name) : DataType()
// Function: EnumType overloaded constructor
///\brief Creates an EnumType instance by opening an HDF5 enum datatype
/// given its name, provided as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Enum datatype name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openEnumType(const H5std_string&)
// to improve usability.
// -BMR, Dec 2016
diff --git a/c++/src/H5EnumType.h b/c++/src/H5EnumType.h
index 2fbe2cd..cd93eb5 100644
--- a/c++/src/H5EnumType.h
+++ b/c++/src/H5EnumType.h
@@ -78,6 +78,8 @@ class H5_DLLCPP EnumType : public DataType {
EnumType(const EnumType& original);
virtual ~EnumType();
-};
-}
+
+}; // end of EnumType
+} // namespace H5
+
#endif // __H5EnumType_H
diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h
index 1f85711..2e68cf0 100644
--- a/c++/src/H5Exception.h
+++ b/c++/src/H5Exception.h
@@ -174,8 +174,8 @@ class H5_DLLCPP IdComponentException : public Exception {
IdComponentException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
IdComponentException();
virtual ~IdComponentException() throw();
-};
-}
+}; // end of IdComponentException
+} // namespace H5
#endif // __H5Exception_H
diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h
index 586dcf8..8e488e5 100644
--- a/c++/src/H5FaccProp.h
+++ b/c++/src/H5FaccProp.h
@@ -162,6 +162,7 @@ class H5_DLLCPP FileAccPropList : public PropList {
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+}; // end of FileAccPropList
+} // namespace H5
+
#endif // __H5FileAccPropList_H
diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp
index ea69049..b3e6b7b 100644
--- a/c++/src/H5FcreatProp.cpp
+++ b/c++/src/H5FcreatProp.cpp
@@ -294,12 +294,12 @@ unsigned FileCreatPropList::getIstorek() const
return(ik);
}
-#ifndef H5_NO_DEPRECATED_SYMBOLS
//--------------------------------------------------------------------------
-// Function: FileCreatPropList::setFileSpace
+// Function: FileCreatPropList::setFileSpaceStrategy
///\brief Sets the strategy and the threshold value that the library
/// will employ in managing file space.
-///\param strategy - IN: Strategy for file space management
+///\param strategy - IN: Strategy for file space management
+///\param persist - IN: Whether to persist free-space
///\param threshold - IN: Free-space section threshold. The library
/// default is 1, which is to track all free-space sections.
///\exception H5::PropListIException
@@ -308,64 +308,76 @@ unsigned FileCreatPropList::getIstorek() const
/// changed and the existing strategy will be retained.
/// If the given threshold value is zero, the property will not be
/// changed and the existing threshold will be retained.
-/// Valid values of \a libver_low are as follows:
-/// \li \c H5F_FILE_SPACE_ALL (Default)
-/// \li \c H5F_FILE_SPACE_ALL_PERSIST
-/// \li \c H5F_FILE_SPACE_AGGR_VFD
-/// \li \c H5F_FILE_SPACE_VFD
/// For information, please see the C layer Reference Manual at:
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFileSpace
// Programmer Binh-Minh Ribler - Feb, 2017
//--------------------------------------------------------------------------
-void FileCreatPropList::setFileSpace(H5F_file_space_type_t strategy, hsize_t threshold) const
+void FileCreatPropList::setFileSpaceStrategy(H5F_fspace_strategy_t strategy, hbool_t persist, hsize_t threshold) const
{
- herr_t ret_value = H5Pset_file_space(id, strategy, threshold);
+ herr_t ret_value = H5Pset_file_space_strategy(id, strategy, persist, threshold);
if (ret_value < 0)
{
- throw PropListIException("FileCreatPropList::setFileSpace",
- "H5Pset_file_space failed");
+ throw PropListIException("FileCreatPropList::setFileSpaceStrategy",
+ "H5Pset_file_space_strategy failed");
}
}
//--------------------------------------------------------------------------
// Function: FileCreatPropList::getFileSpaceStrategy
-///\brief Returns the strategy that the library uses in managing file space.
-///\return The strategy value
+///\brief Retrieves the strategy, persist, and threshold that the library
+/// uses in managing file space.
+///\param strategy - OUT: Strategy for file space management
+///\param persist - OUT: Whether to persist free-space
+///\param threshold - OUT: Free-space section threshold
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - Feb, 2017
//--------------------------------------------------------------------------
-H5F_file_space_type_t FileCreatPropList::getFileSpaceStrategy() const
+void FileCreatPropList::getFileSpaceStrategy(H5F_fspace_strategy_t& strategy, hbool_t& persist, hsize_t& threshold) const
{
- H5F_file_space_type_t strategy = H5F_FILE_SPACE_ALL;
- herr_t ret_value = H5Pget_file_space(id, &strategy, NULL);
+ herr_t ret_value = H5Pget_file_space_strategy(id, &strategy, &persist, &threshold);
if (ret_value < 0)
{
throw PropListIException("FileCreatPropList::getFileSpaceStrategy",
- "H5Pget_file_space for strategy failed");
+ "H5Pget_file_space_strategy failed");
}
- return(strategy);
}
//--------------------------------------------------------------------------
-// Function: FileCreatPropList::getFileSpaceThreshold
-///\brief Returns the threshold value that the library uses in tracking
-/// free space sections.
-///\return The threshold value
+// Function: FileCreatPropList::setFileSpacePagesize
+///\brief Sets the file space page size for paged aggregation.
+///\param fsp_psize - IN: Filespace's page size
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - Feb, 2017
//--------------------------------------------------------------------------
-hsize_t FileCreatPropList::getFileSpaceThreshold() const
+void FileCreatPropList::setFileSpacePagesize(hsize_t fsp_psize) const
{
- hsize_t threshold = 0;
- herr_t ret_value = H5Pget_file_space(id, NULL, &threshold);
+ herr_t ret_value = H5Pset_file_space_page_size(id, fsp_psize);
if (ret_value < 0)
{
- throw PropListIException("FileCreatPropList::getFileSpaceThreshold",
- "H5Pget_file_space for threshold failed");
+ throw PropListIException("FileCreatPropList::setFileSpacePagesize",
+ "H5Pset_file_space_page_size failed");
}
- return(threshold);
}
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList::getFileSpacePagesize
+///\brief Returns the file space page size for aggregating small
+/// metadata or raw data.
+///\return File space page size
+///\exception H5::PropListIException
+// Programmer Binh-Minh Ribler - Feb, 2017
+//--------------------------------------------------------------------------
+hsize_t FileCreatPropList::getFileSpacePagesize() const
+{
+ hsize_t fsp_psize = 0;
+ herr_t ret_value = H5Pget_file_space_page_size(id, &fsp_psize);
+ if (ret_value < 0)
+ {
+ throw PropListIException("FileCreatPropList::getFileSpacePagesize",
+ "H5Pget_file_space_page_size failed");
+ }
+ return(fsp_psize);
+}
//--------------------------------------------------------------------------
// Function: FileCreatPropList destructor
diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h
index 1d999cb..6beac02 100644
--- a/c++/src/H5FcreatProp.h
+++ b/c++/src/H5FcreatProp.h
@@ -65,18 +65,19 @@ class H5_DLLCPP FileCreatPropList : public PropList {
// indexing chunked datasets.
void setIstorek(unsigned ik) const;
-#ifndef H5_NO_DEPRECATED_SYMBOLS
// Sets the strategy and the threshold value that the library will
// will employ in managing file space.
- void setFileSpace(H5F_file_space_type_t strategy, hsize_t threshold) const;
+ void setFileSpaceStrategy(H5F_fspace_strategy_t strategy, hbool_t persist, hsize_t threshold) const;
// Returns the strategy that the library uses in managing file space.
- H5F_file_space_type_t getFileSpaceStrategy() const;
+ void getFileSpaceStrategy(H5F_fspace_strategy_t& strategy, hbool_t& persist, hsize_t& threshold) const;
+
+ // Sets the file space page size for paged aggregation.
+ void setFileSpacePagesize(hsize_t fsp_psize) const;
// Returns the threshold value that the library uses in tracking free
// space sections.
- hsize_t getFileSpaceThreshold() const;
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ hsize_t getFileSpacePagesize() const;
///\brief Returns this class name.
virtual H5std_string fromClass() const { return("FileCreatPropList"); }
@@ -104,6 +105,7 @@ class H5_DLLCPP FileCreatPropList : public PropList {
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+}; // end of FileCreatPropList
+} // namespace H5
+
#endif // __H5FileCreatPropList_H
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index cdb5837..bea4612 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -45,7 +45,7 @@ namespace H5 {
using std::endl;
//--------------------------------------------------------------------------
-// Function H5File default constructor
+// Function H5File default constructor
///\brief Default constructor: creates a stub H5File object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -64,30 +64,30 @@ H5File::H5File() : Group(), id(H5I_INVALID_HID) {}
///\par Description
/// Valid values of \a flags include:
/// \li \c H5F_ACC_TRUNC - Truncate file, if it already exists,
-/// erasing all data previously stored in
-/// the file.
+/// erasing all data previously stored in
+/// the file.
/// \li \c H5F_ACC_EXCL - Fail if file already exists.
-/// \c H5F_ACC_TRUNC and \c H5F_ACC_EXCL are mutually exclusive
+/// \c H5F_ACC_TRUNC and \c H5F_ACC_EXCL are mutually exclusive
/// \li \c H5F_ACC_RDONLY - Open file as read-only, if it already
-/// exists, and fail, otherwise
+/// exists, and fail, otherwise
/// \li \c H5F_ACC_RDWR - Open file for read/write, if it already
-/// exists, and fail, otherwise
+/// exists, and fail, otherwise
///\par
/// For info on file creation in the case of an already-open file,
/// please refer to the \b Special \b case section in the C layer
/// Reference Manual at:
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5F.html#File-Create
-// Notes With a PGI compiler (~2012-2013), the exception thrown by p_get_file
-// could not be caught in the applications. Added try block here
-// to catch then re-throw it. -BMR 2013/03/21
+// Notes With a PGI compiler (~2012-2013,) the exception thrown by
+// p_get_file could not be caught in the applications. Added try
+// block here to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File(const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist) : Group(), id(H5I_INVALID_HID)
{
try {
- p_get_file(name, flags, create_plist, access_plist);
+ p_get_file(name, flags, create_plist, access_plist);
} catch (FileIException& open_file) {
- throw open_file;
+ throw open_file;
}
}
@@ -102,17 +102,17 @@ H5File::H5File(const char* name, unsigned int flags, const FileCreatPropList& cr
/// FileCreatPropList::DEFAULT
///\param access_plist - IN: File access property list. Default to
/// FileAccPropList::DEFAULT
-// Notes With a PGI compiler (~2012-2013), the exception thrown by p_get_file
-// could not be caught in the applications. Added try block here
-// to catch then re-throw it. -BMR 2013/03/21
+// Notes With a PGI compiler (~2012-2013,) the exception thrown by
+// p_get_file could not be caught in the applications. Added try
+// block here to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File(const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist) : Group(), id(H5I_INVALID_HID)
{
try {
- p_get_file(name.c_str(), flags, create_plist, access_plist);
+ p_get_file(name.c_str(), flags, create_plist, access_plist);
} catch (FileIException& open_file) {
- throw open_file;
+ throw open_file;
}
}
@@ -131,23 +131,23 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro
// create the file.
if (flags & (H5F_ACC_EXCL|H5F_ACC_TRUNC))
{
- hid_t create_plist_id = create_plist.getId();
- hid_t access_plist_id = access_plist.getId();
- id = H5Fcreate(name, flags, create_plist_id, access_plist_id);
- if (id < 0) // throw an exception when open/create fail
- {
- throw FileIException("H5File constructor", "H5Fcreate failed");
- }
+ hid_t create_plist_id = create_plist.getId();
+ hid_t access_plist_id = access_plist.getId();
+ id = H5Fcreate(name, flags, create_plist_id, access_plist_id);
+ if (id < 0) // throw an exception when open/create fail
+ {
+ throw FileIException("H5File constructor", "H5Fcreate failed");
+ }
}
// Open the file if none of the bits above are set.
else
{
- hid_t access_plist_id = access_plist.getId();
- id = H5Fopen(name, flags, access_plist_id);
- if (id < 0) // throw an exception when open/create fail
- {
- throw FileIException("H5File constructor", "H5Fopen failed");
- }
+ hid_t access_plist_id = access_plist.getId();
+ id = H5Fopen(name, flags, access_plist_id);
+ if (id < 0) // throw an exception when open/create fail
+ {
+ throw FileIException("H5File constructor", "H5Fopen failed");
+ }
}
}
@@ -157,7 +157,7 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro
///\param existing_id - IN: Id of an existing file
// Programmer Binh-Minh Ribler - 2015
// Description
-// Mar 29, 2015
+// Mar 29, 2015
// Added in responding to a request from user Jason Newton.
// However, it is not recommended to use the private member "id"
// in applications. Unlike other situations, where similar
@@ -230,9 +230,9 @@ bool H5File::isHdf5(const H5std_string& name)
///\par Description
/// Valid values of \a flags include:
/// H5F_ACC_RDWR: Open with read/write access. If the file is
-/// currently open for read-only access then it
-/// will be reopened. Absence of this flag
-/// implies read-only access.
+/// currently open for read-only access then it
+/// will be reopened. Absence of this flag
+/// implies read-only access.
///
/// H5F_ACC_RDONLY: Open with read only access. - default
///
@@ -251,7 +251,7 @@ void H5File::openFile(const char* name, unsigned int flags, const FileAccPropLis
id = H5Fopen (name, flags, access_plist_id);
if (id < 0) // throw an exception when open fails
{
- throw FileIException("H5File::openFile", "H5Fopen failed");
+ throw FileIException("H5File::openFile", "H5Fopen failed");
}
}
@@ -397,14 +397,14 @@ hssize_t H5File::getFreeSpace() const
///\exception H5::FileIException
///\par Description
/// The valid values for \a types include:
-/// \li \c H5F_OBJ_FILE - Files only
-/// \li \c H5F_OBJ_DATASET - Datasets only
-/// \li \c H5F_OBJ_GROUP - Groups only
-/// \li \c H5F_OBJ_DATATYPE - Named datatypes only
-/// \li \c H5F_OBJ_ATTR - Attributes only
+/// \li \c H5F_OBJ_FILE - Files only
+/// \li \c H5F_OBJ_DATASET - Datasets only
+/// \li \c H5F_OBJ_GROUP - Groups only
+/// \li \c H5F_OBJ_DATATYPE - Named datatypes only
+/// \li \c H5F_OBJ_ATTR - Attributes only
/// \li \c H5F_OBJ_ALL - All of the above, i.e., \c H5F_OBJ_FILE
-/// | \c H5F_OBJ_DATASET | \c H5F_OBJ_GROUP
-/// | \c H5F_OBJ_DATATYPE | \c H5F_OBJ_ATTR
+/// | \c H5F_OBJ_DATASET | \c H5F_OBJ_GROUP
+/// | \c H5F_OBJ_DATATYPE | \c H5F_OBJ_ATTR
///\par
/// Multiple object types can be combined with the logical OR operator (|).
// Programmer Binh-Minh Ribler - May 2004
@@ -425,19 +425,19 @@ ssize_t H5File::getObjCount(unsigned types) const
/// groups and datatypes) in the same file.
///\param types - Type of object to retrieve the count
///\param max_objs - Maximum number of object identifiers to place
-/// into obj_id_list.
+/// into obj_id_list.
///\param oid_list - List of open object identifiers
///\exception H5::FileIException
///\par Description
/// The valid values for \a types include:
-/// \li \c H5F_OBJ_FILE - Files only
-/// \li \c H5F_OBJ_DATASET - Datasets only
-/// \li \c H5F_OBJ_GROUP - Groups only
-/// \li \c H5F_OBJ_DATATYPE - Named datatypes only
-/// \li \c H5F_OBJ_ATTR - Attributes only
+/// \li \c H5F_OBJ_FILE - Files only
+/// \li \c H5F_OBJ_DATASET - Datasets only
+/// \li \c H5F_OBJ_GROUP - Groups only
+/// \li \c H5F_OBJ_DATATYPE - Named datatypes only
+/// \li \c H5F_OBJ_ATTR - Attributes only
/// \li \c H5F_OBJ_ALL - All of the above, i.e., \c H5F_OBJ_FILE
-/// | \c H5F_OBJ_DATASET | \c H5F_OBJ_GROUP
-/// | \c H5F_OBJ_DATATYPE | \c H5F_OBJ_ATTR
+/// | \c H5F_OBJ_DATASET | \c H5F_OBJ_GROUP
+/// | \c H5F_OBJ_DATATYPE | \c H5F_OBJ_ATTR
///\par
/// Multiple object types can be combined with the logical OR operator (|).
//
@@ -459,7 +459,7 @@ void H5File::getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const
/// driver.
///\param fapl - File access property list
///\param file_handle - Pointer to the file handle being used by
-/// the low-level virtual file driver
+/// the low-level virtual file driver
///\exception H5::FileIException
///\par Description
/// For the \c FAMILY or \c MULTI drivers, \a fapl should be
@@ -487,10 +487,10 @@ void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
// Purpose This is an overloaded member function, kept for backward
// compatibility. It differs from the above function in that it
// misses const's. This wrapper will be removed in future release.
-// Param fapl - File access property list
-// Param file_handle - Pointer to the file handle being used by
-// the low-level virtual file driver
-// Exception H5::FileIException
+// Param fapl - File access property list
+// Param file_handle - Pointer to the file handle being used by
+// the low-level virtual file driver
+// Exception H5::FileIException
// Programmer Binh-Minh Ribler - May 2004
// Modification
// Planned for removal. -BMR, 2014/04/16
@@ -508,7 +508,7 @@ void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
/// It differs from the above function only in what arguments it
/// accepts.
///\param file_handle - Pointer to the file handle being used by
-/// the low-level virtual file driver
+/// the low-level virtual file driver
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
@@ -547,7 +547,7 @@ hsize_t H5File::getFileSize() const
///\brief Get the id of this file
///\return File identifier
// Modification
-// May 2008 - BMR
+// May 2008 - BMR
// Class hierarchy is revised to address bugzilla 1068. Class
// AbstractDS and Attribute are moved out of H5Object. In
// addition, member IdComponent::id is moved into subclasses, and
@@ -562,8 +562,8 @@ hid_t H5File::getId() const
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5File::reopen
-// Purpose Reopens this file.
-// Exception H5::FileIException
+// Purpose Reopens this file.
+// Exception H5::FileIException
// Description
// This function is replaced by the above function reOpen.
// Programmer Binh-Minh Ribler - 2000
@@ -575,14 +575,15 @@ void H5File::reopen()
//--------------------------------------------------------------------------
// Function: H5File::getLocId
-// Purpose Get the id of this file
+// Purpose Get the id of this file
// Description
// This function is a redefinition of CommonFG::getLocId. It
// is used by CommonFG member functions to get the file id.
// Programmer Binh-Minh Ribler - 2000
// Deprecated:
-// After HDFFV-9920, the Group's methods can use getId() and getLocId()
-// is kept for backward compatibility. Aug 18, 2016 -BMR
+// Aug 18, 2016 -BMR
+// After HDFFV-9920, the Group's methods can use getId() and
+// getLocId() is kept for backward compatibility.
//--------------------------------------------------------------------------
hid_t H5File::getLocId() const
{
@@ -626,13 +627,13 @@ void H5File::close()
{
if (p_valid_id(id))
{
- herr_t ret_value = H5Fclose(id);
- if (ret_value < 0)
- {
- throw FileIException("H5File::close", "H5Fclose failed");
- }
- // reset the id
- id = H5I_INVALID_HID;
+ herr_t ret_value = H5Fclose(id);
+ if (ret_value < 0)
+ {
+ throw FileIException("H5File::close", "H5Fclose failed");
+ }
+ // reset the id
+ id = H5I_INVALID_HID;
}
}
@@ -643,7 +644,7 @@ void H5File::close()
///\param msg - Message describing the failure
///\exception H5::FileIException
// Description
-// This function is also used in H5Location implementation so that
+// This function is also used in H5Location implementation so that
// proper exception can be thrown for file or group. The
// "H5File::" will be inserted to indicate the function called is
// an implementation of H5File.
@@ -669,9 +670,9 @@ void H5File::throwException(const H5std_string& func_name, const H5std_string& m
H5File::~H5File()
{
try {
- close();
+ close();
} catch (Exception& close_error) {
- cerr << "H5File::~H5File - " << close_error.getDetailMsg() << endl;
+ cerr << "H5File::~H5File - " << close_error.getDetailMsg() << endl;
}
}
diff --git a/c++/src/H5File.h b/c++/src/H5File.h
index 5ac9118..df5cca6 100644
--- a/c++/src/H5File.h
+++ b/c++/src/H5File.h
@@ -17,7 +17,6 @@
#ifndef __H5File_H
#define __H5File_H
-
namespace H5 {
/*! \class H5File
@@ -123,7 +122,8 @@ class H5_DLLCPP H5File : public Group {
// constructors taking a string or a char*
void p_get_file(const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist);
-};
-}
+}; // end of H5File
+} // namespace H5
+
#endif // __H5File_H
diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp
index 5902cbe..f573add 100644
--- a/c++/src/H5FloatType.cpp
+++ b/c++/src/H5FloatType.cpp
@@ -95,11 +95,12 @@ FloatType::FloatType(const DataSet& dataset) : AtomType()
// Function: FloatType overloaded constructor
///\brief Creates an FloatType instance by opening an HDF5 float datatype
/// given its name, provided as a C character string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Float type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openFloatType(const char*)
// to improve usability.
// -BMR, Dec 2016
@@ -113,11 +114,12 @@ FloatType::FloatType(const H5Location& loc, const char *dtype_name) : AtomType()
// Function: FloatType overloaded constructor
///\brief Creates an FloatType instance by opening an HDF5 float datatype
/// given its name, provided as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Float type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openFloatType(const H5std_string&)
// to improve usability.
// -BMR, Dec 2016
diff --git a/c++/src/H5FloatType.h b/c++/src/H5FloatType.h
index 2c925de..8affa1a 100644
--- a/c++/src/H5FloatType.h
+++ b/c++/src/H5FloatType.h
@@ -75,6 +75,8 @@ class H5_DLLCPP FloatType : public AtomType {
// Noop destructor.
virtual ~FloatType();
-};
-}
+
+}; // end of FloatType
+} // namespace H5
+
#endif // __H5FloatType_H
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index 6e5cdaa..66e2339 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -66,6 +66,9 @@ Group::Group(const Group& original) : H5Object(), CommonFG(), id(original.id)
//--------------------------------------------------------------------------
// Function: Group::getObjId
///\brief Opens an object via object header.
+///\param obj_name - IN: Path to the object
+///\param plist - IN: Access property list for the link pointing to
+/// the object
///\exception H5::FileIException or H5::GroupIException
///\par Description
/// This function opens an object in a group or file, using
@@ -88,6 +91,8 @@ hid_t Group::getObjId(const char* obj_name, const PropList& plist) const
///\brief This is an overloaded member function, provided for convenience.
/// It takes a reference to a \c H5std_string for the object's name.
///\param obj_name - IN: Path to the object
+///\param plist - IN: Access property list for the link pointing to
+/// the object
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - March, 2017
//--------------------------------------------------------------------------
@@ -113,14 +118,15 @@ void Group::closeObjId(hid_t obj_id) const
//--------------------------------------------------------------------------
// Function: Group::getLocId
-// Purpose: Get the id of this group
+// Purpose: Get the id of this group
// Programmer Binh-Minh Ribler - 2000
// Description
// This function is a redefinition of CommonFG::getLocId. It
// is used by CommonFG member functions to get the file id.
// Deprecated:
-// After HDFFV-9920, the Group's methods can use getId() and getLocId()
-// is kept for backward compatibility. Aug 18, 2016 -BMR
+// Aug 18, 2016 -BMR
+// After HDFFV-9920, the Group's methods can use getId() and
+// getLocId() is kept for backward compatibility.
//--------------------------------------------------------------------------
hid_t Group::getLocId() const
{
@@ -158,15 +164,19 @@ Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type, const
//--------------------------------------------------------------------------
// Function: Group overload constructor - dereference
-///\brief Given a reference, ref, to an hdf5 group, creates a Group object
-///\param attr - IN: Specifying location where the referenced object is in
-///\param ref - IN: Reference pointer
-///\param ref_type - IN: Reference type - default to H5R_OBJECT
-///\param plist - IN: Property list - default to PropList::DEFAULT
-///\exception H5::ReferenceException
+// brief Given a reference, ref, to an hdf5 group, creates a Group objec
+// param attr - IN: Specifying location where the referenced object is i
+// param ref - IN: Reference pointer
+// param ref_type - IN: Reference type - default to H5R_OBJECT
+// param plist - IN: Property list - default to PropList::DEFAULT
+// exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
+// Modification
+// Mar, 2017
+// Removed in 1.10.1 because H5Location is Attribute's baseclass
+// now. -BMR
//--------------------------------------------------------------------------
- /* Group::Group(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID)
+/* Group::Group(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID)
{
id = H5Location::p_dereference(attr.getId(), ref, ref_type, plist, "constructor - by dereference");
}
@@ -227,13 +237,13 @@ void Group::close()
{
if (p_valid_id(id))
{
- herr_t ret_value = H5Gclose(id);
- if (ret_value < 0)
- {
- throwException("Group::close", "H5Gclose failed");
- }
- // reset the id
- id = H5I_INVALID_HID;
+ herr_t ret_value = H5Gclose(id);
+ if (ret_value < 0)
+ {
+ throwException("Group::close", "H5Gclose failed");
+ }
+ // reset the id
+ id = H5I_INVALID_HID;
}
}
@@ -270,10 +280,10 @@ void Group::throwException(const H5std_string& func_name, const H5std_string& ms
Group::~Group()
{
try {
- close();
+ close();
}
catch (Exception& close_error) {
- cerr << "Group::~Group - " << close_error.getDetailMsg() << endl;
+ cerr << "Group::~Group - " << close_error.getDetailMsg() << endl;
}
}
diff --git a/c++/src/H5Group.h b/c++/src/H5Group.h
index 3118aa7..c8b2961 100644
--- a/c++/src/H5Group.h
+++ b/c++/src/H5Group.h
@@ -52,6 +52,7 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
// Creates a group by way of dereference.
Group(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
+ // Removed in 1.10.1, because H5Location is baseclass
// Group(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
// Opens an object within a group or a file, i.e., root group.
@@ -84,7 +85,8 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
private:
hid_t id; // HDF5 group id
-};
-}
+}; // end of Group
+} // namespace H5
+
#endif // __Group_H
diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp
index 0bcc67a..122479f 100644
--- a/c++/src/H5IdComponent.cpp
+++ b/c++/src/H5IdComponent.cpp
@@ -24,6 +24,7 @@
namespace H5 {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
// This flag indicates whether H5Library::initH5cpp has been called to register
// the terminating functions with atexit()
bool IdComponent::H5cppinit = false;
@@ -32,6 +33,7 @@ bool IdComponent::H5cppinit = false;
// Subclasses that have global constants use it. This is a temporary
// work-around in 1.8.16. It will be removed after HDFFV-9540 is fixed.
bool IdComponent::H5dontAtexit_called = false;
+#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: IdComponent::incRefCount
@@ -165,7 +167,7 @@ H5I_type_t IdComponent::getHDFObjType() const
// Function: getNumMembers (static)
///\brief Returns the number of members of the given type.
///\return Number of members
-///\Description
+///\par Description
/// If there is no member of the given type, getNumMembers will
/// return 0. Valid types are:
/// \li \c H5I_FILE (= 1)
@@ -197,9 +199,9 @@ hsize_t IdComponent::getNumMembers(H5I_type_t type)
// Function: isValid (static)
///\brief Checks if the given ID is valid.
///\return true if the given identifier is valid, and false, otherwise.
-///\Description
+///\par Description
/// A valid ID is one that is in use and has an application
-/// reference count of at least 1.
+/// reference count of at least 1.
// Programmer Binh-Minh Ribler - Mar 1, 2017
//--------------------------------------------------------------------------
bool IdComponent::isValid(hid_t an_id)
@@ -219,7 +221,7 @@ bool IdComponent::isValid(hid_t an_id)
///\brief Queries if a given type is currently registered with the
/// library.
///\return true if the given type exists, and false, otherwise.
-///\Description
+///\par Description
/// Valid types are:
/// \li \c H5I_FILE (= 1)
/// \li \c H5I_GROUP
diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h
index b449d4a..0603e5c 100644
--- a/c++/src/H5IdComponent.h
+++ b/c++/src/H5IdComponent.h
@@ -123,6 +123,6 @@ class H5_DLLCPP IdComponent {
#endif // DOXYGEN_SHOULD_SKIP_THIS
}; // end class IdComponent
+} // namespace H5
-}
#endif // __IdComponent_H
diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp
index c64dae9..3aadcab 100644
--- a/c++/src/H5IntType.cpp
+++ b/c++/src/H5IntType.cpp
@@ -94,11 +94,12 @@ IntType::IntType(const DataSet& dataset) : AtomType()
// Function: IntType overloaded constructor
///\brief Creates a IntType instance by opening an HDF5 integer datatype
/// given its name as a char*.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Integer type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openIntType(const char*) to
// improve usability.
// -BMR, Dec 2016
@@ -112,11 +113,12 @@ IntType::IntType(const H5Location& loc, const char *dtype_name) : AtomType()
// Function: IntType overloaded constructor
///\brief Creates a IntType instance by opening an HDF5 integer datatype
/// given its name, provided as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Integer type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openArrayType(const H5std_string&)
// to improve usability.
// -BMR, Dec 2016
diff --git a/c++/src/H5IntType.h b/c++/src/H5IntType.h
index ae4b3df..1ce05c8 100644
--- a/c++/src/H5IntType.h
+++ b/c++/src/H5IntType.h
@@ -57,6 +57,8 @@ class H5_DLLCPP IntType : public AtomType {
// Noop destructor.
virtual ~IntType();
-};
-}
+
+}; // end of IntType
+} // namespace H5
+
#endif // __H5IntType_H
diff --git a/c++/src/H5LaccProp.h b/c++/src/H5LaccProp.h
index 1cb80f7..f31c3fc 100644
--- a/c++/src/H5LaccProp.h
+++ b/c++/src/H5LaccProp.h
@@ -69,6 +69,7 @@ class H5_DLLCPP LinkAccPropList : public PropList {
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+}; // end of LinkAccPropList
+} // namespace H5
+
#endif // __H5LinkAccPropList_H
diff --git a/c++/src/H5Library.h b/c++/src/H5Library.h
index 018ba38..76b5f82 100644
--- a/c++/src/H5Library.h
+++ b/c++/src/H5Library.h
@@ -69,6 +69,7 @@ class H5_DLLCPP H5Library {
~H5Library();
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+}; // end of H5Library
+} // namespace H5
+
#endif // __H5Library_H
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index 5a0bb73..79b353a 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -524,16 +524,19 @@ void H5Location::dereference(const H5Location& loc, const void* ref, H5R_type_t
//--------------------------------------------------------------------------
// Function: H5Location::dereference
-///\brief Dereferences a reference into an HDF5 object, given an attribute.
-///\param attr - IN: Attribute specifying the location of the referenced object
-///\param ref - IN: Reference pointer
-///\param ref_type - IN: Reference type
-///\param plist - IN: Property list - default to PropList::DEFAULT
-///\exception H5::ReferenceException
+// brief Dereferences a reference into an HDF5 object, given an attribute.
+// param attr - IN: Attribute specifying the location of the referenced object
+// param ref - IN: Reference pointer
+// param ref_type - IN: Reference type
+// param plist - IN: Property list - default to PropList::DEFAULT
+// exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// May, 2008
-// Corrected missing parameters. - BMR
+// Corrected missing parameters. -BMR
+// Mar, 2017
+// Removed in 1.10.1 because H5Location is Attribute's baseclass
+// now. -BMR
//--------------------------------------------------------------------------
/* void H5Location::dereference(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist)
{
@@ -865,7 +868,7 @@ DataSet H5Location::createDataSet(const char* name, const DataType& data_type, c
//--------------------------------------------------------------------------
DataSet H5Location::createDataSet(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist) const
{
- return(createDataSet( name.c_str(), data_type, data_space, create_plist));
+ return(createDataSet(name.c_str(), data_type, data_space, create_plist));
}
//--------------------------------------------------------------------------
diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h
index 337a2b3..48fc2b1 100644
--- a/c++/src/H5Location.h
+++ b/c++/src/H5Location.h
@@ -86,6 +86,7 @@ class H5_DLLCPP H5Location : public IdComponent {
// Open a referenced object whose location is specified by either
// a file, an HDF5 object, or an attribute.
void dereference(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
+ // Removed in 1.10.1, because H5Location is baseclass
//void dereference(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
// Retrieves a dataspace with the region pointed to selected.
@@ -220,7 +221,7 @@ class H5_DLLCPP H5Location : public IdComponent {
// Noop destructor.
virtual ~H5Location();
-}; /* end class H5Location */
+}; // end of H5Location
+} // namespace H5
-}
#endif // __H5Location_H
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index b5d0f88..359fab2 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -51,7 +51,6 @@ extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name,
myData->op(*myData->location, s_attr_name, myData->opData);
return 0;
}
-#endif
//--------------------------------------------------------------------------
// Function: H5Object default constructor (protected)
@@ -101,6 +100,7 @@ void f_Attribute_setId(Attribute* attr, hid_t new_id)
{
attr->p_setId(new_id);
}
+#endif
//--------------------------------------------------------------------------
// Function: H5Object::createAttribute
@@ -391,6 +391,8 @@ void H5Object::renameAttr(const H5std_string& oldname, const H5std_string& newna
{
renameAttr (oldname.c_str(), newname.c_str());
}
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: getObjName
///\brief Given an id, returns the type of the object.
@@ -502,7 +504,6 @@ ssize_t H5Object::getObjName(H5std_string& obj_name, size_t len) const
return(name_size);
}
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Object destructor
///\brief Noop destructor.
diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h
index 866d739..53f183e 100644
--- a/c++/src/H5Object.h
+++ b/c++/src/H5Object.h
@@ -131,7 +131,7 @@ class H5_DLLCPP H5Object : public H5Location {
#endif // DOXYGEN_SHOULD_SKIP_THIS
-}; /* end class H5Object */
+}; // end of H5Object
+} // namespace H5
-}
#endif // __H5Object_H
diff --git a/c++/src/H5OcreatProp.cpp b/c++/src/H5OcreatProp.cpp
index 6fdd9dc..9a3af7e 100644
--- a/c++/src/H5OcreatProp.cpp
+++ b/c++/src/H5OcreatProp.cpp
@@ -155,7 +155,7 @@ void ObjCreatPropList::getAttrPhaseChange(unsigned& max_compact, unsigned& min_d
//--------------------------------------------------------------------------
// Function: ObjCreatPropList::setAttrCrtOrder
-///\brief Sets tracking and indexing of attribute creation order.
+///\brief Set the flags for creation order of attributes on an object
///\param crt_order_flags - IN: Flags specifying whether to track and
/// index attribute creation order. Default: No flag set
///\exception H5::PropListIException
@@ -183,10 +183,9 @@ void ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const
//--------------------------------------------------------------------------
// Function: ObjCreatPropList::getAttrCrtOrder
-///\brief Gets tracking and indexing settings for attribute
-/// creation order.
-///\param crt_order_flags - OUT: Flags specifying whether to track and
-/// index attribute creation order
+///\brief Returns the flags indicating creation order is tracked/indexed
+/// for attributes on an object.
+///\return The flags
///\exception H5::PropListIException
///\par Description
/// When no flag is set, i.e. crt_order_flags = 0, attribute
diff --git a/c++/src/H5OcreatProp.h b/c++/src/H5OcreatProp.h
index 4858e07..c9c245a 100644
--- a/c++/src/H5OcreatProp.h
+++ b/c++/src/H5OcreatProp.h
@@ -72,6 +72,7 @@ class H5_DLLCPP ObjCreatPropList : public PropList {
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+}; // end of ObjCreatPropList
+} // namespace H5
+
#endif // __H5ObjCreatPropList_H
diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h
index a8d6e37..2fd8a6b 100644
--- a/c++/src/H5PredType.h
+++ b/c++/src/H5PredType.h
@@ -438,6 +438,7 @@ class H5_DLLCPP PredType : public AtomType {
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+}; // end of PredType
+} // namespace H5
+
#endif // __H5PredType_H
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp
index c4176c2..0df0a9f 100644
--- a/c++/src/H5PropList.cpp
+++ b/c++/src/H5PropList.cpp
@@ -565,8 +565,27 @@ size_t PropList::getNumProps() const
///\param name - IN: Name of property to set - \c char pointer
///\param value - IN: Void pointer to the value for the property
///\exception H5::PropListIException
+// Description
+// Revision svn r29815 changed 'value' to const, hence, deprecated
+// the non-const setProperty.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
+void PropList::setProperty(const char* name, const void* value) const
+{
+ herr_t ret_value = H5Pset(id, name, value);
+ if (ret_value < 0)
+ {
+ throw PropListIException(inMemFunc("setProperty"), "H5Pset failed");
+ }
+}
+
+//--------------------------------------------------------------------------
+// Function: PropList::setProperty
+///\brief Deprecated due to missing const in prototype. (1.10.1)
+// Programmer: Binh-Minh Ribler - March, 2017
+// Modification
+// Planned for removal. -BMR, 2017/03/17 1.10.1
+//--------------------------------------------------------------------------
void PropList::setProperty(const char* name, void* value) const
{
herr_t ret_value = H5Pset(id, name, value);
@@ -575,6 +594,7 @@ void PropList::setProperty(const char* name, void* value) const
throw PropListIException(inMemFunc("setProperty"), "H5Pset failed");
}
}
+
//--------------------------------------------------------------------------
// Function: PropList::setProperty
///\brief This is an overloaded member function, provided for convenience.
@@ -582,11 +602,14 @@ void PropList::setProperty(const char* name, void* value) const
/// accepts.
///\param name - IN: Name of property to set - \c char pointer
///\param charptr - IN: Char pointer to the value for the property
+// Description
+// Revision svn r29815 changed 'value' to const, hence, deprecated
+// the non-const setProperty.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void PropList::setProperty(const char* name, const char* charptr) const
{
- herr_t ret_value = H5Pset(id, name, (void*)charptr);
+ herr_t ret_value = H5Pset(id, name, (const void*)charptr);
if (ret_value < 0)
{
throw PropListIException(inMemFunc("setProperty"), "H5Pset failed");
@@ -601,6 +624,18 @@ void PropList::setProperty(const char* name, const char* charptr) const
///\param strg - IN: Value for the property is a \c H5std_string
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
+void PropList::setProperty(const char* name, const H5std_string& strg) const
+{
+ setProperty(name, strg.c_str());
+}
+
+//--------------------------------------------------------------------------
+// Function: PropList::setProperty
+///\brief Deprecated due to missing const in prototype. (1.10.1)
+// Programmer: Binh-Minh Ribler - March, 2017
+// Modification
+// Planned for removal. -BMR, 2017/03/17 1.10.1
+//--------------------------------------------------------------------------
void PropList::setProperty(const char* name, H5std_string& strg) const
{
setProperty(name, strg.c_str());
@@ -615,6 +650,18 @@ void PropList::setProperty(const char* name, H5std_string& strg) const
///\param value - IN: Void pointer to the value for the property
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
+void PropList::setProperty(const H5std_string& name, const void* value) const
+{
+ setProperty(name.c_str(), value);
+}
+
+//--------------------------------------------------------------------------
+// Function: PropList::setProperty
+///\brief Deprecated due to missing const in prototype. (1.10.1)
+// Programmer: Binh-Minh Ribler - March, 2017
+// Modification
+// Planned for removal. -BMR, 2017/03/17 1.10.1
+//--------------------------------------------------------------------------
void PropList::setProperty(const H5std_string& name, void* value) const
{
setProperty(name.c_str(), value);
@@ -629,6 +676,18 @@ void PropList::setProperty(const H5std_string& name, void* value) const
///\param strg - IN: Value for the property is a \c H5std_string
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
+void PropList::setProperty(const H5std_string& name, const H5std_string& strg) const
+{
+ setProperty(name.c_str(), strg.c_str());
+}
+
+//--------------------------------------------------------------------------
+// Function: PropList::setProperty
+///\brief Deprecated due to missing const in prototype. (1.10.1)
+// Programmer: Binh-Minh Ribler - March, 2017
+// Modification
+// Planned for removal. -BMR, 2017/03/17 1.10.1
+//--------------------------------------------------------------------------
void PropList::setProperty(const H5std_string& name, H5std_string& strg) const
{
setProperty(name.c_str(), strg.c_str());
diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h
index 3977774..772e96c 100644
--- a/c++/src/H5PropList.h
+++ b/c++/src/H5PropList.h
@@ -78,8 +78,13 @@ class H5_DLLCPP PropList : public IdComponent {
H5std_string getProperty(const H5std_string& name) const;
// Set a property's value in a property list.
- void setProperty(const char* name, void* value) const;
void setProperty(const char* name, const char* charptr) const;
+ void setProperty(const char* name, const void* value) const;
+ void setProperty(const char* name, const H5std_string& strg) const;
+ void setProperty(const H5std_string& name, const void* value) const;
+ void setProperty(const H5std_string& name, const H5std_string& strg) const;
+ // Deprecated after 1.10.1, missing const
+ void setProperty(const char* name, void* value) const;
void setProperty(const char* name, H5std_string& strg) const;
void setProperty(const H5std_string& name, void* value) const;
void setProperty(const H5std_string& name, H5std_string& strg) const;
@@ -135,7 +140,8 @@ class H5_DLLCPP PropList : public IdComponent {
friend void f_PropList_setId(PropList* plist, hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+}; // end of PropList
+} // namespace H5
+
#endif // __H5PropList_H
diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp
index 54981ab..db1cf04 100644
--- a/c++/src/H5StrType.cpp
+++ b/c++/src/H5StrType.cpp
@@ -148,11 +148,12 @@ StrType::StrType(const DataSet& dataset) : AtomType ()
// Function: StrType overloaded constructor
///\brief Creates an StrType instance by opening an HDF5 string datatype
/// given its name, provided as a C character string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: String type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openStrType(const char*) to
// improve usability.
// -BMR, Dec 2016
@@ -166,11 +167,12 @@ StrType::StrType(const H5Location& loc, const char *dtype_name) : AtomType()
// Function: StrType overloaded constructor
///\brief Creates an StrType instance by opening an HDF5 string datatype
/// given its name, provided as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: String type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openStrType(const H5std_string&)
// to improve usability.
// -BMR, Dec 2016
diff --git a/c++/src/H5StrType.h b/c++/src/H5StrType.h
index 3272ad3..aa87bba 100644
--- a/c++/src/H5StrType.h
+++ b/c++/src/H5StrType.h
@@ -69,6 +69,8 @@ class H5_DLLCPP StrType : public AtomType {
// Noop destructor.
virtual ~StrType();
-};
-}
+
+}; // end of StrType
+} // namespace H5
+
#endif // __H5StrType_H
diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp
index 7f50b9a..64029cc 100644
--- a/c++/src/H5VarLenType.cpp
+++ b/c++/src/H5VarLenType.cpp
@@ -76,11 +76,12 @@ VarLenType::VarLenType(const DataType* base_type) : DataType()
// Function: VarLenType overloaded constructor
///\brief Creates an VarLenType instance by opening an HDF5 variable
/// length datatype given its name, provided as a C char*.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Variable length type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openVarLenType(const char*) to
// improve usability.
// -BMR, Dec 2016
@@ -94,11 +95,12 @@ VarLenType::VarLenType(const H5Location& loc, const char *dtype_name) : DataType
// Function: VarLenType overloaded constructor
///\brief Creates an VarLenType instance by opening an HDF5 variable
/// length datatype given its name, provided as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Variable length type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openVarLenType(const H5std_string&)
// to improve usability.
// -BMR, Dec 2016
diff --git a/c++/src/H5VarLenType.h b/c++/src/H5VarLenType.h
index a93f44d..4dc0eb5 100644
--- a/c++/src/H5VarLenType.h
+++ b/c++/src/H5VarLenType.h
@@ -49,6 +49,8 @@ class H5_DLLCPP VarLenType : public DataType {
// Default constructor
VarLenType();
-};
-}
+
+}; // end of VarLenType
+} // namespace H5
+
#endif // __H5VarLenType_H
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp
index eb07657..715bb30 100644
--- a/c++/test/tfile.cpp
+++ b/c++/test/tfile.cpp
@@ -812,19 +812,17 @@ const H5std_string FILE7("tfile7.h5");
*
*-------------------------------------------------------------------------
*/
+const hsize_t FSP_SIZE_DEF = 4096;
+const hsize_t FSP_SIZE512 = 512;
static void test_file_info()
{
// Output message about test being performed
SUBTEST("File general information");
-#ifndef H5_NO_DEPRECATED_SYMBOLS
- hsize_t in_threshold = 2; // Free space section threshold to set */
- hsize_t out_threshold = 0; // Free space section threshold to get */
+ hsize_t out_threshold = 0; // Free space section threshold to get
+ hbool_t out_persist = FALSE;// Persist free-space read
// File space handling strategy
- H5F_file_space_type_t in_strategy = H5F_FILE_SPACE_ALL;
- // File space handling strategy
- H5F_file_space_type_t out_strategy = H5F_FILE_SPACE_DEFAULT;
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ H5F_fspace_strategy_t out_strategy = H5F_FSPACE_STRATEGY_FSM_AGGR;
try {
// Create a file using default properties.
@@ -843,14 +841,30 @@ static void test_file_info()
// Create file creation property list.
FileCreatPropList fcpl;
+ // Retrieve file space information.
+ fcpl.getFileSpaceStrategy(out_strategy, out_persist, out_threshold);
+
+ // Verify file space information.
+ verify_val(out_strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5File::getFileInfo", __LINE__, __FILE__);
+ verify_val(out_persist, FALSE, "H5File::getFileInfo", __LINE__, __FILE__);
+ verify_val(out_threshold, 1, "H5File::getFileInfo", __LINE__, __FILE__);
+
+ /* Retrieve file space page size */
+ hsize_t out_fsp_psize = fcpl.getFileSpacePagesize();
+ verify_val(out_fsp_psize, FSP_SIZE_DEF, "FileCreatPropList::getFileSpacePagesize", __LINE__, __FILE__);
+
// Set various file information.
fcpl.setUserblock(F2_USERBLOCK_SIZE);
fcpl.setSizes(F2_OFFSET_SIZE, F2_LENGTH_SIZE);
fcpl.setSymk(F2_SYM_INTERN_K, F2_SYM_LEAF_K);
fcpl.setIstorek(F2_ISTORE);
-#ifndef H5_NO_DEPRECATED_SYMBOLS
- fcpl.setFileSpace(in_strategy, in_threshold);
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
+ hsize_t threshold = 5; // Free space section threshold to set
+ hbool_t persist = TRUE; // Persist free-space to set
+ H5F_fspace_strategy_t strategy = H5F_FSPACE_STRATEGY_PAGE;
+
+ fcpl.setFileSpaceStrategy(strategy, persist, threshold);
+ fcpl.setFileSpacePagesize(FSP_SIZE512);
// Creating a file with the non-default file creation property list
// should create a version 1 superblock
@@ -863,11 +877,7 @@ static void test_file_info()
// Get the file's version information.
file7.getFileInfo(finfo);
-#ifndef H5_NO_DEPRECATED_SYMBOLS
verify_val(finfo.super.version, 2, "H5File::getFileInfo", __LINE__, __FILE__);
-#else /* H5_NO_DEPRECATED_SYMBOLS */
- verify_val(finfo.super.version, 1, "H5File::getFileInfo", __LINE__, __FILE__);
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
verify_val(finfo.free.version, 0, "H5File::getFileInfo", __LINE__, __FILE__);
verify_val(finfo.sohm.version, 0, "H5File::getFileInfo", __LINE__, __FILE__);
@@ -882,11 +892,7 @@ static void test_file_info()
// Get the file's version information.
file7.getFileInfo(finfo);
-#ifndef H5_NO_DEPRECATED_SYMBOLS
verify_val(finfo.super.version, 2, "H5File::getFileInfo", __LINE__, __FILE__);
-#else /* H5_NO_DEPRECATED_SYMBOLS */
- verify_val(finfo.super.version, 1, "H5File::getFileInfo", __LINE__, __FILE__);
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
verify_val(finfo.free.version, 0, "H5File::getFileInfo", __LINE__, __FILE__);
verify_val(finfo.sohm.version, 0, "H5File::getFileInfo", __LINE__, __FILE__);
@@ -912,14 +918,14 @@ static void test_file_info()
VERIFY(nindexes, MISC11_NINDEXES, "H5Pget_shared_mesg_nindexes");
*/
-#ifndef H5_NO_DEPRECATED_SYMBOLS
// Get and verify the file space info from the creation property list */
- out_strategy = fcpl2.getFileSpaceStrategy();
- verify_val(static_cast<unsigned>(out_strategy), static_cast<unsigned>(in_strategy), "FileCreatPropList::getFileSpaceStrategy", __LINE__, __FILE__);
+ fcpl2.getFileSpaceStrategy(out_strategy, out_persist, out_threshold);
+ verify_val(out_strategy, strategy, "FileCreatPropList::getFileSpaceStrategy", __LINE__, __FILE__);
+ verify_val(out_persist, persist, "FileCreatPropList::getFileSpaceStrategy", __LINE__, __FILE__);
+ verify_val(out_threshold, threshold, "FileCreatPropList::getFileSpaceStrategy", __LINE__, __FILE__);
- out_threshold = fcpl2.getFileSpaceThreshold();
- verify_val(static_cast<unsigned>(out_threshold), static_cast<unsigned>(in_threshold), "FileCreatPropList::getFileSpaceThreshold", __LINE__, __FILE__);
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ out_fsp_psize = fcpl2.getFileSpacePagesize();
+ verify_val(out_fsp_psize, FSP_SIZE512, "FileCreatPropList::getFileSpacePagesize", __LINE__, __FILE__);
PASSED();
} // end of try block
diff --git a/c++/test/titerate.cpp b/c++/test/titerate.cpp
index fce42fa..34e6892 100644
--- a/c++/test/titerate.cpp
+++ b/c++/test/titerate.cpp
@@ -503,9 +503,9 @@ void test_iterate()
FileAccPropList fapl;
fapl.setLibverBounds(H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
- test_iter_group(fapl); // Test iterating groups
- test_HDFFV_9920(); // Test the fix of HDFFV-9920
- //test_iter_attr(fapl); // Test iterating attributes
+ test_iter_group(fapl); // Test iterating groups
+ test_HDFFV_9920(); // Test the fix of HDFFV-9920
+ //test_iter_attr(fapl); // Test iterating attributes
} // test_iterate
diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp
index d8a0d5f..c232809 100644
--- a/c++/test/trefer.cpp
+++ b/c++/test/trefer.cpp
@@ -16,7 +16,7 @@
/*****************************************************************************
FILE
trefer.cpp - HDF5 C++ testing the functionalities associated with the C
- Reference interface (H5R)
+ Reference interface (H5R)
***************************************************************************/
#ifdef OLD_HEADER_FILENAME
@@ -93,7 +93,7 @@ test_reference_params(void)
file1 = new H5File (FILE1, H5F_ACC_TRUNC);
// Create dataspace for datasets
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
DataSpace sid1(SPACE1_RANK, dims1);
// Create a group
@@ -172,7 +172,7 @@ test_reference_params(void)
catch (Exception& E)
{
issue_fail_msg("test_reference_param()",__LINE__,__FILE__,
- E.getCFuncName(), E.getCDetailMsg());
+ E.getCFuncName(), E.getCDetailMsg());
}
if(file1)
@@ -209,7 +209,7 @@ static void test_reference_obj(void)
file1 = new H5File (FILE1, H5F_ACC_TRUNC);
// Create dataspace for datasets
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
DataSpace sid1(SPACE1_RANK, dims1);
// Create dataset access property list
@@ -364,7 +364,7 @@ static void test_reference_obj(void)
catch (Exception& E)
{
issue_fail_msg("test_reference_obj()",__LINE__,__FILE__,
- E.getCFuncName(), E.getCDetailMsg());
+ E.getCFuncName(), E.getCDetailMsg());
}
if(file1)
@@ -493,7 +493,7 @@ test_reference_group(void)
catch (Exception& E)
{
issue_fail_msg("test_reference_group()",__LINE__,__FILE__,
- E.getCFuncName(), E.getCDetailMsg());
+ E.getCFuncName(), E.getCDetailMsg());
}
if(file1)
@@ -523,10 +523,10 @@ test_reference_region_1D(void)
SUBTEST("1-D Dataset Region Reference Functions");
try {
- hdset_reg_ref_t *wbuf, // buffer to write to disk
+ hdset_reg_ref_t *wbuf, // buffer to write to disk
*rbuf; // buffer read from disk
- uint8_t *dwbuf, // Buffer for writing numeric data to disk
- *drbuf; // Buffer for reading numeric data from disk
+ uint8_t *dwbuf, // Buffer for writing numeric data to disk
+ *drbuf; // Buffer for reading numeric data from disk
// Allocate write & read buffers
wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1);
@@ -538,7 +538,7 @@ test_reference_region_1D(void)
H5File file1(FILE2, H5F_ACC_TRUNC);
// Create dataspace for datasets
- hsize_t dims3[] = {SPACE3_DIM1};
+ hsize_t dims3[] = {SPACE3_DIM1};
DataSpace sid3(SPACE3_RANK, dims3);
// Create dataset access property list
@@ -558,7 +558,7 @@ test_reference_region_1D(void)
dset3.close();
// Create dataspace for datasets
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
DataSpace sid1(SPACE1_RANK, dims1);
// Create a dataset
@@ -785,7 +785,7 @@ test_reference_region_1D(void)
catch (Exception& E)
{
issue_fail_msg("test_reference_region_1D()",__LINE__,__FILE__,
- E.getCFuncName(), E.getCDetailMsg());
+ E.getCFuncName(), E.getCDetailMsg());
}
} /* test_reference_region_1D() */
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index 22db539..fee4115 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -272,9 +272,8 @@ static void test_query()
tcpl.close();
tid2.close();
- // Open the datatypes for query
+ // Open the datatypes for query. Testing both ways
- // Deprecated functions
tid1 = file.openCompType(CompT_NAME);
tid1.close();
tid2 = file.openEnumType(EnumT_NAME);
diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp
index 5dee1a2..859867b 100644
--- a/c++/test/tvlstr.cpp
+++ b/c++/test/tvlstr.cpp
@@ -57,7 +57,7 @@ static void *test_vlstr_alloc_custom(size_t size, void *info)
{
void *ret_value=NULL; // Pointer to return
size_t *mem_used=(size_t *)info; // Get the pointer to the memory used
- size_t extra; // Extra space needed
+ size_t extra; // Extra space needed
/*
* This weird contortion is required on the DEC Alpha to keep the
@@ -91,7 +91,7 @@ static void test_vlstr_free_custom(void *_mem, void *info)
{
unsigned char *mem;
size_t *mem_used=(size_t *)info; // Get the pointer to the memory used
- size_t extra; // Extra space needed
+ size_t extra; // Extra space needed
/*
* This weird contortion is required on the DEC Alpha to keep the
@@ -257,7 +257,7 @@ static void test_vlstring_array_dataset()
for (ii = 0; ii < SPACE1_DIM1; ii++)
{
if(HDstrcmp(string_ds_check[ii], string_ds_array[ii])!=0)
- TestErrPrintf("Line %d: Dataset data different: written=%s,read=%s\n",__LINE__, string_ds_array[ii], string_ds_check[ii]);
+ TestErrPrintf("Line %d: Dataset data different: written=%s,read=%s\n",__LINE__, string_ds_array[ii], string_ds_check[ii]);
HDfree(string_ds_check[ii]);
}
@@ -351,23 +351,26 @@ static void test_vlstrings_special()
hsize_t ii; // counting variable
for (ii=0; ii<SPACE1_DIM1; ii++)
if(rdata[ii]!=NULL)
- TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)ii,rdata[ii]);
+ TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)ii,rdata[ii]);
// Write dataset to disk, then read it back.
dataset.write(wdata, vlst);
dataset.read(rdata, vlst);
// Compare data read in.
- for (ii = 0; ii < SPACE1_DIM1; ii++) {
+ for (ii = 0; ii < SPACE1_DIM1; ii++)
+ {
size_t wlen = HDstrlen(wdata[ii]);
size_t rlen = HDstrlen(rdata[ii]);
- if(wlen != rlen) {
- TestErrPrintf("VL data lengths don't match!, strlen(wdata[%d])=%u, strlen(rdata[%d])=%u\n", (int)ii, (unsigned)wlen, (int)ii, (unsigned)rlen);
- continue;
+ if(wlen != rlen)
+ {
+ TestErrPrintf("VL data lengths don't match!, strlen(wdata[%d])=%u, strlen(rdata[%d])=%u\n", (int)ii, (unsigned)wlen, (int)ii, (unsigned)rlen);
+ continue;
} // end if
- if(HDstrcmp(wdata[ii],rdata[ii]) != 0) {
- TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)ii, wdata[ii], (int)ii, rdata[ii]);
- continue;
+ if(HDstrcmp(wdata[ii],rdata[ii]) != 0)
+ {
+ TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)ii, wdata[ii], (int)ii, rdata[ii]);
+ continue;
} // end if
} // end for
@@ -384,7 +387,7 @@ static void test_vlstrings_special()
// Create the property list and set the fill value for the second
// dataset.
DSetCreatPropList dcpl;
- char *fill = NULL; // Fill value
+ char *fill = NULL; // Fill value
dcpl.setFillValue(vlst, &fill);
dataset = file1.createDataSet("Dataset4", vlst, sid1, dcpl);
@@ -566,12 +569,12 @@ static void test_compact_vlstring()
hsize_t i;
for (i=0; i<SPACE1_DIM1; i++) {
if (HDstrlen(wdata[i])!=strlen(rdata[i])) {
- TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i]));
- continue;
+ TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i]));
+ continue;
} // end if
if (HDstrcmp(wdata[i],rdata[i]) != 0) {
- TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",(int)i,wdata[i],(int)i,rdata[i]);
- continue;
+ TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",(int)i,wdata[i],(int)i,rdata[i]);
+ continue;
} // end if
} // end for
@@ -800,7 +803,7 @@ static void test_vlstring_array_attribute()
for (ii = 0; ii < SPACE1_DIM1; ii++)
{
if(HDstrcmp(string_att_check[ii], string_att_array[ii])!=0)
- TestErrPrintf("Line %d: Attribute data different: written=%s,read=%s\n",__LINE__, string_att_check[ii], string_att_check[ii]);
+ TestErrPrintf("Line %d: Attribute data different: written=%s,read=%s\n",__LINE__, string_att_check[ii], string_att_check[ii]);
HDfree(string_att_check[ii]); // note: no need for std::string test
}
@@ -821,7 +824,7 @@ static void test_vlstring_array_attribute()
/* Helper routine for test_vl_rewrite() */
static void write_scalar_dset(H5File& file, DataType& type, DataSpace& space,
- char *name, char *data)
+ char *name, char *data)
{
DataSet dset;
try {
@@ -839,7 +842,7 @@ static void write_scalar_dset(H5File& file, DataType& type, DataSpace& space,
/* Helper routine for test_vl_rewrite() */
static void read_scalar_dset(H5File& file, DataType& type, DataSpace& space,
- char *name, char *data)
+ char *name, char *data)
{
char *data_read;
DataSet dset;
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 5dad4f3..55de8f8 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -41,17 +41,41 @@
/* As FC_FUNC, but for C identifiers containing underscores. */
#define @H5_FC_FUNC_@
-/* Define Fortran Maximum Real Decimal Precision */
-#cmakedefine H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@
-
-/* Define C Maximum Real Decimal Precision */
-#cmakedefine H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@
+/* Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE */
+#cmakedefine H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
/* Define if we have Fortran C_LONG_DOUBLE */
#cmakedefine H5_FORTRAN_HAVE_C_LONG_DOUBLE @H5_FORTRAN_HAVE_C_LONG_DOUBLE@
-/* Determine if __float128 is available */
-#cmakedefine H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@
+/* Define if we have Fortran intrinsic C_SIZEOF */
+#cmakedefine H5_FORTRAN_HAVE_C_SIZEOF @H5_FORTRAN_HAVE_C_SIZEOF@
+
+/* Define if we have Fortran intrinsic SIZEOF */
+#cmakedefine H5_FORTRAN_HAVE_SIZEOF @H5_FORTRAN_HAVE_SIZEOF@
+
+/* Define if we have Fortran intrinsic STORAGE_SIZE */
+#cmakedefine H5_FORTRAN_HAVE_STORAGE_SIZE @H5_FORTRAN_HAVE_STORAGE_SIZE@
+
+/* Determine the size of C long double */
+#cmakedefine H5_FORTRAN_SIZEOF_LONG_DOUBLE @H5_FORTRAN_SIZEOF_LONG_DOUBLE@
+
+/* Define Fortran compiler ID */
+#cmakedefine H5_Fortran_COMPILER_ID @H5_Fortran_COMPILER_ID@
+
+/* Define valid Fortran INTEGER KINDs */
+#cmakedefine H5_H5CONFIG_F_IKIND @H5_HH5_H5CONFIG_F_NUM_RKIND5CONFIG_F_IKIND@
+
+/* Define number of valid Fortran INTEGER KINDs */
+#cmakedefine H5_H5CONFIG_F_NUM_IKIND @H5_H5CONFIG_F_NUM_IKIND@
+
+/* Define number of valid Fortran REAL KINDs */
+#cmakedefine H5_H5CONFIG_F_NUM_RKIND @H5_H5CONFIG_F_NUM_RKIND@
+
+/* Define valid Fortran REAL KINDs */
+#cmakedefine H5_H5CONFIG_F_RKIND @H5_H5CONFIG_F_RKIND@
+
+/* Define valid Fortran REAL KINDs Sizeof */
+#cmakedefine H5_H5CONFIG_F_RKIND_SIZEOF @H5_H5CONFIG_F_RKIND_SIZEOF@
/* Define to 1 if you have the `alarm' function. */
#cmakedefine H5_HAVE_ALARM @H5_HAVE_ALARM@
@@ -81,7 +105,7 @@
/* Define to 1 if you have the `difftime' function. */
#cmakedefine H5_HAVE_DIFFTIME @H5_HAVE_DIFFTIME@
-/* Define if the direct I/O virtual file driver should be compiled */
+/* Define if the direct I/O virtual file driver (VFD) should be compiled */
#cmakedefine H5_HAVE_DIRECT @H5_HAVE_DIRECT@
/* Define to 1 if you have the <dirent.h> header file. */
@@ -108,6 +132,9 @@
/* Define if support for szip filter is enabled */
#cmakedefine H5_HAVE_FILTER_SZIP @H5_HAVE_FILTER_SZIP@
+/* Determine if __float128 is available */
+#cmakedefine H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@
+
/* Define to 1 if you have the `flock' function. */
#cmakedefine H5_HAVE_FLOCK @H5_HAVE_FLOCK@
@@ -162,7 +189,7 @@
/* Define if the compiler understands inline */
#cmakedefine H5_HAVE_INLINE @H5_HAVE_INLINE@
-/* Define if library will contain instrumentation to detect correct
+/* Define if parallel library will contain instrumentation to detect correct
optimization operation */
#cmakedefine H5_HAVE_INSTRUMENTED_LIBRARY @H5_HAVE_INSTRUMENTED_LIBRARY@
@@ -244,8 +271,8 @@
/* Define to 1 if you have the <pthread.h> header file. */
#cmakedefine H5_HAVE_PTHREAD_H @H5_HAVE_PTHREAD_H@
-/* Define to 1 if you have the 'InitOnceExecuteOnce' function. */
-#cmakedefine H5_HAVE_WIN_THREADS @H5_HAVE_WIN_THREADS@
+/* Define to 1 if you have the <quadmath.h> header file. */
+#cmakedefine H5_HAVE_QUADMATH_H @H5_HAVE_QUADMATH_H@
/* Define to 1 if you have the `random' function. */
#cmakedefine H5_HAVE_RANDOM @H5_HAVE_RANDOM@
@@ -254,10 +281,10 @@
#cmakedefine H5_HAVE_RAND_R @H5_HAVE_RAND_R@
/* Define to 1 if you have the `round' function. */
-#cmakedefine H5_HAVE_ROUNDF @H5_HAVE_ROUNDF@
+#cmakedefine H5_HAVE_ROUND @H5_HAVE_ROUND@
/* Define to 1 if you have the `roundf' function. */
-#cmakedefine H5_HAVE_ROUND @H5_HAVE_ROUND@
+#cmakedefine H5_HAVE_ROUNDF @H5_HAVE_ROUNDF@
/* Define to 1 if you have the `setjmp' function. */
#cmakedefine H5_HAVE_SETJMP @H5_HAVE_SETJMP@
@@ -292,6 +319,9 @@
/* Define if `struct stat' has the `st_blocks' field */
#cmakedefine H5_HAVE_STAT_ST_BLOCKS @H5_HAVE_STAT_ST_BLOCKS@
+/* Define to 1 if you have the <stdbool.h> header file. */
+#cmakedefine H5_HAVE_STDBOOL_H @H5_HAVE_STDBOOL_H@
+
/* Define to 1 if you have the <stddef.h> header file. */
#cmakedefine H5_HAVE_STDDEF_H @H5_HAVE_STDDEF_H@
@@ -307,6 +337,12 @@
/* 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 <strings.h> header file. */
#cmakedefine H5_HAVE_STRINGS_H @H5_HAVE_STRINGS_H@
@@ -325,6 +361,9 @@
/* Define to 1 if you have the `system' function. */
#cmakedefine H5_HAVE_SYSTEM @H5_HAVE_SYSTEM@
+/* Define to 1 if you have the <sys/file.h> header file. */
+#cmakedefine H5_HAVE_SYS_FILE_H @H5_HAVE_SYS_FILE_H@
+
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#cmakedefine H5_HAVE_SYS_IOCTL_H @H5_HAVE_SYS_IOCTL_H@
@@ -379,6 +418,9 @@
/* Define to 1 if you have the `waitpid' function. */
#cmakedefine H5_HAVE_WAITPID @H5_HAVE_WAITPID@
+/* Define to 1 if you have the 'InitOnceExecuteOnce' function. */
+#cmakedefine H5_HAVE_WIN_THREADS @H5_HAVE_WIN_THREADS@
+
/* Define if your system has window style path name. */
#cmakedefine H5_HAVE_WINDOW_PATH @H5_HAVE_WINDOW_PATH@
@@ -419,10 +461,12 @@
with special algorithm. */
#cmakedefine H5_LONG_TO_LDOUBLE_SPECIAL @H5_LONG_TO_LDOUBLE_SPECIAL@
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
#cmakedefine H5_LT_OBJDIR @H5_LT_OBJDIR@
+/* Define to enable internal memory allocation sanity checking. */
+/* #cmakedefine H5_MEMORY_ALLOC_SANITY_CHECK @H5_MEMORY_ALLOC_SANITY_CHECK@ ** Define in CMakeLists.txt */
+
/* Define if the metadata trace file code is to be compiled in */
#cmakedefine H5_METADATA_TRACE_FILE @H5_METADATA_TRACE_FILE@
@@ -453,9 +497,18 @@
/* Define to the version of this package. */
#define H5_PACKAGE_VERSION "@HDF5_PACKAGE_VERSION_STRING@"
+/* Determine the maximum decimal precision in C */
+#define H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@
+
+/* Define Fortran Maximum Real Decimal Precision */
+#cmakedefine H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@
+
/* Width for printf() for type `long long' or `__int64', use `ll' */
#cmakedefine H5_PRINTF_LL_WIDTH @H5_PRINTF_LL_WIDTH@
+/* The size of `bool', as computed by sizeof. */
+#cmakedefine H5_SIZEOF_BOOL @H5_SIZEOF_BOOL@
+
/* The size of `char', as computed by sizeof. */
#cmakedefine H5_SIZEOF_CHAR @H5_SIZEOF_CHAR@
@@ -589,14 +642,14 @@
/* The size of `unsigned', as computed by sizeof. */
#cmakedefine H5_SIZEOF_UNSIGNED @H5_SIZEOF_UNSIGNED@
-/* The size of `__int64', as computed by sizeof. */
-#define H5_SIZEOF___INT64 @H5_SIZEOF___INT64@
+/* The size of `_Quad', as computed by sizeof. */
+#define H5_SIZEOF__QUAD @H5_SIZEOF__QUAD@
-/* Define to 1 if you have the <stdbool.h> header file. */
-#cmakedefine H5_HAVE_STDBOOL_H @H5_HAVE_STDBOOL_H@
+/* The size of `__float128', as computed by sizeof. */
+#define H5_SIZEOF___FLOAT128 @H5_SIZEOF___FLOAT128@
-/* The size of `bool', as computed by sizeof. */
-#cmakedefine H5_SIZEOF_BOOL @H5_SIZEOF_BOOL@
+/* The size of `__int64', as computed by sizeof. */
+#define H5_SIZEOF___INT64 @H5_SIZEOF___INT64@
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine H5_STDC_HEADERS @H5_STDC_HEADERS@
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index d24eb44..cb92933 100755
--- a/config/cmake/scripts/CTestScript.cmake
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -185,17 +185,22 @@ endforeach ()
#-----------------------------------------------------------------------------
# Initialize the CTEST commands
#------------------------------
+if(CMAKE_GENERATOR_TOOLSET)
+ set(CTEST_CONFIGURE_TOOLSET "-T${CMAKE_GENERATOR_TOOLSET}")
+else ()
+ set(CTEST_CONFIGURE_TOOLSET "")
+endif()
if (LOCAL_MEMCHECK_TEST)
find_program (CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
else ()
if (LOCAL_COVERAGE_TEST)
find_program (CTEST_COVERAGE_COMMAND NAMES gcov)
endif ()
set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
endif ()
diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake
index 6239f1f..bbbb8dc 100755
--- a/config/cmake/scripts/HDF5options.cmake
+++ b/config/cmake/scripts/HDF5options.cmake
@@ -6,6 +6,10 @@
### uncomment/comment and change the following lines for other configuration options
#############################################################################################
+#### alternate toolsets ####
+#set(CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 17.0")
+
+#############################################################################################
#### ext libraries ####
### ext libs from tgz
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index 2e99c94..a0ec8e3 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -198,18 +198,19 @@ endmacro ()
#-----------------------------------------------------------------------------
# Check for the existence of certain header files
#-----------------------------------------------------------------------------
-CHECK_INCLUDE_FILE_CONCAT ("sys/resource.h" ${HDF_PREFIX}_HAVE_SYS_RESOURCE_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/time.h" ${HDF_PREFIX}_HAVE_SYS_TIME_H)
-CHECK_INCLUDE_FILE_CONCAT ("unistd.h" ${HDF_PREFIX}_HAVE_UNISTD_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/file.h" ${HDF_PREFIX}_HAVE_SYS_FILE_H)
CHECK_INCLUDE_FILE_CONCAT ("sys/ioctl.h" ${HDF_PREFIX}_HAVE_SYS_IOCTL_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/stat.h" ${HDF_PREFIX}_HAVE_SYS_STAT_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/resource.h" ${HDF_PREFIX}_HAVE_SYS_RESOURCE_H)
CHECK_INCLUDE_FILE_CONCAT ("sys/socket.h" ${HDF_PREFIX}_HAVE_SYS_SOCKET_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/stat.h" ${HDF_PREFIX}_HAVE_SYS_STAT_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/time.h" ${HDF_PREFIX}_HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" ${HDF_PREFIX}_HAVE_SYS_TYPES_H)
-CHECK_INCLUDE_FILE_CONCAT ("stddef.h" ${HDF_PREFIX}_HAVE_STDDEF_H)
-CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" ${HDF_PREFIX}_HAVE_SETJMP_H)
CHECK_INCLUDE_FILE_CONCAT ("features.h" ${HDF_PREFIX}_HAVE_FEATURES_H)
CHECK_INCLUDE_FILE_CONCAT ("dirent.h" ${HDF_PREFIX}_HAVE_DIRENT_H)
+CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" ${HDF_PREFIX}_HAVE_SETJMP_H)
+CHECK_INCLUDE_FILE_CONCAT ("stddef.h" ${HDF_PREFIX}_HAVE_STDDEF_H)
CHECK_INCLUDE_FILE_CONCAT ("stdint.h" ${HDF_PREFIX}_HAVE_STDINT_H)
+CHECK_INCLUDE_FILE_CONCAT ("unistd.h" ${HDF_PREFIX}_HAVE_UNISTD_H)
# IF the c compiler found stdint, check the C++ as well. On some systems this
# file will be found by C but not C++, only do this test IF the C++ compiler
@@ -527,6 +528,8 @@ CHECK_FUNCTION_EXISTS (sigprocmask ${HDF_PREFIX}_HAVE_SIGPROCMASK)
CHECK_FUNCTION_EXISTS (snprintf ${HDF_PREFIX}_HAVE_SNPRINTF)
CHECK_FUNCTION_EXISTS (srandom ${HDF_PREFIX}_HAVE_SRANDOM)
CHECK_FUNCTION_EXISTS (strdup ${HDF_PREFIX}_HAVE_STRDUP)
+CHECK_FUNCTION_EXISTS (strtoll ${HDF_PREFIX}_HAVE_STRTOLL)
+CHECK_FUNCTION_EXISTS (strtoull ${HDF_PREFIX}_HAVE_STRTOULL)
CHECK_FUNCTION_EXISTS (symlink ${HDF_PREFIX}_HAVE_SYMLINK)
CHECK_FUNCTION_EXISTS (system ${HDF_PREFIX}_HAVE_SYSTEM)
@@ -585,6 +588,7 @@ macro (HDF_CXX_FUNCTION_TEST OTHER_TEST)
HAVE_UNISTD_H
HAVE_SYS_TYPES_H
HAVE_SYS_SOCKET_H
+ HAVE_SYS_FILE_H
)
if ("${${HDF_PREFIX}_${def}}")
set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
diff --git a/configure.ac b/configure.ac
index 3cb4b6a..a9756f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1851,6 +1851,7 @@ AC_CHECK_FUNCS([frexpl gethostname getrusage gettimeofday])
AC_CHECK_FUNCS([lstat rand_r random setsysinfo])
AC_CHECK_FUNCS([signal longjmp setjmp siglongjmp sigsetjmp sigprocmask])
AC_CHECK_FUNCS([snprintf srandom strdup symlink system])
+AC_CHECK_FUNCS([strtoll strtoull])
AC_CHECK_FUNCS([tmpfile asprintf vasprintf vsnprintf waitpid])
AC_CHECK_FUNCS([roundf lroundf llroundf round lround llround])
diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt
index 70ec47f..4c4460e 100644
--- a/release_docs/INSTALL_CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -663,7 +663,7 @@ adding an option (${CTEST_SCRIPT_ARG}) to the platform configuration script.
### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201264 -C Release -VV -O hdf5.log ###
#############################################################################################
-cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR)
+cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR)
############################################################################
# Usage:
# ctest -S HDF5config.cmake,OPTION=VALUE -C Release -VV -O test.log
@@ -686,152 +686,152 @@ cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR)
# NO_MAC_FORTRAN - Yes to be SHARED on a Mac
##############################################################################
-set(CTEST_SOURCE_VERSION 1.10.1)
-set(CTEST_SOURCE_VERSEXT "")
+set (CTEST_SOURCE_VERSION 1.10.1)
+set (CTEST_SOURCE_VERSEXT "")
##############################################################################
# handle input parameters to script.
#BUILD_GENERATOR - which CMake generator to use, required
#INSTALLDIR - HDF5-1.10.0 root folder
#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
-#CTEST_SOURCE_NAME - name of source folder; HDF5-1.10.1
+#CTEST_SOURCE_NAME - name of source folder; HDF5-1.10.0
#STATIC_ONLY - Default is YES
#FORTRAN_LIBRARIES - Default is NO
#JAVA_LIBRARIES - Default is NO
#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac
-if(DEFINED CTEST_SCRIPT_ARG)
+if (DEFINED CTEST_SCRIPT_ARG)
# transform ctest script arguments of the form
# script.ctest,var1=value1,var2=value2
# to variables with the respective names set to the respective values
- string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
- foreach(current_var ${script_args})
+ string (REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
+ foreach (current_var ${script_args})
if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
- set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
+ set ("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
endif ()
endforeach ()
endif ()
# build generator must be defined
-if(NOT DEFINED BUILD_GENERATOR)
- message(FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
+if (NOT DEFINED BUILD_GENERATOR)
+ message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
else ()
- if(${BUILD_GENERATOR} STREQUAL "Unix")
- set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
- elseif(${BUILD_GENERATOR} STREQUAL "VS2015")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 14 2015")
- elseif(${BUILD_GENERATOR} STREQUAL "VS201564")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64")
- elseif(${BUILD_GENERATOR} STREQUAL "VS2013")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013")
- elseif(${BUILD_GENERATOR} STREQUAL "VS201364")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
- elseif(${BUILD_GENERATOR} STREQUAL "VS2012")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
- elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
+ if (${BUILD_GENERATOR} STREQUAL "Unix")
+ set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS2015")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS201564")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS2013")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS201364")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS2012")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS201264")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
else ()
- message(FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
+ message (FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
endif ()
endif ()
###################################################################
### Following Line is one of [Release, RelWithDebInfo, Debug] #####
-set(CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}")
+set (CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}")
###################################################################
-if(NOT DEFINED INSTALLDIR)
- if(WIN32)
- set(INSTALLDIR "C:/Program Files/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
+if (NOT DEFINED INSTALLDIR)
+ if (WIN32)
+ set (INSTALLDIR "C:/Program Files/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
else ()
- set(INSTALLDIR "${CTEST_SCRIPT_DIRECTORY}/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
+ set (INSTALLDIR "${CTEST_SCRIPT_DIRECTORY}/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
endif ()
endif ()
-if(NOT DEFINED CTEST_CONFIGURATION_TYPE)
- set(CTEST_CONFIGURATION_TYPE "Release")
+if (NOT DEFINED CTEST_CONFIGURATION_TYPE)
+ set (CTEST_CONFIGURATION_TYPE "Release")
endif ()
-if(NOT DEFINED CTEST_SOURCE_NAME)
- set(CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
+if (NOT DEFINED CTEST_SOURCE_NAME)
+ set (CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
endif ()
-if(NOT DEFINED STATIC_ONLY)
- set(STATICONLYLIBRARIES "YES")
+if (NOT DEFINED STATIC_ONLY)
+ set (STATICONLYLIBRARIES "YES")
else ()
- set(STATICONLYLIBRARIES "NO")
+ set (STATICONLYLIBRARIES "NO")
endif ()
-if(NOT DEFINED FORTRAN_LIBRARIES)
- set(FORTRANLIBRARIES "NO")
+if (NOT DEFINED FORTRAN_LIBRARIES)
+ set (FORTRANLIBRARIES "NO")
else ()
- set(FORTRANLIBRARIES "YES")
+ set(FORTRANLIBRARIES "YES")
endif ()
-if(NOT DEFINED JAVA_LIBRARIES)
- set(JAVALIBRARIES "NO")
+if (NOT DEFINED JAVA_LIBRARIES)
+ set (JAVALIBRARIES "NO")
else ()
- set(JAVALIBRARIES "YES")
+ set (JAVALIBRARIES "YES")
endif ()
-set(CTEST_BINARY_NAME "build")
-set(CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
-if(WIN32)
- set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
- set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
+set (CTEST_BINARY_NAME "build")
+set (CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
+if (WIN32)
+ set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
+ set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
else ()
- set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
- set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
+ set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
+ set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
endif ()
###################################################################
######### Following describes compiler ############
-if(WIN32)
- set(SITE_OS_NAME "Windows")
- set(SITE_OS_VERSION "WIN7")
- if(${BUILD_GENERATOR} STREQUAL "VS201564")
- set(SITE_OS_BITS "64")
- set(SITE_COMPILER_NAME "vs2015")
- set(SITE_COMPILER_VERSION "14")
- elseif(${BUILD_GENERATOR} STREQUAL "VS2015")
- set(SITE_OS_BITS "32")
- set(SITE_COMPILER_NAME "vs2015")
- set(SITE_COMPILER_VERSION "14")
- elseif(${BUILD_GENERATOR} STREQUAL "VS201364")
- set(SITE_OS_BITS "64")
- set(SITE_COMPILER_NAME "vs2013")
- set(SITE_COMPILER_VERSION "12")
- elseif(${BUILD_GENERATOR} STREQUAL "VS2013")
- set(SITE_OS_BITS "32")
- set(SITE_COMPILER_NAME "vs2013")
- set(SITE_COMPILER_VERSION "12")
- elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
- set(SITE_OS_BITS "64")
- set(SITE_COMPILER_NAME "vs2012")
- set(SITE_COMPILER_VERSION "11")
- elseif(${BUILD_GENERATOR} STREQUAL "VS2012")
- set(SITE_OS_BITS "32")
- set(SITE_COMPILER_NAME "vs2012")
- set(SITE_COMPILER_VERSION "11")
+if (WIN32)
+ set (SITE_OS_NAME "Windows")
+ set (SITE_OS_VERSION "WIN7")
+ if (${BUILD_GENERATOR} STREQUAL "VS201564")
+ set (SITE_OS_BITS "64")
+ set (SITE_COMPILER_NAME "vs2015")
+ set (SITE_COMPILER_VERSION "14")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS2015")
+ set (SITE_OS_BITS "32")
+ set (SITE_COMPILER_NAME "vs2015")
+ set (SITE_COMPILER_VERSION "14")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS201364")
+ set (SITE_OS_BITS "64")
+ set (SITE_COMPILER_NAME "vs2013")
+ set (SITE_COMPILER_VERSION "12")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS2013")
+ set (SITE_OS_BITS "32")
+ set (SITE_COMPILER_NAME "vs2013")
+ set (SITE_COMPILER_VERSION "12")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS201264")
+ set (SITE_OS_BITS "64")
+ set (SITE_COMPILER_NAME "vs2012")
+ set (SITE_COMPILER_VERSION "11")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS2012")
+ set (SITE_OS_BITS "32")
+ set (SITE_COMPILER_NAME "vs2012")
+ set (SITE_COMPILER_VERSION "11")
endif ()
## Set the following to unique id your computer ##
- set(CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX")
+ set (CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX")
else ()
- set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
+ set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
## Set the following to unique id your computer ##
- if(APPLE)
- set(CTEST_SITE "MAC.XXXX")
+ if (APPLE)
+ set (CTEST_SITE "MAC.XXXX")
else ()
- set(CTEST_SITE "LINUX.XXXX")
+ set (CTEST_SITE "LINUX.XXXX")
endif ()
- if(APPLE)
- execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
- set(ENV{CC} "${XCODE_CC}")
- set(ENV{CXX} "${XCODE_CXX}")
- set(CTEST_USE_LAUNCHERS 1)
- set(RR_WARNINGS_COMMON "-Wno-format-nonliteral -Wno-cast-align -Wno-unused -Wno-unused-variable -Wno-unused-function -Wno-self-assign -Wno-unused-parameter -Wno-sign-compare")
- set(RR_WARNINGS_C "${RR_WARNINGS_COMMON} -Wno-deprecated-declarations -Wno-uninitialized")
- set(RR_WARNINGS_CXX "${RR_WARNINGS_COMMON} -Woverloaded-virtual -Wshadow -Wwrite-strings -Wc++11-compat")
- set(RR_FLAGS_COMMON "-g -O0 -fstack-protector-all -D_FORTIFY_SOURCE=2")
- set(RR_FLAGS_C "${RR_FLAGS_COMMON}")
- set(RR_FLAGS_CXX "${RR_FLAGS_COMMON}")
- set(ENV{CFLAGS} "${RR_WARNINGS_C} ${RR_FLAGS_C}")
- set(ENV{CXXFLAGS} "${RR_WARNINGS_CXX} ${RR_FLAGS_CXX}")
+ if (APPLE)
+ execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set (ENV{CC} "${XCODE_CC}")
+ set (ENV{CXX} "${XCODE_CXX}")
+ set (CTEST_USE_LAUNCHERS 1)
+ set (RR_WARNINGS_COMMON "-Wno-format-nonliteral -Wno-cast-align -Wno-unused -Wno-unused-variable -Wno-unused-function -Wno-self-assign -Wno-unused-parameter -Wno-sign-compare")
+ set (RR_WARNINGS_C "${RR_WARNINGS_COMMON} -Wno-deprecated-declarations -Wno-uninitialized")
+ set (RR_WARNINGS_CXX "${RR_WARNINGS_COMMON} -Woverloaded-virtual -Wshadow -Wwrite-strings -Wc++11-compat")
+ set (RR_FLAGS_COMMON "-g -O0 -fstack-protector-all -D_FORTIFY_SOURCE=2")
+ set (RR_FLAGS_C "${RR_FLAGS_COMMON}")
+ set (RR_FLAGS_CXX "${RR_FLAGS_COMMON}")
+ set (ENV{CFLAGS} "${RR_WARNINGS_C} ${RR_FLAGS_C}")
+ set (ENV{CXXFLAGS} "${RR_WARNINGS_CXX} ${RR_FLAGS_CXX}")
endif ()
endif ()
###################################################################
@@ -839,99 +839,99 @@ endif ()
###################################################################
######### Following is for submission to CDash ############
###################################################################
-set(MODEL "Experimental")
+set (MODEL "Experimental")
###################################################################
###################################################################
##### Following controls CDash submission #####
-#set(LOCAL_SUBMIT "TRUE")
+#set (LOCAL_SUBMIT "TRUE")
##### Following controls test process #####
-#set(LOCAL_SKIP_TEST "TRUE")
-#set(LOCAL_MEMCHECK_TEST "TRUE")
-#set(LOCAL_COVERAGE_TEST "TRUE")
+#set (LOCAL_SKIP_TEST "TRUE")
+#set (LOCAL_MEMCHECK_TEST "TRUE")
+#set (LOCAL_COVERAGE_TEST "TRUE")
##### Following controls cpack command #####
-#set(LOCAL_NO_PACKAGE "TRUE")
+#set (LOCAL_NO_PACKAGE "TRUE")
##### Following controls source update #####
-#set(LOCAL_UPDATE "TRUE")
-set(REPOSITORY_URL "https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5.git")
-set(REPOSITORY_BRANCH "develop")
+#set (LOCAL_UPDATE "TRUE")
+set (REPOSITORY_URL "https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5.git")
+set (REPOSITORY_BRANCH "develop")
#uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows
#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}")
###################################################################
###################################################################
-if(${STATICONLYLIBRARIES})
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
+if (${STATICONLYLIBRARIES})
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
######### Following describes computer ############
## following is optional to describe build ##
- set(SITE_BUILDNAME_SUFFIX "STATIC")
+ set (SITE_BUILDNAME_SUFFIX "STATIC")
endif ()
###################################################################
#### fortran ####
-if(${FORTRANLIBRARIES})
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
+if (${FORTRANLIBRARIES})
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
else ()
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=OFF")
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=OFF")
endif ()
#### java ####
-if(${JAVALIBRARIES})
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=ON")
+if (${JAVALIBRARIES})
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=ON")
else ()
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
endif ()
### change install prefix
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}")
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=$ENV{CMAKE_CONFIG_TYPE}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=$ENV{CMAKE_CONFIG_TYPE}")
###################################################################
-if(WIN32)
- set(BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}")
- include(${CTEST_SCRIPT_DIRECTORY}\\HDF5options.cmake)
- include(${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake)
- if(EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe")
- file(COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+if (WIN32)
+ set (BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}")
+ include (${CTEST_SCRIPT_DIRECTORY}\\HDF5options.cmake)
+ include (${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake)
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe")
+ file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif ()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi")
- file(COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi")
+ file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif ()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip")
- file(COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip")
+ file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif ()
else ()
- set(BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
- include(${CTEST_SCRIPT_DIRECTORY}/HDF5options.cmake)
- include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
- if(APPLE)
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg")
- file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ set (BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
+ include (${CTEST_SCRIPT_DIRECTORY}/HDF5options.cmake)
+ include (${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
+ if (APPLE)
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif ()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz")
- file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif ()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh")
- file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif ()
else ()
- if(CYGWIN)
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh")
- file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if (CYGWIN)
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif ()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz")
- file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif ()
else ()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh")
- file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif ()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz")
- file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif ()
endif ()
endif ()
@@ -946,6 +946,10 @@ HDF5options.cmake:
### uncomment/comment and change the following lines for other configuration options
#############################################################################################
+#### alternate toolsets ####
+#set(CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 17.0")
+
+#############################################################################################
#### ext libraries ####
### ext libs from tgz
@@ -971,7 +975,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING
### disable packaging
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON")
-### Create install package with external libraries (szip, zlib, jpeg)
+### Create install package with external libraries (szip, zlib)
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
#############################################################################################
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 94c3035..644d3af 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -12,11 +12,11 @@ For more details check the HISTORY*.txt files in the HDF5 source.
Links to HDF5 1.10.1 source code, documentation, and additional materials can be found on The HDF5 web page at:
https://support.hdfgroup.org/HDF5/
-
+
The HDF5 1.10.1 release can be obtained from:
- https://support.hdfgroup.org/HDF5/release/obtain5110.html
-
+ https://support.hdfgroup.org/HDF5/release/obtain5110.html
+
User documentation for the snapshot can be accessed directly at this location:
https://support.hdfgroup.org/HDF5/doc1.10/
@@ -54,77 +54,151 @@ New Features
Configuration:
-------------
- - CMake minimum is now 3.2.2. (ADB 2016/01/10)
-
+ - CMake minimum is now 3.2.2.
+ (ADB 2017/01/10)
+
+ - Tools folder is separated into source and test folders. This
+ allows autotools to skip the make command and just execute
+ the make check command.
+ (HDFFV-9719 ADB 2016/10/27)
Library:
--------
- -
+ -
Parallel Library:
-----------------
- -
+ -
Fortran Library:
----------------
- -
+ -
C++ Library:
------------
- -
+ - New wrappers for C APIs:
+ (HDFFV-10004, HDFFV-10139, HDFFV-10145 - PRs #232, #310, #334, #348)
+
+ // Sets/Gets the strategy and the threshold value that the library will
+ // will employ in managing file space.
+ FileCreatPropList::setFileSpaceStrategy - H5Pset_file_space_strategy
+ FileCreatPropList::getFileSpaceStrategy - H5Pget_file_space_strategy
+
+ // Sets/Gets the file space page size for paged aggregation.
+ FileCreatPropList::setFileSpacePagesize - H5Pset_file_space_page_size
+ FileCreatPropList::getFileSpacePagesize - H5Pget_file_space_page_size
+
+ // Checks if the given ID is valid.
+ IdComponent::isValid - H5Iis_valid
+
+ // Sets/Gets the number of soft or user-defined links that can be
+ // traversed before a failure occurs.
+ LinkAccPropList::setNumLinks - H5Pset_nlinks
+ LinkAccPropList::getNumLinks - H5Pget_nlinks
+
+ // Returns a copy of the creation property list of a datatype.
+ DataType::getCreatePlist - H5Tget_create_plist
+
+ // Opens/Closes an object within a group or a file, regardless object type
+ Group::getObjId - H5Oopen
+ Group::closeObjId - H5Oclose
+
+ // Maps elements of a virtual dataset to elements of the source dataset.
+ DSetCreatPropList::setVirtual - H5Pset_virtual
+
+ // Gets general information about this file.
+ H5File::getFileInfo - H5Fget_info2
+
+ // Returns the number of members in a type.
+ IdComponent::getNumMembers - H5Inmembers
+
+ // Determines if an element type exists.
+ IdComponent::typeExists - H5Itype_exists
+
+ // Determines if an object exists.
+ H5Location::exists - H5Lexists.
+
+ // Returns the header version of an HDF5 object.
+ H5Object::objVersion - H5Oget_info for version
+ (BMR, 2017/03/20)
+
+ - New constructors to open datatypes in ArrayType, CompType, DataType,
+ EnumType, FloatType, IntType, StrType, and VarLenType. (HDFFV-10156)
+ (BMR, 2017/03/20)
+
+ - New class LinkAccPropList for link access property list, to be used by
+ wrappers of H5Lexists. (HDFFV-10145 - PR #232) (BMR, 2017/03/20)
+
+ - New exception: ObjHeaderIException for H5O interface.
+ (HDFFV-10145 - PR #334) (BMR, 2017/03/20)
+
Tools:
------
- -
+ -
High-Level APIs:
---------------
C Packet Table API
------------------
- -
+ -
Internal header file
--------------------
-
-
+
Documentation
-------------
Support for new platforms, languages and compilers.
=======================================
- -
+ -
Bug Fixes since HDF5-1.10.0-patch1 release
==================================
Library
-------
- -
+ - Changed the plugins dlopen option from RTLD_NOW to RTLD_LAZY
+ (PR 201 ADB 2016/12/12)
Configuration
-------------
- -
+ - Configuration will check for the strtoll and strtoull functions
+ before using alternatives
+ (PR 340 ADB 2017/03/17)
+
+ - CMake uses a Windows pdb directory variable if available and
+ will generate both static and shared pdb files.
+ (HDFFV-9875 ADB 2017/02/06)
+
+ - CMake now builds shared versions of tools.
+ (HDFFV-10123 ADB 2017/02/01)
Performance
-------------
- -
-
+ -
+
Fortran
--------
- -
+ -
Tools
-----
- -
+ - h5diff correctly ignores strpad in comparing strings.
+ (HDFFV-10128 ADB 2017/03/03)
+
+ - h5repack now correctly parses the command line filter options.
+ (HDFFV-10046 ADB 2017/01/24)
High-Level APIs:
------
- -
+ -
Fortran High-Level APIs:
------
- -
+ -
Documentation
-------------
@@ -132,20 +206,28 @@ Bug Fixes since HDF5-1.10.0-patch1 release
F90 APIs
--------
- -
+ -
C++ APIs
--------
- -
-
+ - Due to the change in the C API, the overloaded functions of
+ PropList::setProperty now need const for some arguments. They are
+ planned for deprecation and are replaced by new versions with proper
+ consts. (PR #344 -BMR, 2017/03/20)
+
+ - The problem where a user-defined function cannot access both, attribute
+ and dataset, using only one argument (HDFFV9920) is now fixed.
+ (PR #45 -BMR, 2017/03/20)
+
+
Testing
-------
- -
+ -
Supported Platforms
===================
-
+
Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++)
#1 SMP x86_64 GNU/Linux compilers:
(mayll/platypus) Version 4.4.7 20120313
@@ -172,7 +254,7 @@ Supported Platforms
compilers:
Version 15.0.3.187 Build 20150407
MPICH 3.1.4 compiled with GCC 4.9.3
-
+
SunOS 5.11 32- and 64-bit Sun C 5.12 SunOS_sparc
(emu) Sun Fortran 95 8.6 SunOS_sparc
Sun C++ 5.12 SunOS_sparc
@@ -186,11 +268,12 @@ Supported Platforms
Windows 7 x64 Visual Studio 2012 w/ Intel Fortran 15 (cmake)
Visual Studio 2013 w/ Intel Fortran 15 (cmake)
Visual Studio 2015 w/ Intel Fortran 16 (cmake)
-
+ Visual Studio 2015 w/ Intel Parallel Studio 2017 (cmake)
+
Windows 10 Visual Studio 2015 w/ Intel Fortran 16 (cmake)
Windows 10 x64 Visual Studio 2015 w/ Intel Fortran 16 (cmake)
-
+
Mac OS X Mt. Lion 10.8.5 Apple clang/clang++ version 5.1 from Xcode 5.1
64-bit gfortran GNU Fortran (GCC) 4.8.2
(swallow/kite) Intel icc/icpc/ifort version 15.0.3
@@ -226,7 +309,7 @@ Platform C F90/ F90 C++ zlib SZIP
Solaris2.11 32-bit n y/y n y y y
Solaris2.11 64-bit n y/n n y y y
Windows 7 y y/y n y y y
-Windows 7 x64 y y/y n y y y
+Windows 7 x64 y y/y y y y y
Windows 7 Cygwin n y/n n y y y
Windows 7 x64 Cygwin n y/n n y y y
Windows 10 y y/y n y y y
@@ -291,7 +374,7 @@ The following platforms are not supported but have been tested for this release.
GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609
(cmake and autotools)
-
+
Known Problems
==============
* "make check" fails on CYGWIN when building shared lib files is enabled. The
diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt
index 87ebafc..ecf972d 100644
--- a/release_docs/USING_HDF5_CMake.txt
+++ b/release_docs/USING_HDF5_CMake.txt
@@ -221,7 +221,9 @@ NOTE: this file is available at the HDF web site:
HDF5_Examples.cmake
-
+Also available at the HDF web site is a CMake application framework template.
+You can quickly add files to the framework and execute the script to compile
+your application with an installed HDF5 binary.
========================================================================
ctest
diff --git a/src/H5AC.c b/src/H5AC.c
index a561852..be41b6a 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -611,6 +611,7 @@ H5AC_dest(H5F_t *f, hid_t dxpl_id)
/* Sanity check */
HDassert(f);
+ HDassert(f->shared);
HDassert(f->shared->cache);
#if H5AC_DUMP_STATS_ON_CLOSE
@@ -641,9 +642,17 @@ H5AC_dest(H5F_t *f, hid_t dxpl_id)
/* Sanity check */
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- /* Attempt to flush all entries from rank 0 & Bcast clean list to other ranks */
- if(H5AC__flush_entries(f, dxpl_id) < 0)
+ /* If the file was opened R/W, attempt to flush all entries
+ * from rank 0 & Bcast clean list to other ranks.
+ *
+ * Must not flush in the R/O case, as this will trigger the
+ * free space manager settle routines.
+ */
+ if ( ( H5F_ACC_RDWR & H5F_INTENT(f) ) &&
+ ( H5AC__flush_entries(f, dxpl_id) < 0 ) )
+
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush")
+
#endif /* H5_HAVE_PARALLEL */
/* Destroy the cache */
diff --git a/src/H5C.c b/src/H5C.c
index 120abb8..2ba9f2d 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -761,7 +761,10 @@ H5C_prep_for_file_close(H5F_t *f, hid_t dxpl_id)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create cache image")
#ifdef H5_HAVE_PARALLEL
- if(!image_generated && cache_ptr->aux_ptr != NULL && f->shared->fs_persist) {
+ if ( ( H5F_INTENT(f) & H5F_ACC_RDWR ) &&
+ ( ! image_generated ) &&
+ ( cache_ptr->aux_ptr != NULL ) &&
+ ( f->shared->fs_persist ) ) {
/* If persistent free space managers are enabled, flushing the
* metadata cache may result in the deletion, insertion, and/or
* dirtying of entries.
@@ -7295,14 +7298,20 @@ H5C__make_space_in_cache(H5F_t *f, hid_t dxpl_id, size_t space_needed,
prev_ptr = entry_ptr->aux_prev;
+ if ( ( !(entry_ptr->prefetched_dirty) )
#ifdef H5_HAVE_PARALLEL
- if(!(entry_ptr->coll_access)) {
+ && ( ! (entry_ptr->coll_access) )
#endif /* H5_HAVE_PARALLEL */
- if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry")
-#ifdef H5_HAVE_PARALLEL
+ ) {
+
+ if ( H5C__flush_single_entry(f, dxpl_id, entry_ptr,
+ H5C__FLUSH_INVALIDATE_FLAG |
+ H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) < 0 )
+
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
+ "unable to flush entry")
+
} /* end if */
-#endif /* H5_HAVE_PARALLEL */
/* we are scanning the clean LRU, so the serialize function
* will not be called on any entry -- thus there is no
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 794be50..444d409 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -1006,8 +1006,15 @@ H5F__dest(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t flush)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
+ /* Set up I/O info for operation */
+ fio_info.f = f;
+ if(NULL == (fio_info.meta_dxpl = (H5P_genplist_t *)H5I_object(meta_dxpl_id)))
+ HDONE_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+ if(NULL == (fio_info.raw_dxpl = (H5P_genplist_t *)H5I_object(H5AC_rawdata_dxpl_id)))
+ HDONE_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Shutdown the page buffer cache */
- if(H5PB_dest(f) < 0)
+ if(H5PB_dest(&fio_info) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing page buffer cache")
@@ -1027,13 +1034,6 @@ H5F__dest(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t flush)
f->shared->root_grp = NULL;
} /* end if */
- /* Set up I/O info for operation */
- fio_info.f = f;
- if(NULL == (fio_info.meta_dxpl = (H5P_genplist_t *)H5I_object(meta_dxpl_id)))
- HDONE_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
- if(NULL == (fio_info.raw_dxpl = (H5P_genplist_t *)H5I_object(H5AC_rawdata_dxpl_id)))
- HDONE_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
-
/* Destroy other components of the file */
if(H5F__accum_reset(&fio_info, TRUE) < 0)
/* Push error, but keep going*/
diff --git a/src/H5MF.c b/src/H5MF.c
index 358e326..87c910c 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -1347,6 +1347,12 @@ HDfprintf(stderr, "%s: Entering: alloc_type = %u, addr = %a, size = %Hu, extra_r
HDassert(f);
HDassert(H5F_INTENT(f) & H5F_ACC_RDWR);
+ if(f->shared->first_alloc_dealloc) {
+ HDassert(! H5AC_cache_image_pending(f));
+ if(H5MF_tidy_self_referential_fsm_hack(f, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "tidy of self referential fsm hack failed")
+ } /* end if */
+
/* Set mapped type, treating global heap as raw data */
map_type = (alloc_type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : alloc_type;
diff --git a/src/H5PB.c b/src/H5PB.c
index c67ae59..575903d 100644
--- a/src/H5PB.c
+++ b/src/H5PB.c
@@ -468,7 +468,7 @@ H5PB__dest_cb(void *item, void H5_ATTR_UNUSED *key, void *_op_data)
/*-------------------------------------------------------------------------
* Function: H5PB_dest
*
- * Purpose: destroy the PB on the file.
+ * Purpose: Flush and destroy the PB on the file if it exists.
*
* Return: Non-negative on success/Negative on failure
*
@@ -477,20 +477,26 @@ H5PB__dest_cb(void *item, void H5_ATTR_UNUSED *key, void *_op_data)
*-------------------------------------------------------------------------
*/
herr_t
-H5PB_dest(H5F_t *f)
+H5PB_dest(const H5F_io_info2_t *fio_info)
{
herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *f; /* file pointer */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
+ HDassert(fio_info);
+ f = fio_info->f;
HDassert(f);
- /* Destroy page buffer info, if there is any */
+ /* flush and destroy the page buffer, if it exists */
if(f->shared->page_buf) {
H5PB_t *page_buf = f->shared->page_buf;
H5PB_ud1_t op_data; /* Iteration context */
+ if(H5PB_flush(fio_info)<0)
+ HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTFLUSH, FAIL, "can't flush page buffer")
+
/* Set up context info */
op_data.page_buf = page_buf;
diff --git a/src/H5PBprivate.h b/src/H5PBprivate.h
index 3b5dcae..7dd4071 100644
--- a/src/H5PBprivate.h
+++ b/src/H5PBprivate.h
@@ -89,7 +89,7 @@ typedef struct H5PB_t {
/* General routines */
H5_DLL herr_t H5PB_create(H5F_t *file, size_t page_buffer_size, unsigned page_buf_min_meta_perc, unsigned page_buf_min_raw_perc);
H5_DLL herr_t H5PB_flush(const H5F_io_info2_t *fio_info);
-H5_DLL herr_t H5PB_dest(H5F_t *file);
+H5_DLL herr_t H5PB_dest(const H5F_io_info2_t *fio_info);
H5_DLL herr_t H5PB_add_new_page(H5F_t *f, H5FD_mem_t type, haddr_t page_addr);
H5_DLL herr_t H5PB_update_entry(H5PB_t *page_buf, haddr_t addr, size_t size, const void *buf);
H5_DLL herr_t H5PB_remove_entry(const H5F_t *f, haddr_t addr);
diff --git a/src/H5private.h b/src/H5private.h
index 00de96c..61ecc5b 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1386,7 +1386,13 @@ typedef off_t h5_stat_size_t;
#ifndef HDstrtol
#define HDstrtol(S,R,N) strtol(S,R,N)
#endif /* HDstrtol */
-H5_DLL int64_t HDstrtoll (const char *s, const char **rest, int base);
+#ifndef HDstrtoll
+ #ifdef H5_HAVE_STRTOLL
+ #define HDstrtoll(S,R,N) strtoll(S,R,N)
+ #else
+ H5_DLL int64_t HDstrtoll (const char *s, const char **rest, int base);
+ #endif /* H5_HAVE_STRTOLL */
+#endif /* HDstrtoll */
#ifndef HDstrtoul
#define HDstrtoul(S,R,N) strtoul(S,R,N)
#endif /* HDstrtoul */
diff --git a/src/H5system.c b/src/H5system.c
index ac323c0..1f92e19 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -32,10 +32,10 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5MMprivate.h" /* Memory management */
/****************/
@@ -474,6 +474,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
*
*-------------------------------------------------------------------------
*/
+#ifndef HDstrtoll
int64_t
HDstrtoll(const char *s, const char **rest, int base)
{
@@ -549,7 +550,7 @@ HDstrtoll(const char *s, const char **rest, int base)
*rest = s;
return acc;
} /* end HDstrtoll() */
-
+#endif
/*-------------------------------------------------------------------------
* Function: HDrand/HDsrand
@@ -604,7 +605,7 @@ void HDsrand(unsigned int seed)
#ifdef H5_HAVE_FCNTL
int
Pflock(int fd, int operation) {
-
+
struct flock flk;
/* Set the lock type */
@@ -649,18 +650,18 @@ Nflock(int H5_ATTR_UNUSED fd, int H5_ATTR_UNUSED operation) {
/*-------------------------------------------------------------------------
- * Function: H5_make_time
+ * Function: H5_make_time
*
- * Purpose: Portability routine to abstract converting a 'tm' struct into
- * a time_t value.
+ * Purpose: Portability routine to abstract converting a 'tm' struct into
+ * a time_t value.
*
- * Note: This is a little problematic because mktime() operates on
- * local times. We convert to local time and then figure out the
- * adjustment based on the local time zone and daylight savings
- * setting.
+ * Note: This is a little problematic because mktime() operates on
+ * local times. We convert to local time and then figure out the
+ * adjustment based on the local time zone and daylight savings
+ * setting.
*
- * Return: Success: The value of timezone
- * Failure: -1
+ * Return: Success: The value of timezone
+ * Failure: -1
*
* Programmer: Quincey Koziol
* November 18, 2015
@@ -1138,7 +1139,7 @@ H5_combine_path(const char* path1, const char* path2, char **full_name /*out*/)
if(NULL == (*full_name = (char *)H5MM_strdup(path2)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- } /* end if */
+ } /* end if */
else if(H5_CHECK_ABS_PATH(path2)) {
/* On windows path2 is a path absolute name */
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index b419f06..e005b51 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -23,6 +23,11 @@
*
*/
+/*
+ * _MSC_VER = 1900 VS2015
+ * _MSC_VER = 1800 VS2013
+ * _MSC_VER = 1700 VS2012
+ */
#ifdef H5_HAVE_WIN32_API
typedef struct _stati64 h5_stat_t;
@@ -54,13 +59,22 @@ typedef __int64 h5_stat_size_t;
#define HDsleep(S) Sleep(S*1000)
#define HDstat(S,B) _stati64(S,B)
#define HDstrcasecmp(A,B) _stricmp(A,B)
-#define HDstrtoull(S,R,N) _strtoui64(S,R,N)
#define HDstrdup(S) _strdup(S)
#define HDtzset() _tzset()
#define HDunlink(S) _unlink(S)
#define HDwrite(F,M,Z) _write(F,M,Z)
#ifdef H5_HAVE_VISUAL_STUDIO
+
+#if (_MSC_VER < 1800)
+ #ifndef H5_HAVE_STRTOLL
+ #define HDstrtoll(S,R,N) _strtoi64(S,R,N)
+ #endif /* H5_HAVE_STRTOLL */
+ #ifndef H5_HAVE_STRTOULL
+ #define HDstrtoull(S,R,N) _strtoui64(S,R,N)
+ #endif /* H5_HAVE_STRTOULL */
+#endif /* MSC_VER < 1800 */
+
/*
* The (void*) cast just avoids a compiler warning in H5_HAVE_VISUAL_STUDIO
*/
diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c
index 7283fa7..a28af8e 100644
--- a/testpar/t_cache_image.c
+++ b/testpar/t_cache_image.c
@@ -25,10 +25,13 @@
#include "cache_common.h"
#include "genall5.h"
+#define TEST_FILES_TO_CONSTRUCT 2
#define CHUNK_SIZE 10
#define DSET_SIZE (40 * CHUNK_SIZE)
#define MAX_NUM_DSETS 256
-
+#define PAR_NUM_DSETS 32
+#define PAGE_SIZE (4 * 1024)
+#define PB_SIZE (64 * PAGE_SIZE)
/* global variable declarations: */
@@ -36,6 +39,7 @@
const char *FILENAMES[] = {
"t_cache_image_00",
"t_cache_image_01",
+ "t_cache_image_02",
NULL
};
@@ -45,28 +49,48 @@ static void create_data_sets(hid_t file_id, int min_dset, int max_dset);
static void delete_data_sets(hid_t file_id, int min_dset, int max_dset);
static void open_hdf5_file(const hbool_t create_file,
- const hbool_t mdci_sbem_expected, const hbool_t read_only,
- const hbool_t set_mdci_fapl, const hbool_t config_fsm,
- const char * hdf_file_name, const unsigned cache_image_flags,
- hid_t * file_id_ptr, H5F_t ** file_ptr_ptr, H5C_t ** cache_ptr_ptr,
- MPI_Comm comm, MPI_Info info, int l_facc_type,
- const hbool_t all_coll_metadata_ops, const hbool_t coll_metadata_write,
- const int md_write_strat);
+ const hbool_t mdci_sbem_expected,
+ const hbool_t read_only,
+ const hbool_t set_mdci_fapl,
+ const hbool_t config_fsm,
+ const hbool_t enable_page_buffer,
+ const char * hdf_file_name,
+ const unsigned cache_image_flags,
+ hid_t * file_id_ptr,
+ H5F_t ** file_ptr_ptr,
+ H5C_t ** cache_ptr_ptr,
+ MPI_Comm comm,
+ MPI_Info info,
+ int l_facc_type,
+ const hbool_t all_coll_metadata_ops,
+ const hbool_t coll_metadata_write,
+ const int md_write_strat);
static void verify_data_sets(hid_t file_id, int min_dset, int max_dset);
/* local test function declarations */
static hbool_t parse_flags(int argc, char * argv[], hbool_t * setup_ptr,
- hbool_t display);
+ hbool_t * ici_ptr, int * file_idx_ptr, int * mpi_size_ptr, hbool_t display);
static void usage(void);
static unsigned construct_test_file(int test_file_index);
+static void par_create_dataset(int dset_num, hid_t file_id, int mpi_rank,
+ int mpi_size);
+static void par_delete_dataset(int dset_num, hid_t file_id, int mpi_rank);
+static void par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank);
+static hbool_t serial_insert_cache_image(int file_name_idx, int mpi_size);
+static void serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size);
/* top level test function declarations */
+static unsigned verify_cache_image_RO(int file_name_id,
+ int md_write_strat, int mpi_rank);
static unsigned verify_cache_image_RW(int file_name_id,
int md_write_strat, int mpi_rank);
+static hbool_t smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info,
+ int mpi_rank, int mpi_size);
+
/****************************************************************************/
/***************************** Utility Functions ****************************/
@@ -187,6 +211,7 @@ construct_test_file(int test_file_index)
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
/* config_fsm */ TRUE,
+ /* enable_page_buffer */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -258,6 +283,7 @@ construct_test_file(int test_file_index)
/* read_only */ FALSE,
/* set_mdci_fapl */ TRUE,
/* config_fsm */ FALSE,
+ /* enable_page_buffer */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -331,6 +357,7 @@ construct_test_file(int test_file_index)
/* read_only */ TRUE,
/* set_mdci_fapl */ FALSE,
/* config_fsm */ FALSE,
+ /* enable_page_buffer */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -863,6 +890,8 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset)
*
* JRM -- 2/1/17
*
+ * Modified function to handle
+ *
*-------------------------------------------------------------------------
*/
@@ -872,6 +901,7 @@ open_hdf5_file(const hbool_t create_file,
const hbool_t read_only,
const hbool_t set_mdci_fapl,
const hbool_t config_fsm,
+ const hbool_t enable_page_buffer,
const char * hdf_file_name,
const unsigned cache_image_flags,
hid_t * file_id_ptr,
@@ -901,6 +931,8 @@ open_hdf5_file(const hbool_t create_file,
FALSE,
H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE};
+ HDassert(!create_file || config_fsm);
+
if ( pass )
{
/* opening the file both read only and with a cache image
@@ -910,6 +942,7 @@ open_hdf5_file(const hbool_t create_file,
if ( ( create_file && mdci_sbem_expected ) ||
( create_file && read_only ) ||
( config_fsm && !create_file ) ||
+ ( create_file && enable_page_buffer && ! config_fsm ) ||
( hdf_file_name == NULL ) ||
( ( set_mdci_fapl ) && ( cache_image_flags == 0 ) ) ||
( ( set_mdci_fapl ) &&
@@ -1029,9 +1062,32 @@ open_hdf5_file(const hbool_t create_file,
}
}
+ if ( ( pass ) && ( config_fsm ) ) {
+
+ if ( H5Pset_file_space_page_size(fcpl_id, PAGE_SIZE) == FAIL ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Pset_file_space_page_size() failed.\n";
+ }
+ }
+
if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ /* setup the page buffer if indicated */
+ if ( ( pass ) && ( enable_page_buffer ) ) {
+
+ if ( H5Pset_page_buffer_size(fapl_id, PB_SIZE, 0, 0) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Pset_page_buffer_size() failed.\n";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
if ( ( pass ) && ( l_facc_type == FACC_MPIO ) ) {
/* set Parallel access with communicator */
@@ -1162,6 +1218,31 @@ open_hdf5_file(const hbool_t create_file,
if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* verify expected page buffer status. At present, page buffering
+ * must be disabled in parallel -- hopefully this will change in the
+ * future.
+ */
+ if ( pass ) {
+
+ if ( ( file_ptr->shared->page_buf ) &&
+ ( ( ! enable_page_buffer ) || ( l_facc_type == FACC_MPIO ) ) ) {
+
+ pass = FALSE;
+ failure_mssg = "page buffer unexepectedly enabled.";
+
+ } else if ( ( file_ptr->shared->page_buf != NULL ) &&
+ ( ( enable_page_buffer ) || ( l_facc_type != FACC_MPIO ) ) ) {
+
+ pass = FALSE;
+ failure_mssg = "page buffer unexepectedly disabled.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
/* verify expected metadata cache status */
/* get the cache image control structure from the cache, and verify
@@ -1181,6 +1262,7 @@ open_hdf5_file(const hbool_t create_file,
if ( show_progress )
HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
if ( pass ) {
if ( set_mdci_fapl ) {
@@ -1308,6 +1390,1244 @@ open_hdf5_file(const hbool_t create_file,
/*-------------------------------------------------------------------------
+ * Function: par_create_dataset()
+ *
+ * Purpose: Collectively create a chunked dataset, and fill it with
+ * known values.
+ *
+ * On failure, set pass to FALSE, and set failure_mssg
+ * to point to an appropriate failure message.
+ *
+ * Do nothing if pass is FALSE on entry.
+ *
+ * Return: void
+ *
+ * Programmer: John Mainzer
+ * 3/4/17
+ *
+ * Modifications:
+ *
+ * None.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static void
+par_create_dataset(int dset_num,
+ hid_t file_id,
+ int mpi_rank,
+ int mpi_size)
+{
+ const char * fcn_name = "par_create_dataset()";
+ char dset_name[256];
+ hbool_t show_progress = FALSE;
+ hbool_t valid_chunk;
+ hbool_t verbose = FALSE;
+ int cp = 0;
+ int i, j, k, l;
+ int data_chunk[1][CHUNK_SIZE][CHUNK_SIZE];
+ hsize_t dims[3];
+ hsize_t a_size[3];
+ hsize_t offset[3];
+ hsize_t chunk_size[3];
+ hid_t status;
+ hid_t dataspace_id = -1;
+ hid_t memspace_id = -1;
+ hid_t dset_id = -1;
+ hid_t filespace_id = -1;
+ hid_t dcpl_id = -1;
+ hid_t dxpl_id = -1;
+
+ show_progress = (show_progress && (mpi_rank == 0));
+ verbose = (verbose && (mpi_rank == 0));
+
+ sprintf(dset_name, "/dset%03d", dset_num);
+
+ if ( show_progress ) {
+ HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ }
+
+ if ( pass ) {
+
+ /* create a dataspace for the chunked dataset */
+ dims[0] = (hsize_t)mpi_size;
+ dims[1] = DSET_SIZE;
+ dims[2] = DSET_SIZE;
+ dataspace_id = H5Screate_simple(3, dims, NULL);
+
+ if ( dataspace_id < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Screate_simple() failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* set the dataset creation plist to specify that the raw data is
+ * to be partioned into 1X10X10 element chunks.
+ */
+
+ if ( pass ) {
+
+ dcpl_id = H5Pcreate(H5P_DATASET_CREATE);
+
+ if ( dcpl_id < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Pcreate(H5P_DATASET_CREATE) failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ if ( pass ) {
+
+ chunk_size[0] = 1;
+ chunk_size[1] = CHUNK_SIZE;
+ chunk_size[2] = CHUNK_SIZE;
+
+ if ( H5Pset_chunk(dcpl_id, 3, chunk_size) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Pset_chunk() failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* create the dataset */
+ if ( pass ) {
+
+ dset_id = H5Dcreate2(file_id, dset_name, H5T_STD_I32BE,
+ dataspace_id, H5P_DEFAULT,
+ dcpl_id, H5P_DEFAULT);
+
+ if ( dset_id < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Dcreate() failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* get the file space ID */
+ if ( pass ) {
+
+ filespace_id = H5Dget_space(dset_id);
+
+ if ( filespace_id < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Dget_space() failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* create the mem space to be used to read and write chunks */
+ if ( pass ) {
+
+ dims[0] = 1;
+ dims[1] = CHUNK_SIZE;
+ dims[2] = CHUNK_SIZE;
+ memspace_id = H5Screate_simple(3, dims, NULL);
+
+ if ( memspace_id < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Screate_simple() failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* select in memory hyperslab */
+ if ( pass ) {
+
+ offset[0] = 0; /* offset of hyperslab in memory */
+ offset[1] = 0;
+ offset[2] = 0;
+ a_size[0] = 1; /* size of hyperslab */
+ a_size[1] = CHUNK_SIZE;
+ a_size[2] = CHUNK_SIZE;
+ status = H5Sselect_hyperslab(memspace_id, H5S_SELECT_SET, offset, NULL,
+ a_size, NULL);
+
+ if ( status < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Sselect_hyperslab() failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* setup the DXPL for collective I/O */
+ if ( pass ) {
+
+ dxpl_id = H5Pcreate(H5P_DATASET_XFER);
+
+ if ( dxpl_id < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Pcreate(H5P_DATASET_XFER) failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ if ( pass ) {
+
+ if ( H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Pset_dxpl_mpio() failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* initialize the dataset with collective writes */
+ i = 0;
+ while ( ( pass ) && ( i < DSET_SIZE ) )
+ {
+ j = 0;
+ while ( ( pass ) && ( j < DSET_SIZE ) )
+ {
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d.0, pass = %d.\n",
+ fcn_name, cp, pass);
+
+ /* initialize the slab */
+ for ( k = 0; k < CHUNK_SIZE; k++ )
+ {
+ for ( l = 0; l < CHUNK_SIZE; l++ )
+ {
+ data_chunk[0][k][l] = (DSET_SIZE * DSET_SIZE * mpi_rank) +
+ (DSET_SIZE * (i + k)) + j + l +
+ dset_num;
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d.1, pass = %d.\n",
+ fcn_name, cp, pass);
+
+ /* select on disk hyperslab */
+ offset[0] = (hsize_t)mpi_rank; /* offset of hyperslab in file */
+ offset[1] = (hsize_t)i;
+ offset[2] = (hsize_t)j;
+ a_size[0] = (hsize_t)1; /* size of hyperslab */
+ a_size[1] = CHUNK_SIZE;
+ a_size[2] = CHUNK_SIZE;
+ status = H5Sselect_hyperslab(filespace_id, H5S_SELECT_SET,
+ offset, NULL, a_size, NULL);
+
+ if ( status < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "disk H5Sselect_hyperslab() failed.";
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d.2, pass = %d.\n",
+ fcn_name, cp, pass);
+
+ /* write the chunk to file */
+ status = H5Dwrite(dset_id, H5T_NATIVE_INT, memspace_id,
+ filespace_id, dxpl_id, data_chunk);
+
+ if ( status < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Dwrite() failed.";
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d.3, pass = %d.\n",
+ fcn_name, cp, pass);
+
+ j += CHUNK_SIZE;
+ }
+
+ i += CHUNK_SIZE;
+ }
+
+ cp++;
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* read data from data sets and validate it */
+ i = 0;
+ while ( ( pass ) && ( i < DSET_SIZE ) )
+ {
+ j = 0;
+ while ( ( pass ) && ( j < DSET_SIZE ) )
+ {
+ /* select on disk hyperslab */
+ offset[0] = (hsize_t)mpi_rank;
+ offset[1] = (hsize_t)i; /* offset of hyperslab in file */
+ offset[2] = (hsize_t)j;
+ a_size[0] = (hsize_t)1;
+ a_size[1] = CHUNK_SIZE; /* size of hyperslab */
+ a_size[2] = CHUNK_SIZE;
+
+ status = H5Sselect_hyperslab(filespace_id, H5S_SELECT_SET,
+ offset, NULL, a_size, NULL);
+
+ if ( status < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "disk hyperslab create failed.";
+ }
+
+ /* read the chunk from file */
+ if ( pass ) {
+
+ status = H5Dread(dset_id, H5T_NATIVE_INT,
+ memspace_id, filespace_id,
+ dxpl_id, data_chunk);
+
+ if ( status < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "chunk read failed.";
+ }
+ }
+
+ /* validate the slab */
+ if ( pass ) {
+
+ valid_chunk = TRUE;
+ for ( k = 0; k < CHUNK_SIZE; k++ )
+ {
+ for ( l = 0; l < CHUNK_SIZE; l++ )
+ {
+ if ( data_chunk[0][k][l]
+ !=
+ ((DSET_SIZE * DSET_SIZE * mpi_rank) +
+ (DSET_SIZE * (i + k)) + j + l + dset_num) ) {
+
+ valid_chunk = FALSE;
+
+ if ( verbose ) {
+
+ HDfprintf(stdout,
+ "data_chunk[%0d][%0d] = %0d, expect %0d.\n",
+ k, l, data_chunk[0][k][l],
+ ((DSET_SIZE * DSET_SIZE * mpi_rank) +
+ (DSET_SIZE * (i + k)) + j + l + dset_num));
+ HDfprintf(stdout,
+ "dset_num = %d, i = %d, j = %d, k = %d, l = %d\n",
+ dset_num, i, j, k, l);
+ }
+ }
+ }
+ }
+
+ if ( ! valid_chunk ) {
+
+ pass = FALSE;
+ failure_mssg = "slab validation failed.";
+
+ if ( verbose ) {
+
+ fprintf(stdout,
+ "Chunk (%0d, %0d) in /dset%03d is invalid.\n",
+ i, j, dset_num);
+ }
+ }
+ }
+ j += CHUNK_SIZE;
+ }
+ i += CHUNK_SIZE;
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* close the data space */
+ if ( ( pass ) && ( H5Sclose(dataspace_id) < 0 ) ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Sclose(dataspace_id) failed.";
+ }
+
+ /* close the file space */
+ if ( ( pass ) && ( H5Sclose(filespace_id) < 0 ) ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Sclose(filespace_id) failed.";
+ }
+
+ /* close the dataset */
+ if ( ( pass ) && ( H5Dclose(dset_id) < 0 ) ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Dclose(dset_id) failed.";
+ }
+
+ /* close the mem space */
+ if ( ( pass ) && ( H5Sclose(memspace_id) < 0 ) ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Sclose(memspace_id) failed.";
+ }
+
+ /* close the dataset creation property list */
+ if ( ( pass ) && ( H5Pclose(dcpl_id) < 0 ) ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Pclose(dcpl) failed.";
+ }
+
+ /* close the data access property list */
+ if ( ( pass ) && ( H5Pclose(dxpl_id) < 0 ) ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Pclose(dxpl) failed.";
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ return;
+
+} /* par_create_dataset() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: par_delete_dataset()
+ *
+ * Purpose: Collectively delete the specified dataset.
+ *
+ * On failure, set pass to FALSE, and set failure_mssg
+ * to point to an appropriate failure message.
+ *
+ * Do nothing if pass is FALSE on entry.
+ *
+ * Return: void
+ *
+ * Programmer: John Mainzer
+ * 3/6/17
+ *
+ * Modifications:
+ *
+ * None.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static void
+par_delete_dataset(int dset_num,
+ hid_t file_id,
+ int mpi_rank)
+{
+ const char * fcn_name = "par_delete_dataset()";
+ char dset_name[256];
+ hbool_t show_progress = FALSE;
+ int cp = 0;
+
+ show_progress = (show_progress && (mpi_rank == 0));
+
+ sprintf(dset_name, "/dset%03d", dset_num);
+
+ if ( show_progress ) {
+ HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ }
+
+ /* verify the target dataset */
+ if ( pass ) {
+
+ par_verify_dataset(dset_num, file_id, mpi_rank);
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* delete the target dataset */
+ if ( pass ) {
+
+ if ( H5Ldelete(file_id, dset_name, H5P_DEFAULT) < 0) {
+
+ pass = FALSE;
+ failure_mssg = "H5Ldelete() failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ return;
+
+} /* par_delete_dataset() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: par_insert_cache_image()
+ *
+ * Purpose: Insert a cache image in the supplied file.
+ *
+ * At present, cache image is not enabled in the parallel
+ * so we have to insert the cache image with a serial
+ * process. Do this via a fork and an execv from process 0.
+ * All processes wait until the child process completes, and
+ * then return.
+ *
+ * On failure, set pass to FALSE, and set failure_mssg
+ * to point to an appropriate failure message.
+ *
+ * Do nothing if pass is FALSE on entry.
+ *
+ * Return: void
+ *
+ * Programmer: John Mainzer
+ * 3/8/17
+ *
+ * Modifications:
+ *
+ * None.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static void
+par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size )
+{
+ hbool_t show_progress = FALSE;
+
+ if ( pass ) {
+
+ if ( mpi_rank == 0 ) { /* insert cache image in supplied test file */
+
+ char file_name_idx_str[32];
+ char mpi_size_str[32];
+ int child_status;
+ pid_t child_pid;
+
+ sprintf(file_name_idx_str, "%d", file_name_idx);
+ sprintf(mpi_size_str, "%d", mpi_size);
+
+ child_pid = fork();
+
+ if ( child_pid == 0 ) { /* this is the child process */
+
+ /* fun and games to shutup the compiler */
+ char param0[32] = "t_cache_image";
+ char param1[32] = "ici";
+ char * child_argv[] = {param0,
+ param1,
+ file_name_idx_str,
+ mpi_size_str,
+ NULL};
+
+ /* we may need to play with the path here */
+ if ( execv("t_cache_image", child_argv) == -1 ) {
+
+ HDfprintf(stdout,
+ "execl() of ici process failed. errno = %d(%s)\n",
+ errno, strerror(errno));
+ exit(1);
+ }
+
+ } else if ( child_pid != -1 ) {
+ /* this is the parent process -- wait until child is done */
+ if ( -1 == waitpid(child_pid, &child_status, WUNTRACED)) {
+
+ HDfprintf(stdout, "can't wait on ici process.\n");
+ pass = FALSE;
+
+ } else if ( ! WIFEXITED(child_status) ) {
+
+ HDfprintf(stdout, "ici process hasn't exitied.\n");
+ pass = FALSE;
+
+ } else if ( WEXITSTATUS(child_status) != 0 ) {
+
+ HDfprintf(stdout, "ici process reports failure.\n");
+ pass = FALSE;
+
+ } else if ( show_progress ) {
+
+ HDfprintf(stdout, "cache image insertion complete.\n");
+ }
+ } else { /* fork failed */
+
+ HDfprintf(stdout,
+ "can't create process to insert cache image.\n");
+ pass = FALSE;
+ }
+ }
+ }
+
+ if ( pass ) {
+
+ /* make sure insertion of the cache image is complete
+ * before proceeding
+ */
+ MPI_Barrier(MPI_COMM_WORLD);
+ }
+
+ return;
+
+} /* par_insert_cache_image() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: par_verify_dataset()
+ *
+ * Purpose: Collectively verify the contents of a chunked dataset.
+ *
+ * On failure, set pass to FALSE, and set failure_mssg
+ * to point to an appropriate failure message.
+ *
+ * Do nothing if pass is FALSE on entry.
+ *
+ * Return: void
+ *
+ * Programmer: John Mainzer
+ * 3/6/17
+ *
+ * Modifications:
+ *
+ * None.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static void
+par_verify_dataset(int dset_num,
+ hid_t file_id,
+ int mpi_rank)
+{
+ const char * fcn_name = "par_verify_dataset()";
+ char dset_name[256];
+ hbool_t show_progress = FALSE;
+ hbool_t valid_chunk;
+ hbool_t verbose = FALSE;
+ int cp = 0;
+ int i, j, k, l;
+ int data_chunk[1][CHUNK_SIZE][CHUNK_SIZE];
+ hsize_t dims[3];
+ hsize_t a_size[3];
+ hsize_t offset[3];
+ hid_t status;
+ hid_t memspace_id = -1;
+ hid_t dset_id = -1;
+ hid_t filespace_id = -1;
+ hid_t dxpl_id = -1;
+
+ show_progress = (show_progress && (mpi_rank == 0));
+ verbose = (verbose && (mpi_rank == 0));
+
+ sprintf(dset_name, "/dset%03d", dset_num);
+
+ if ( show_progress ) {
+ HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ }
+
+ if ( pass ) {
+
+ /* open the dataset */
+
+ dset_id = H5Dopen2(file_id, dset_name, H5P_DEFAULT);
+
+ if ( dset_id < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Dopen2() failed.";
+ }
+ }
+
+ /* get the file space ID */
+ if ( pass ) {
+
+ filespace_id = H5Dget_space(dset_id);
+
+ if ( filespace_id < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Dget_space() failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* create the mem space to be used to read */
+ if ( pass ) {
+
+ dims[0] = 1;
+ dims[1] = CHUNK_SIZE;
+ dims[2] = CHUNK_SIZE;
+ memspace_id = H5Screate_simple(3, dims, NULL);
+
+ if ( memspace_id < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Screate_simple() failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* select in memory hyperslab */
+ if ( pass ) {
+
+ offset[0] = 0; /* offset of hyperslab in memory */
+ offset[1] = 0;
+ offset[2] = 0;
+ a_size[0] = 1; /* size of hyperslab */
+ a_size[1] = CHUNK_SIZE;
+ a_size[2] = CHUNK_SIZE;
+ status = H5Sselect_hyperslab(memspace_id, H5S_SELECT_SET, offset, NULL,
+ a_size, NULL);
+
+ if ( status < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Sselect_hyperslab() failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* setup the DXPL for collective I/O */
+ if ( pass ) {
+
+ dxpl_id = H5Pcreate(H5P_DATASET_XFER);
+
+ if ( dxpl_id < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Pcreate(H5P_DATASET_XFER) failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ if ( pass ) {
+
+ if ( H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Pset_dxpl_mpio() failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* read data from data sets and validate it */
+ i = 0;
+ while ( ( pass ) && ( i < DSET_SIZE ) )
+ {
+ j = 0;
+ while ( ( pass ) && ( j < DSET_SIZE ) )
+ {
+ /* select on disk hyperslab */
+ offset[0] = (hsize_t)mpi_rank;
+ offset[1] = (hsize_t)i; /* offset of hyperslab in file */
+ offset[2] = (hsize_t)j;
+ a_size[0] = (hsize_t)1;
+ a_size[1] = CHUNK_SIZE; /* size of hyperslab */
+ a_size[2] = CHUNK_SIZE;
+
+ status = H5Sselect_hyperslab(filespace_id, H5S_SELECT_SET,
+ offset, NULL, a_size, NULL);
+
+ if ( status < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "disk hyperslab create failed.";
+ }
+
+ /* read the chunk from file */
+ if ( pass ) {
+
+ status = H5Dread(dset_id, H5T_NATIVE_INT,
+ memspace_id, filespace_id,
+ dxpl_id, data_chunk);
+
+ if ( status < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "chunk read failed.";
+ }
+ }
+
+ /* validate the slab */
+ if ( pass ) {
+
+ valid_chunk = TRUE;
+ for ( k = 0; k < CHUNK_SIZE; k++ )
+ {
+ for ( l = 0; l < CHUNK_SIZE; l++ )
+ {
+ if ( data_chunk[0][k][l]
+ !=
+ ((DSET_SIZE * DSET_SIZE * mpi_rank) +
+ (DSET_SIZE * (i + k)) + j + l + dset_num) ) {
+
+ valid_chunk = FALSE;
+
+ if ( verbose ) {
+
+ HDfprintf(stdout,
+ "data_chunk[%0d][%0d] = %0d, expect %0d.\n",
+ k, l, data_chunk[0][k][l],
+ ((DSET_SIZE * DSET_SIZE * mpi_rank) +
+ (DSET_SIZE * (i + k)) + j + l + dset_num));
+ HDfprintf(stdout,
+ "dset_num = %d, i = %d, j = %d, k = %d, l = %d\n",
+ dset_num, i, j, k, l);
+ }
+ }
+ }
+ }
+
+ if ( ! valid_chunk ) {
+
+ pass = FALSE;
+ failure_mssg = "slab validation failed.";
+
+ if ( verbose ) {
+
+ fprintf(stdout,
+ "Chunk (%0d, %0d) in /dset%03d is invalid.\n",
+ i, j, dset_num);
+ }
+ }
+ }
+ j += CHUNK_SIZE;
+ }
+ i += CHUNK_SIZE;
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* close the file space */
+ if ( ( pass ) && ( H5Sclose(filespace_id) < 0 ) ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Sclose(filespace_id) failed.";
+ }
+
+ /* close the dataset */
+ if ( ( pass ) && ( H5Dclose(dset_id) < 0 ) ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Dclose(dset_id) failed.";
+ }
+
+ /* close the mem space */
+ if ( ( pass ) && ( H5Sclose(memspace_id) < 0 ) ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Sclose(memspace_id) failed.";
+ }
+
+ /* close the data access property list */
+ if ( ( pass ) && ( H5Pclose(dxpl_id) < 0 ) ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Pclose(dxpl) failed.";
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ return;
+
+} /* par_verify_dataset() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: serial_insert_cache_image()
+ *
+ * Purpose: Insert a cache image in the supplied file.
+ *
+ * To populate the cache image, validate the contents
+ * of the file before closing.
+ *
+ * On failure, print an appropriate error message and
+ * return FALSE.
+ *
+ * Return: TRUE if succussful, FALSE otherwise.
+ *
+ * Programmer: John Mainzer
+ * 3/8/17
+ *
+ * Modifications:
+ *
+ * None.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static hbool_t
+serial_insert_cache_image(int file_name_idx, int mpi_size )
+{
+ const char * fcn_name = "serial_insert_cache_image()";
+ char filename[512];
+ hbool_t show_progress = FALSE;
+ int cp = 0;
+ int i;
+ int num_dsets = PAR_NUM_DSETS;
+ hid_t file_id = -1;
+ H5F_t *file_ptr = NULL;
+ H5C_t *cache_ptr = NULL;
+ MPI_Comm dummy_comm = MPI_COMM_WORLD;
+ MPI_Info dummy_info = MPI_INFO_NULL;
+
+ pass = TRUE;
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 1) setup the file name */
+ if ( pass ) {
+
+ HDassert(FILENAMES[file_name_idx]);
+
+ if ( h5_fixname(FILENAMES[file_name_idx], H5P_DEFAULT,
+ filename, sizeof(filename))
+ == NULL ) {
+
+ pass = FALSE;
+ HDfprintf(stdout, "h5_fixname() failed.\n");
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 2) Open the PHDF5 file with the cache image FAPL entry.
+ */
+
+ if ( pass ) {
+
+ open_hdf5_file(/* create_file */ FALSE,
+ /* mdci_sbem_expected */ FALSE,
+ /* read_only */ FALSE,
+ /* set_mdci_fapl */ TRUE,
+ /* config_fsm */ FALSE,
+ /* enable_page_buffer */ FALSE,
+ /* hdf_file_name */ filename,
+ /* cache_image_flags */ H5C_CI__ALL_FLAGS,
+ /* file_id_ptr */ &file_id,
+ /* file_ptr_ptr */ &file_ptr,
+ /* cache_ptr_ptr */ &cache_ptr,
+ /* comm */ dummy_comm,
+ /* info */ dummy_info,
+ /* l_facc_type */ 0,
+ /* all_coll_metadata_ops */ FALSE,
+ /* coll_metadata_write */ FALSE,
+ /* md_write_strat */ 1);
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 3) Validate contents of the file */
+
+ i = 0;
+ while ( ( pass ) && ( i < num_dsets ) ) {
+
+ serial_verify_dataset(i, file_id, mpi_size);
+ i++;
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 4) Close the file */
+
+ if ( pass ) {
+
+ if ( H5Fclose(file_id) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Fclose() failed.\n";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ return pass;
+
+} /* serial_insert_cache_image() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: serial_verify_dataset()
+ *
+ * Purpose: Verify the contents of a chunked dataset.
+ *
+ * On failure, set pass to FALSE, and set failure_mssg
+ * to point to an appropriate failure message.
+ *
+ * Do nothing if pass is FALSE on entry.
+ *
+ * Return: void
+ *
+ * Programmer: John Mainzer
+ * 3/6/17
+ *
+ * Modifications:
+ *
+ * None.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static void
+serial_verify_dataset(int dset_num,
+ hid_t file_id,
+ int mpi_size)
+{
+ const char * fcn_name = "serial_verify_dataset()";
+ char dset_name[256];
+ hbool_t show_progress = FALSE;
+ hbool_t valid_chunk;
+ hbool_t verbose = FALSE;
+ int cp = 0;
+ int i, j, k, l, m;
+ int data_chunk[1][CHUNK_SIZE][CHUNK_SIZE];
+ hsize_t dims[3];
+ hsize_t a_size[3];
+ hsize_t offset[3];
+ hid_t status;
+ hid_t memspace_id = -1;
+ hid_t dset_id = -1;
+ hid_t filespace_id = -1;
+
+ sprintf(dset_name, "/dset%03d", dset_num);
+
+ if ( show_progress ) {
+ HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name);
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+ }
+
+ if ( pass ) {
+
+ /* open the dataset */
+
+ dset_id = H5Dopen2(file_id, dset_name, H5P_DEFAULT);
+
+ if ( dset_id < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Dopen2() failed.";
+ }
+ }
+
+ /* get the file space ID */
+ if ( pass ) {
+
+ filespace_id = H5Dget_space(dset_id);
+
+ if ( filespace_id < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Dget_space() failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* create the mem space to be used to read */
+ if ( pass ) {
+
+ dims[0] = 1;
+ dims[1] = CHUNK_SIZE;
+ dims[2] = CHUNK_SIZE;
+ memspace_id = H5Screate_simple(3, dims, NULL);
+
+ if ( memspace_id < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Screate_simple() failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* select in memory hyperslab */
+ if ( pass ) {
+
+ offset[0] = 0; /* offset of hyperslab in memory */
+ offset[1] = 0;
+ offset[2] = 0;
+ a_size[0] = 1; /* size of hyperslab */
+ a_size[1] = CHUNK_SIZE;
+ a_size[2] = CHUNK_SIZE;
+ status = H5Sselect_hyperslab(memspace_id, H5S_SELECT_SET, offset, NULL,
+ a_size, NULL);
+
+ if ( status < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Sselect_hyperslab() failed.";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* read data from data sets and validate it */
+ i = 0;
+ while ( ( pass ) && ( i < mpi_size ) )
+ {
+ j = 0;
+ while ( ( pass ) && ( j < DSET_SIZE ) )
+ {
+ k = 0;
+ while ( ( pass ) && ( k < DSET_SIZE ) )
+ {
+ /* select on disk hyperslab */
+ offset[0] = (hsize_t)i; /* offset of hyperslab in file */
+ offset[1] = (hsize_t)j; /* offset of hyperslab in file */
+ offset[2] = (hsize_t)k;
+ a_size[0] = (hsize_t)1;
+ a_size[1] = CHUNK_SIZE; /* size of hyperslab */
+ a_size[2] = CHUNK_SIZE;
+
+ status = H5Sselect_hyperslab(filespace_id, H5S_SELECT_SET,
+ offset, NULL, a_size, NULL);
+
+ if ( status < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "disk hyperslab create failed.";
+ }
+
+ /* read the chunk from file */
+ if ( pass ) {
+
+ status = H5Dread(dset_id, H5T_NATIVE_INT,
+ memspace_id, filespace_id,
+ H5P_DEFAULT, data_chunk);
+
+ if ( status < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "chunk read failed.";
+ }
+ }
+
+ /* validate the slab */
+ if ( pass ) {
+
+ valid_chunk = TRUE;
+
+ for ( l = 0; l < CHUNK_SIZE; l++ )
+ {
+ for ( m = 0; m < CHUNK_SIZE; m++ )
+ {
+ if ( data_chunk[0][l][m]
+ !=
+ ((DSET_SIZE * DSET_SIZE * i) +
+ (DSET_SIZE * (j + l)) + k + m + dset_num) ) {
+
+ valid_chunk = FALSE;
+
+ if ( verbose ) {
+
+ HDfprintf(stdout,
+ "data_chunk[%0d][%0d] = %0d, expect %0d.\n",
+ j, k, data_chunk[0][j][k],
+ ((DSET_SIZE * DSET_SIZE * i) +
+ (DSET_SIZE * (j + l)) + k + m + dset_num));
+ HDfprintf(stdout,
+ "dset_num = %d, i = %d, j = %d, k = %d, l = %d, m = %d\n",
+ dset_num, i, j, k, l, m);
+ }
+ }
+ }
+ }
+
+ if ( ! valid_chunk ) {
+
+ pass = FALSE;
+ failure_mssg = "slab validation failed.";
+
+ if ( verbose ) {
+
+ fprintf(stdout,
+ "Chunk (%0d, %0d) in /dset%03d is invalid.\n",
+ j, k, dset_num);
+ }
+ }
+ }
+ k += CHUNK_SIZE;
+ }
+ j += CHUNK_SIZE;
+ }
+ i++;
+ }
+
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* close the file space */
+ if ( ( pass ) && ( H5Sclose(filespace_id) < 0 ) ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Sclose(filespace_id) failed.";
+ }
+
+ /* close the dataset */
+ if ( ( pass ) && ( H5Dclose(dset_id) < 0 ) ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Dclose(dset_id) failed.";
+ }
+
+ /* close the mem space */
+ if ( ( pass ) && ( H5Sclose(memspace_id) < 0 ) ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Sclose(memspace_id) failed.";
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ return;
+
+} /* serial_verify_dataset() */
+
+
+/*-------------------------------------------------------------------------
* Function: parse_flags
*
* Purpose: Parse the flags passed to this program, and load the
@@ -1321,50 +2641,80 @@ open_hdf5_file(const hbool_t create_file,
*
*-------------------------------------------------------------------------
*/
-hbool_t
-parse_flags(int argc, char * argv[], hbool_t * setup_ptr, hbool_t display)
+static hbool_t
+parse_flags(int argc, char * argv[], hbool_t * setup_ptr,
+ hbool_t * ici_ptr, int * file_idx_ptr, int * mpi_size_ptr, hbool_t display)
{
const char * fcn_name = "parse_flags()";
- const char * (ops[]) = {"setup"};
+ const char * (ops[]) = {"setup", "ici"};
int success = TRUE;
+ HDassert(setup_ptr);
+ HDassert(*setup_ptr == FALSE);
+ HDassert(ici_ptr);
+ HDassert(*ici_ptr == FALSE);
+ HDassert(file_idx_ptr);
+ HDassert(mpi_size_ptr);
+
if ( setup_ptr == NULL ) {
success = FALSE;
HDfprintf(stdout, "%s: bad arg(s) on entry.\n", fcn_name);
}
+
if ( ( success ) &&
- ( ( argc < 1 ) || ( argc > 2 ) ) ) {
+ ( ( argc != 1 ) && ( argc != 2 ) && ( argc != 4 ) ) ) {
success = FALSE;
usage();
}
- if ( success ) {
- if ( argc == 2 ) {
+ if ( ( success ) && ( argc >= 2 ) ) {
- if ( strcmp(argv[1], ops[0]) == 0 ) {
+ if ( strcmp(argv[1], ops[0]) == 0 ) {
- *setup_ptr = TRUE;
+ if ( argc != 2 ) {
+
+ success = FALSE;
+ usage();
} else {
+ *setup_ptr = TRUE;
+
+ }
+ } else if ( strcmp(argv[1], ops[1]) == 0 ) {
+
+ if ( argc != 4 ) {
+
success = FALSE;
usage();
- }
- } else {
- *setup_ptr = FALSE;
+ } else {
+
+ *ici_ptr = TRUE;
+ *file_idx_ptr = atoi(argv[2]);
+ *mpi_size_ptr = atoi(argv[3]);
+
+ }
}
}
if ( ( success ) && ( display ) ) {
if ( *setup_ptr )
+
HDfprintf(stdout, "t_cache_image setup\n");
+
+ else if ( *ici_ptr )
+
+ HDfprintf(stdout, "t_cache_image ici %d %d\n",
+ *file_idx_ptr, *mpi_size_ptr);
+
else
+
HDfprintf(stdout, "t_cache_image\n");
}
@@ -1694,6 +3044,266 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset)
/****************************************************************************/
/*-------------------------------------------------------------------------
+ * Function: verify_cache_image_RO()
+ *
+ * Purpose: Verify that a HDF5 file containing a cache image is
+ * opened R/O and read correctly by PHDF5 with the specified
+ * metadata write strategy.
+ *
+ * Basic cycle of operation is as follows:
+ *
+ * 1) Open the test file created at the beginning of this
+ * test read only.
+ *
+ * Verify that the file contains a cache image.
+ *
+ * Verify that only process 0 reads the cache image.
+ *
+ * Verify that all other processes receive the cache
+ * image block from process 0.
+ *
+ * 2) Verify that the file contains the expected data.
+ *
+ * 3) Close the file.
+ *
+ * 4) Open the file R/O, and verify that it still contains
+ * a cache image.
+ *
+ * 5) Verify that the file contains the expected data.
+ *
+ * 6) Close the file.
+ *
+ * Return: void
+ *
+ * Programmer: John Mainzer
+ * 3/11/17
+ *
+ * Modifications:
+ *
+ * None.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static unsigned
+verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank)
+{
+ const char * fcn_name = "verify_cache_image_RO()";
+ char filename[512];
+ hbool_t show_progress = FALSE;
+ hid_t file_id = -1;
+ H5F_t *file_ptr = NULL;
+ H5C_t *cache_ptr = NULL;
+ int cp = 0;
+
+ pass = TRUE;
+
+ if ( mpi_rank == 0 ) {
+
+ switch(md_write_strat) {
+
+ case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY:
+ TESTING("parallel CI load test -- proc0 md write -- R/O");
+ break;
+
+ case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED:
+ TESTING("parallel CI load test -- dist md write -- R/O");
+ break;
+
+ default:
+ TESTING("parallel CI load test -- unknown md write -- R/o");
+ pass = FALSE;
+ break;
+ }
+ }
+
+ show_progress = ( ( show_progress ) && ( mpi_rank == 0 ) );
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* setup the file name */
+ if ( pass ) {
+
+ if ( h5_fixname(FILENAMES[file_name_id], H5P_DEFAULT,
+ filename, sizeof(filename)) == NULL ) {
+
+ pass = FALSE;
+ failure_mssg = "h5_fixname() failed.\n";
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 1) Open the test file created at the beginning of this test.
+ *
+ * Verify that the file contains a cache image.
+ *
+ * Verify that only process 0 reads the cache image.
+ *
+ * Verify that all other processes receive the cache
+ * image block from process 0.
+ */
+
+ if ( pass ) {
+
+ open_hdf5_file(/* create_file */ FALSE,
+ /* mdci_sbem_expected */ TRUE,
+ /* read_only */ TRUE,
+ /* set_mdci_fapl */ FALSE,
+ /* config_fsm */ FALSE,
+ /* enable_page_buffer */ FALSE,
+ /* hdf_file_name */ filename,
+ /* cache_image_flags */ H5C_CI__ALL_FLAGS,
+ /* file_id_ptr */ &file_id,
+ /* file_ptr_ptr */ &file_ptr,
+ /* cache_ptr_ptr */ &cache_ptr,
+ /* comm */ MPI_COMM_WORLD,
+ /* info */ MPI_INFO_NULL,
+ /* l_facc_type */ FACC_MPIO,
+ /* all_coll_metadata_ops */ FALSE,
+ /* coll_metadata_write */ FALSE,
+ /* md_write_strat */ md_write_strat);
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* Verify that only process 0 reads the cache image. */
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* Verify that all other processes receive the cache image block
+ * from process 0.
+ */
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 2) Verify that the file contains the expected data. */
+ if ( pass ) {
+
+ verify_data_sets(file_id, 0, MAX_NUM_DSETS - 1);
+ }
+
+#if H5C_COLLECT_CACHE_STATS
+ if ( pass ) {
+
+ if ( cache_ptr->images_loaded == 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "metadata cache image block not loaded(1).";
+ }
+ }
+#endif /* H5C_COLLECT_CACHE_STATS */
+
+
+ /* 3) Close the file. */
+
+ if ( pass ) {
+
+ if ( H5Fclose(file_id) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Fclose() failed.\n";
+
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 4) Open the file, and verify that it doesn't contain a cache image. */
+
+ if ( pass ) {
+
+ open_hdf5_file(/* create_file */ FALSE,
+ /* mdci_sbem_expected */ TRUE,
+ /* read_only */ TRUE,
+ /* set_mdci_fapl */ FALSE,
+ /* config_fsm */ FALSE,
+ /* enable_page_buffer */ FALSE,
+ /* hdf_file_name */ filename,
+ /* cache_image_flags */ H5C_CI__ALL_FLAGS,
+ /* file_id_ptr */ &file_id,
+ /* file_ptr_ptr */ &file_ptr,
+ /* cache_ptr_ptr */ &cache_ptr,
+ /* comm */ MPI_COMM_WORLD,
+ /* info */ MPI_INFO_NULL,
+ /* l_facc_type */ FACC_MPIO,
+ /* all_coll_metadata_ops */ FALSE,
+ /* coll_metadata_write */ FALSE,
+ /* md_write_strat */ md_write_strat);
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 5) Verify that the file contains the expected data. */
+
+ if ( pass ) {
+
+ verify_data_sets(file_id, 0, MAX_NUM_DSETS - 1);
+ }
+
+#if H5C_COLLECT_CACHE_STATS
+ if ( pass ) {
+
+ if ( cache_ptr->images_loaded != 1 ) {
+
+ pass = FALSE;
+ failure_mssg = "metadata cache image block not loaded(2).";
+ }
+ }
+#endif /* H5C_COLLECT_CACHE_STATS */
+
+
+ /* 6) Close the file. */
+
+ if ( pass ) {
+
+ if ( H5Fclose(file_id) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Fclose() failed.\n";
+
+ }
+ }
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* report results */
+ if ( mpi_rank == 0 ) {
+
+ if ( pass ) {
+
+ PASSED();
+
+ } else {
+
+ H5_FAILED();
+
+ if ( show_progress )
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", failure_mssg);
+ }
+ }
+
+
+ return !pass;
+
+} /* verify_cache_image_RO() */
+
+
+/*-------------------------------------------------------------------------
* Function: verify_cache_image_RW()
*
* Purpose: Verify that a HDF5 file containing a cache image is
@@ -1747,7 +3357,6 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
- int i;
pass = TRUE;
@@ -1808,6 +3417,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
/* config_fsm */ FALSE,
+ /* enable_page_buffer */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -1880,6 +3490,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
/* read_only */ FALSE,
/* set_mdci_fapl */ FALSE,
/* config_fsm */ FALSE,
+ /* enable_page_buffer */ FALSE,
/* hdf_file_name */ filename,
/* cache_image_flags */ H5C_CI__ALL_FLAGS,
/* file_id_ptr */ &file_id,
@@ -1969,6 +3580,338 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank)
} /* verify_cache_imageRW() */
+/*****************************************************************************
+ *
+ * Function: smoke_check_1()
+ *
+ * Purpose: Initial smoke check to verify correct behaviour of cache
+ * image in combination with parallel.
+ *
+ * As cache image is currently disabled in the parallel case,
+ * we construct a test file in parallel, verify it in serial
+ * and generate a cache image in passing, and then verify
+ * it again in parallel.
+ *
+ * In passing, also verify that page buffering is silently
+ * disabled in the parallel case. Needless to say, this part
+ * of the test will have to be re-worked when and if page
+ * buffering is supported in parallel.
+ *
+ * Return: Success: TRUE
+ *
+ * Failure: FALSE
+ *
+ * Programmer: JRM -- 3/6/17
+ *
+ *****************************************************************************/
+static hbool_t
+smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size)
+{
+ const char * fcn_name = "smoke_check_1()";
+ char filename[512];
+ hbool_t show_progress = FALSE;
+ hid_t file_id = -1;
+ H5F_t *file_ptr = NULL;
+ H5C_t *cache_ptr = NULL;
+ int cp = 0;
+ int i;
+ int num_dsets = PAR_NUM_DSETS;
+ int test_file_index = 2;
+ h5_stat_size_t file_size;
+
+ pass = TRUE;
+
+ if ( mpi_rank == 0 ) {
+
+ TESTING("parallel cache image smoke check 1");
+ }
+
+ if ( ( mpi_rank == 0 ) && ( show_progress ) )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+ /* setup the file name */
+ if ( pass ) {
+
+ HDassert(FILENAMES[test_file_index]);
+
+ if ( h5_fixname(FILENAMES[test_file_index], H5P_DEFAULT,
+ filename, sizeof(filename))
+ == NULL ) {
+
+ pass = FALSE;
+ failure_mssg = "h5_fixname() failed.\n";
+ }
+ }
+
+ if ( ( mpi_rank == 0 ) && ( show_progress ) )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 1) Create a PHDF5 file without the cache image FAPL entry.
+ *
+ * Verify that a cache image is not requested
+ */
+
+ if ( pass ) {
+
+ open_hdf5_file(/* create_file */ TRUE,
+ /* mdci_sbem_expected */ FALSE,
+ /* read_only */ FALSE,
+ /* set_mdci_fapl */ FALSE,
+ /* config_fsm */ TRUE,
+ /* enable_page_buffer */ FALSE,
+ /* hdf_file_name */ filename,
+ /* cache_image_flags */ H5C_CI__ALL_FLAGS,
+ /* file_id_ptr */ &file_id,
+ /* file_ptr_ptr */ &file_ptr,
+ /* cache_ptr_ptr */ &cache_ptr,
+ /* comm */ mpi_comm,
+ /* info */ mpi_info,
+ /* l_facc_type */ FACC_MPIO,
+ /* all_coll_metadata_ops */ FALSE,
+ /* coll_metadata_write */ TRUE,
+ /* md_write_strat */ 1);
+ }
+
+ if ( ( mpi_rank == 0 ) && ( show_progress ) )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 2) Create datasets in the file */
+
+ i = 0;
+ while ( ( pass ) && ( i < num_dsets ) ) {
+
+ par_create_dataset(i, file_id, mpi_rank, mpi_size);
+ i++;
+ }
+
+ if ( ( mpi_rank == 0 ) && ( show_progress ) )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 3) Verify the datasets in the file */
+
+ i = 0;
+ while ( ( pass ) && ( i < num_dsets ) ) {
+
+ par_verify_dataset(i, file_id, mpi_rank);
+ i++;
+ }
+
+
+ /* 4) Close the file */
+
+ if ( pass ) {
+
+ if ( H5Fclose(file_id) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Fclose() failed.\n";
+
+ }
+ }
+
+ if ( ( mpi_rank == 0 ) && ( show_progress ) )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 5 Insert a cache image into the file */
+
+ if ( pass ) {
+
+ par_insert_cache_image(test_file_index, mpi_rank, mpi_size);
+ }
+
+ if ( ( mpi_rank == 0 ) && ( show_progress ) )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 6) Open the file R/O */
+
+ if ( pass ) {
+
+ open_hdf5_file(/* create_file */ FALSE,
+ /* mdci_sbem_expected */ TRUE,
+ /* read_only */ TRUE,
+ /* set_mdci_fapl */ FALSE,
+ /* config_fsm */ FALSE,
+ /* enable_page_buffer */ FALSE,
+ /* hdf_file_name */ filename,
+ /* cache_image_flags */ H5C_CI__ALL_FLAGS,
+ /* file_id_ptr */ &file_id,
+ /* file_ptr_ptr */ &file_ptr,
+ /* cache_ptr_ptr */ &cache_ptr,
+ /* comm */ mpi_comm,
+ /* info */ mpi_info,
+ /* l_facc_type */ FACC_MPIO,
+ /* all_coll_metadata_ops */ FALSE,
+ /* coll_metadata_write */ TRUE,
+ /* md_write_strat */ 1);
+ }
+
+ if ( ( mpi_rank == 0 ) && ( show_progress ) )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 7) Verify the datasets in the file backwards */
+
+ i = num_dsets - 1;
+ while ( ( pass ) && ( i >= 0 ) ) {
+
+ par_verify_dataset(i, file_id, mpi_rank);
+ i--;
+ }
+
+
+ /* 8) Close the file */
+
+ if ( pass ) {
+
+ if ( H5Fclose(file_id) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Fclose() failed.";
+
+ }
+ }
+
+
+ /* 9) Open the file */
+
+ if ( pass ) {
+
+ open_hdf5_file(/* create_file */ FALSE,
+ /* mdci_sbem_expected */ TRUE,
+ /* read_only */ FALSE,
+ /* set_mdci_fapl */ FALSE,
+ /* config_fsm */ FALSE,
+ /* enable_page_buffer */ FALSE,
+ /* hdf_file_name */ filename,
+ /* cache_image_flags */ H5C_CI__ALL_FLAGS,
+ /* file_id_ptr */ &file_id,
+ /* file_ptr_ptr */ &file_ptr,
+ /* cache_ptr_ptr */ &cache_ptr,
+ /* comm */ mpi_comm,
+ /* info */ mpi_info,
+ /* l_facc_type */ FACC_MPIO,
+ /* all_coll_metadata_ops */ FALSE,
+ /* coll_metadata_write */ TRUE,
+ /* md_write_strat */ 1);
+ }
+
+ if ( ( mpi_rank == 0 ) && ( show_progress ) )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 10) Verify the datasets in the file */
+
+ i = 0;
+ while ( ( pass ) && ( i < num_dsets ) ) {
+
+ par_verify_dataset(i, file_id, mpi_rank);
+ i++;
+ }
+
+ if ( ( mpi_rank == 0 ) && ( show_progress ) )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 11) Delete the datasets in the file */
+
+ i = 0;
+ while ( ( pass ) && ( i < num_dsets ) ) {
+
+ par_delete_dataset(i, file_id, mpi_rank);
+ i++;
+ }
+
+ if ( ( mpi_rank == 0 ) && ( show_progress ) )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 12) Close the file */
+
+ if ( pass ) {
+
+ if ( H5Fclose(file_id) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Fclose() failed.";
+
+ }
+ }
+
+ if ( ( mpi_rank == 0 ) && ( show_progress ) )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 13) Get the size of the file. Verify that it is less
+ * than 20 KB. Without deletions and persistant free
+ * space managers, size size is about 30 MB, so this
+ * is sufficient to verify that the persistant free
+ * space managers are more or less doing their job.
+ *
+ * Note that this test will have to change if we use
+ * a larger page size.
+ */
+ if ( pass ) {
+
+ if ( ( file_size = h5_get_file_size(filename, H5P_DEFAULT) ) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "h5_get_file_size() failed.";
+
+ } else if ( file_size > 20 * 1024 ) {
+
+ pass = FALSE;
+ failure_mssg = "unexpectedly large file size.";
+ }
+ }
+
+ if ( ( mpi_rank == 0 ) && ( show_progress ) )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* 14) Delete the file */
+
+ if ( pass ) {
+
+ /* wait for everyone to close the file */
+ MPI_Barrier(MPI_COMM_WORLD);
+
+ if ( ( mpi_rank == 0 ) && ( HDremove(filename) < 0 ) ) {
+
+ pass = FALSE;
+ failure_mssg = "HDremove() failed.\n";
+ }
+ }
+
+ if ( ( mpi_rank == 0 ) && ( show_progress ) )
+ HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
+
+
+ /* report results */
+ if ( mpi_rank == 0 ) {
+
+ if ( pass ) {
+
+ PASSED();
+
+ } else {
+
+ H5_FAILED();
+
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n",
+ fcn_name, failure_mssg);
+ }
+ }
+
+ return !pass;
+
+} /* smoke_check_1() */
+
+
/*-------------------------------------------------------------------------
* Function: main
*
@@ -1999,22 +3942,26 @@ int
main(int argc, char **argv)
{
hbool_t setup = FALSE;
+ hbool_t ici = FALSE;
unsigned nerrs = 0;
+ MPI_Comm comm = MPI_COMM_WORLD;
+ MPI_Info info = MPI_INFO_NULL;
+ int file_idx;
int i;
int mpi_size;
int mpi_rank;
- if ( ! parse_flags(argc, argv, &setup, FALSE) )
+ if ( ! parse_flags(argc, argv, &setup, &ici, &file_idx, &mpi_size, FALSE) )
exit(1); /* exit now if unable to parse flags */
- if ( setup ) { /* construct test file and exit */
+ if ( setup ) { /* construct test files and exit */
H5open();
HDfprintf(stdout, "Constructing test files: \n");
HDfflush(stdout);
i = 0;
- while ( FILENAMES[i] != NULL ) {
+ while ( ( FILENAMES[i] != NULL ) && ( i < TEST_FILES_TO_CONSTRUCT ) ) {
HDfprintf(stdout, " writing %s ... ", FILENAMES[i]);
HDfflush(stdout);
@@ -2032,11 +3979,26 @@ main(int argc, char **argv)
}
i++;
}
+
HDfprintf(stdout, "Test file construction complete.\n");
exit(0);
+
+ } else if ( ici ) {
+
+ if ( serial_insert_cache_image(file_idx, mpi_size) ) {
+
+ exit(0);
+
+ } else {
+
+ HDfprintf(stderr, "\n\nCache image insertion failed.\n");
+ HDfprintf(stderr, " failure mssg = \"%s\"\n", failure_mssg);
+ exit(1);
+ }
}
HDassert(!setup);
+ HDassert(!ici);
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -2118,14 +4080,21 @@ main(int argc, char **argv)
}
}
- /* can't start test until test file exists */
+ /* can't start test until test files exist */
MPI_Barrier(MPI_COMM_WORLD);
+
+ nerrs += verify_cache_image_RO(0,
+ H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY, mpi_rank);
+#if 1
+ nerrs += verify_cache_image_RO(1,
+ H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED, mpi_rank);
nerrs += verify_cache_image_RW(0,
H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY, mpi_rank);
nerrs += verify_cache_image_RW(1,
H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED, mpi_rank);
-
+ nerrs += smoke_check_1(comm, info, mpi_rank, mpi_size);
+#endif
finish:
/* make sure all processes are finished before final report, cleanup
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index aa5a1b4..2bcad83 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -1147,7 +1147,7 @@
##############################################################################
### P L U G I N T E S T S
##############################################################################
- ADD_H5_UD_TEST (plugin_version_test 0 h5repack_layout.h5 -v -f UD=260,4,9,1,9,235)
+ ADD_H5_UD_TEST (plugin_version_test 0 h5repack_layout.h5 -v -f UD=260,4,9,${H5_VERS_MAJOR},${H5_VERS_MINOR},${H5_VERS_RELEASE})
ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,1,9)
ADD_H5_UD_TEST (plugin_none 0 h5repack_layout.UD.h5 -v -f NONE)
# check for no parameters