From d93cb9ca25b5a5e987c6b9023f6868d47dd93a9a Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Tue, 4 Oct 2016 17:50:54 -0400 Subject: Added C++ wrappers (get/setCoreWriteTracking()) for new H5Pset/get_core_write_tracking() API calls. --- c++/src/H5FaccProp.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ c++/src/H5FaccProp.h | 6 ++++++ c++/test/tfile.cpp | 2 +- 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp index 972f915..653b6cc 100644 --- a/c++/src/H5FaccProp.cpp +++ b/c++/src/H5FaccProp.cpp @@ -241,6 +241,47 @@ void FileAccPropList::getCore (size_t& increment, hbool_t& backing_store) const } //-------------------------------------------------------------------------- +// Function: FileAccPropList::setCoreWriteTracking +///\brief Modifies core driver write tracking properties on this file +/// access property list. +///\param is_enabled - IN: Whether the write tracking feature should +/// be enabled or not. +///\param page_size - IN: Sets the page size used with the write tracking +/// feature. When set to a value greater than 1, this allows +/// page-sized aggregation of tracked writes. +///\exception H5::PropListIException +///\par Description +/// For more details on the use of the write tracking feature, refer to +/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetCoreWriteTracking +// Programmer: Dana Robinson - Fall 2016 +//-------------------------------------------------------------------------- +void FileAccPropList::setCoreWriteTracking (hbool_t is_enabled, size_t page_size) const +{ + herr_t ret_value = H5Pset_core_write_tracking (id, is_enabled, page_size); + if (ret_value < 0) + { + throw PropListIException ("FileAccPropList::setCoreWriteTracking", "H5Pset_core_write_tracking failed"); + } +} + +//-------------------------------------------------------------------------- +// Function: FileAccPropList::getCoreWriteTracking +///\brief Queries core file driver write tracking properties. +///\param is_enabled - OUT: Whether or not the write tracking feature is +/// enabled. +///\param page_size - OUT: The page size used when aggregating tracked writes. +///\exception H5::PropListIException +// Programmer: Dana Robinson - Fall 2016 +//-------------------------------------------------------------------------- +void FileAccPropList::getCoreWriteTracking (hbool_t& is_enabled, size_t& page_size) const +{ + herr_t ret_value = H5Pget_core_write_tracking(id, &is_enabled, &page_size); + if( ret_value < 0 ) + { + throw PropListIException("FileAccPropList::getCoreWriteTracking", "H5Pget_core_write_tracking failed"); + } +} +//-------------------------------------------------------------------------- // Function: FileAccPropList::setFamily ///\brief Sets this file access property list to use the family driver. ///\param memb_size - IN: Size in bytes of each file member diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h index 831488c..1020c46 100644 --- a/c++/src/H5FaccProp.h +++ b/c++/src/H5FaccProp.h @@ -58,6 +58,12 @@ class H5_DLLCPP FileAccPropList : public PropList { // Queries H5FD_CORE driver properties. void getCore (size_t& increment, hbool_t& backing_store) const; + // Sets write tracking for the core driver. + void setCoreWriteTracking (hbool_t is_enabled, size_t page_size) const; + + // Queries the core driver write tracking property. + void getCoreWriteTracking (hbool_t& is_enabled, size_t& page_size) const; + // Sets this file access properties list to the family driver. void setFamily( hsize_t memb_size, const FileAccPropList& memb_plist ) const; diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index 0eabfb9..f322ff7 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -565,7 +565,7 @@ static void test_file_attribute() dattr.write(PredType::NATIVE_INT, dattr_data); // Test flushing out the data from the attribute object - dattr.flush(H5F_SCOPE_GLOBAL); + dattr.flush(H5F_SCOPE_GLOBAL); // Get and verify the number of all objects in the file // Current: 1 file, 2 file attr, 1 ds, and 1 ds attr. -- cgit v0.12 From f1dcda5c8e23d4897b5fe49049b8d939313b39c6 Mon Sep 17 00:00:00 2001 From: derobins Date: Fri, 14 Oct 2016 15:32:27 -0400 Subject: Fixed Windows test failures. Replaced a static keyword that was deleted during a warnings overhaul. Tested on 64-bit Visual Studio 2015 --- test/dsets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dsets.c b/test/dsets.c index 8aa073f..16c233f 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -7949,7 +7949,7 @@ test_big_chunks_bypass_cache(hid_t fapl) /* Buffers for reading and writing data (1-D) */ int *wdata = NULL, *rdata1 = NULL, *rdata2 = NULL; /* Buffer for reading and writing data (2-D) */ - int t_wdata[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2], t_rdata1[BYPASS_DIM][BYPASS_DIM], + static int t_wdata[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2], t_rdata1[BYPASS_DIM][BYPASS_DIM], t_rdata2[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2]; int i, j; /* Local index variables */ H5F_libver_t low; /* File format low bound */ -- cgit v0.12 From 9d4cbecb2f648447f05b02be32ee5e3398b19d0c Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 14 Oct 2016 15:42:55 -0400 Subject: Revert "Fixed Windows test failures." This reverts commit f1dcda5c8e23d4897b5fe49049b8d939313b39c6. --- test/dsets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dsets.c b/test/dsets.c index 16c233f..8aa073f 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -7949,7 +7949,7 @@ test_big_chunks_bypass_cache(hid_t fapl) /* Buffers for reading and writing data (1-D) */ int *wdata = NULL, *rdata1 = NULL, *rdata2 = NULL; /* Buffer for reading and writing data (2-D) */ - static int t_wdata[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2], t_rdata1[BYPASS_DIM][BYPASS_DIM], + int t_wdata[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2], t_rdata1[BYPASS_DIM][BYPASS_DIM], t_rdata2[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2]; int i, j; /* Local index variables */ H5F_libver_t low; /* File format low bound */ -- cgit v0.12 From bad28040b0eac564322304c0275786f09d0e44e4 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 14 Oct 2016 15:43:25 -0400 Subject: Revert "Added C++ wrappers (get/setCoreWriteTracking()) for new" This reverts commit d93cb9ca25b5a5e987c6b9023f6868d47dd93a9a. --- c++/src/H5FaccProp.cpp | 41 ----------------------------------------- c++/src/H5FaccProp.h | 6 ------ c++/test/tfile.cpp | 2 +- 3 files changed, 1 insertion(+), 48 deletions(-) diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp index 653b6cc..972f915 100644 --- a/c++/src/H5FaccProp.cpp +++ b/c++/src/H5FaccProp.cpp @@ -241,47 +241,6 @@ void FileAccPropList::getCore (size_t& increment, hbool_t& backing_store) const } //-------------------------------------------------------------------------- -// Function: FileAccPropList::setCoreWriteTracking -///\brief Modifies core driver write tracking properties on this file -/// access property list. -///\param is_enabled - IN: Whether the write tracking feature should -/// be enabled or not. -///\param page_size - IN: Sets the page size used with the write tracking -/// feature. When set to a value greater than 1, this allows -/// page-sized aggregation of tracked writes. -///\exception H5::PropListIException -///\par Description -/// For more details on the use of the write tracking feature, refer to -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetCoreWriteTracking -// Programmer: Dana Robinson - Fall 2016 -//-------------------------------------------------------------------------- -void FileAccPropList::setCoreWriteTracking (hbool_t is_enabled, size_t page_size) const -{ - herr_t ret_value = H5Pset_core_write_tracking (id, is_enabled, page_size); - if (ret_value < 0) - { - throw PropListIException ("FileAccPropList::setCoreWriteTracking", "H5Pset_core_write_tracking failed"); - } -} - -//-------------------------------------------------------------------------- -// Function: FileAccPropList::getCoreWriteTracking -///\brief Queries core file driver write tracking properties. -///\param is_enabled - OUT: Whether or not the write tracking feature is -/// enabled. -///\param page_size - OUT: The page size used when aggregating tracked writes. -///\exception H5::PropListIException -// Programmer: Dana Robinson - Fall 2016 -//-------------------------------------------------------------------------- -void FileAccPropList::getCoreWriteTracking (hbool_t& is_enabled, size_t& page_size) const -{ - herr_t ret_value = H5Pget_core_write_tracking(id, &is_enabled, &page_size); - if( ret_value < 0 ) - { - throw PropListIException("FileAccPropList::getCoreWriteTracking", "H5Pget_core_write_tracking failed"); - } -} -//-------------------------------------------------------------------------- // Function: FileAccPropList::setFamily ///\brief Sets this file access property list to use the family driver. ///\param memb_size - IN: Size in bytes of each file member diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h index 1020c46..831488c 100644 --- a/c++/src/H5FaccProp.h +++ b/c++/src/H5FaccProp.h @@ -58,12 +58,6 @@ class H5_DLLCPP FileAccPropList : public PropList { // Queries H5FD_CORE driver properties. void getCore (size_t& increment, hbool_t& backing_store) const; - // Sets write tracking for the core driver. - void setCoreWriteTracking (hbool_t is_enabled, size_t page_size) const; - - // Queries the core driver write tracking property. - void getCoreWriteTracking (hbool_t& is_enabled, size_t& page_size) const; - // Sets this file access properties list to the family driver. void setFamily( hsize_t memb_size, const FileAccPropList& memb_plist ) const; diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index f322ff7..0eabfb9 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -565,7 +565,7 @@ static void test_file_attribute() dattr.write(PredType::NATIVE_INT, dattr_data); // Test flushing out the data from the attribute object - dattr.flush(H5F_SCOPE_GLOBAL); + dattr.flush(H5F_SCOPE_GLOBAL); // Get and verify the number of all objects in the file // Current: 1 file, 2 file attr, 1 ds, and 1 ds attr. -- cgit v0.12 From 53099719497a5a5561cabdac96a710f91d0fa21b Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 14 Oct 2016 15:45:38 -0400 Subject: Fixed Windows dsets.c test failure. A 'static' keyword was removed from an array that needs it on Windows during a warning removal overhaul. Replacing it fixes the error. Tested on: 64-bit Windows 7 w/ VS 2015 --- test/dsets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dsets.c b/test/dsets.c index 8aa073f..16c233f 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -7949,7 +7949,7 @@ test_big_chunks_bypass_cache(hid_t fapl) /* Buffers for reading and writing data (1-D) */ int *wdata = NULL, *rdata1 = NULL, *rdata2 = NULL; /* Buffer for reading and writing data (2-D) */ - int t_wdata[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2], t_rdata1[BYPASS_DIM][BYPASS_DIM], + static int t_wdata[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2], t_rdata1[BYPASS_DIM][BYPASS_DIM], t_rdata2[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2]; int i, j; /* Local index variables */ H5F_libver_t low; /* File format low bound */ -- cgit v0.12