From 0bc0c91d17e8c47533ccd70295c1a908c5f55904 Mon Sep 17 00:00:00 2001 From: Daniel Garcia-Sanchez Date: Thu, 29 Nov 2018 16:58:00 +0100 Subject: [PATCH] Reorder functions get/set_query_io_mode() --- include/deal.II/base/hdf5.h | 51 ++++++++++++++++++------------------- source/base/hdf5.cc | 32 +++++++++++------------ 2 files changed, 41 insertions(+), 42 deletions(-) diff --git a/include/deal.II/base/hdf5.h b/include/deal.II/base/hdf5.h index 5af0178366..fd33c7d762 100644 --- a/include/deal.II/base/hdf5.h +++ b/include/deal.II/base/hdf5.h @@ -709,6 +709,31 @@ namespace HDF5 void write_none(); + /** + * This function returns the boolean query_io_mode. + * + * In cases where maximum performance has to be achieved, it is important to + * make sure that all MPI read/write operations are collective. The HDF5 + * library provides API routines that can be used after the read/write I/O + * operations to query the I/O mode. If query_io_mode is set to true, then + * after every read/write operation the deal.II's HDF5 interface calls the + * routines + * [H5Pget_mpio_actual_io_mode()](https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetMpioActualIoMode) + * and + * [H5Pget_mpio_no_collective_cause()](https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetMpioNoCollectiveCause). + * The results are stored in io_mode, local_no_collective_cause and + * global_no_collective_cause. We suggest to query the I/O mode only in + * Debug mode because it requires calling additional HDF5 routines. + */ + bool + get_query_io_mode() const; + + /** + * This function sets the boolean query_io_mode. + */ + void + set_query_io_mode(const bool new_query_io_mode); + /** * This function returns the I/O mode that was used on the last * parallel I/O call. See + DataSet::get_dimensions() const + { + return dimensions; + } + + + std::string DataSet::get_io_mode() { @@ -1232,22 +1248,6 @@ namespace HDF5 - void - DataSet::set_query_io_mode(const bool new_query_io_mode) - { - query_io_mode = new_query_io_mode; - } - - - - std::vector - DataSet::get_dimensions() const - { - return dimensions; - } - - - unsigned int DataSet::get_size() const { -- 2.39.5