* 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 DataSet::check_io_mode() is set to True, then after
+ * query the I/O mode. If DataSet::query_io_mode() is set to True, then after
* every read/write operation the HDF5 deal.ii interface calls the routines
* [H5Pget_mpio_actual_io_mode()](https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetMpioActualIoMode)
* and
* @code
* auto dataset = group.create_dataset<double>("name", dimensions);
* #ifdef DEBUG
- * dataset.check_io_mode(true);
+ * dataset.query_io_mode(true);
* #endif
*
* if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0)
* dataset.write_none<double>();
* }
*
- * if(dataset.check_io_mode()){
+ * if(dataset.query_io_mode()){
* pcout << "IO mode: " << dataset.io_mode<std::string>() << std::endl;
* pcout << "Local no collective cause: "
* << dataset.local_no_collective_cause<std::string>() << std::endl;
global_no_collective_cause();
/**
- * This function retrieves the boolean check_io_mode().
+ * This function retrieves 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 check_io_mode() is set to True, then
+ * operations to query the I/O mode. If query_io_mode() is set to True, then
* after every read/write operation the HDF5 deal.ii interface calls the
* routines
* [H5Pget_mpio_actual_io_mode()](https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetMpioActualIoMode)
* Debug mode because it requires calling additional HDF5 routines.
*/
bool
- check_io_mode() const;
+ query_io_mode() const;
/**
- * This function sets the boolean check_io_mode().
+ * This function sets the boolean query_io_mode().
*/
void
- check_io_mode(bool check_io_mode);
+ query_io_mode(bool query_io_mode);
/**
* This funcion returns the dimensions of the dataset.
std::vector<hsize_t> _dimensions;
std::shared_ptr<hid_t> dataspace;
unsigned int _size;
- bool _check_io_mode;
+ bool _query_io_mode;
H5D_mpio_actual_io_mode_t _io_mode;
uint32_t _local_no_collective_cause;
uint32_t _global_no_collective_cause;
const hid_t & parent_group_id,
const bool mpi)
: HDF5Object(name, mpi)
- , _check_io_mode(false)
+ , _query_io_mode(false)
, _io_mode(H5D_MPIO_NO_COLLECTIVE)
, _local_no_collective_cause(H5D_MPIO_SET_INDEPENDENT)
, _global_no_collective_cause(H5D_MPIO_SET_INDEPENDENT)
: HDF5Object(name, mpi)
, _rank(dimensions.size())
, _dimensions(dimensions)
- , _check_io_mode(false)
+ , _query_io_mode(false)
, _io_mode(H5D_MPIO_NO_COLLECTIVE)
, _local_no_collective_cause(H5D_MPIO_SET_INDEPENDENT)
, _global_no_collective_cause(H5D_MPIO_SET_INDEPENDENT)
if (mpi)
{
- if (_check_io_mode)
+ if (_query_io_mode)
{
ret = H5Pget_mpio_actual_io_mode(plist, &_io_mode);
Assert(ret >= 0, ExcInternalError());
if (mpi)
{
- if (_check_io_mode)
+ if (_query_io_mode)
{
ret = H5Pget_mpio_actual_io_mode(plist, &_io_mode);
Assert(ret >= 0, ExcMessage("Error at H5Pget_mpio_actual_io_mode"));
if (mpi)
{
- if (_check_io_mode)
+ if (_query_io_mode)
{
ret = H5Pget_mpio_actual_io_mode(plist, &_io_mode);
Assert(ret >= 0, ExcMessage("Error at H5Pget_mpio_actual_io_mode"));
if (mpi)
{
- if (_check_io_mode)
+ if (_query_io_mode)
{
ret = H5Pget_mpio_actual_io_mode(plist, &_io_mode);
Assert(ret >= 0, ExcMessage("Error at H5Pget_mpio_actual_io_mode"));
if (mpi)
{
- if (_check_io_mode)
+ if (_query_io_mode)
{
ret = H5Pget_mpio_actual_io_mode(plist, &_io_mode);
Assert(ret >= 0, ExcInternalError());
if (mpi)
{
- if (_check_io_mode)
+ if (_query_io_mode)
{
ret = H5Pget_mpio_actual_io_mode(plist, &_io_mode);
Assert(ret >= 0, ExcMessage("Error at H5Pget_mpio_actual_io_mode"));
if (mpi)
{
- if (_check_io_mode)
+ if (_query_io_mode)
{
ret = H5Pget_mpio_actual_io_mode(plist, &_io_mode);
Assert(ret >= 0, ExcMessage("Error at H5Pget_mpio_actual_io_mode"));
if (mpi)
{
- if (_check_io_mode)
+ if (_query_io_mode)
{
ret = H5Pget_mpio_actual_io_mode(plist, &_io_mode);
Assert(ret >= 0, ExcMessage("Error at H5Pget_mpio_actual_io_mode"));
if (mpi)
{
- if (_check_io_mode)
+ if (_query_io_mode)
{
ret = H5Pget_mpio_actual_io_mode(plist, &_io_mode);
Assert(ret >= 0, ExcInternalError());
H5D_mpio_actual_io_mode_t
DataSet::io_mode()
{
- Assert(_check_io_mode,
+ Assert(_query_io_mode,
ExcMessage(
- "check_io_mode() should be true in order to use io_mode()"));
+ "query_io_mode() should be true in order to use io_mode()"));
return _io_mode;
}
std::string
DataSet::io_mode()
{
- Assert(_check_io_mode,
+ Assert(_query_io_mode,
ExcMessage(
- "check_io_mode() should be true in order to use io_mode()"));
+ "query_io_mode() should be true in order to use io_mode()"));
switch (_io_mode)
{
case (H5D_MPIO_NO_COLLECTIVE):
DataSet::local_no_collective_cause()
{
Assert(
- _check_io_mode,
+ _query_io_mode,
ExcMessage(
- "check_io_mode() should be true in order to use local_no_collective_cause()"));
+ "query_io_mode() should be true in order to use local_no_collective_cause()"));
return _local_no_collective_cause;
}
DataSet::local_no_collective_cause()
{
Assert(
- _check_io_mode,
+ _query_io_mode,
ExcMessage(
- "check_io_mode() should be true in order to use local_no_collective_cause()"));
+ "query_io_mode() should be true in order to use local_no_collective_cause()"));
return internal::no_collective_cause_to_string(_local_no_collective_cause);
}
DataSet::global_no_collective_cause()
{
Assert(
- _check_io_mode,
+ _query_io_mode,
ExcMessage(
- "check_io_mode() should be true in order to use global_no_collective_cause()"));
+ "query_io_mode() should be true in order to use global_no_collective_cause()"));
return _global_no_collective_cause;
}
DataSet::global_no_collective_cause()
{
Assert(
- _check_io_mode,
+ _query_io_mode,
ExcMessage(
- "check_io_mode() should be true in order to use global_no_collective_cause()"));
+ "query_io_mode() should be true in order to use global_no_collective_cause()"));
return internal::no_collective_cause_to_string(_global_no_collective_cause);
}
bool
- DataSet::check_io_mode() const
+ DataSet::query_io_mode() const
{
- return _check_io_mode;
+ return _query_io_mode;
}
void
- DataSet::check_io_mode(bool check_io_mode)
+ DataSet::query_io_mode(bool query_io_mode)
{
- _check_io_mode = check_io_mode;
+ _query_io_mode = query_io_mode;
}
std::vector<hsize_t>
std::string dataset_name("dataset_1");
auto dataset =
group.create_dataset<Number>(dataset_name, dataset_dimensions);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Write): " << dataset.dimensions() << std::endl;
std::string dataset_name("dataset_2");
auto dataset =
group.create_dataset<Number>(dataset_name, dataset_dimensions);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Write): " << dataset.dimensions() << std::endl;
std::string dataset_name("dataset_3");
auto dataset =
group.create_dataset<Number>(dataset_name, dataset_dimensions);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Write): " << dataset.dimensions() << std::endl;
std::string dataset_name("dataset_3");
auto dataset =
group.create_dataset<Number>(dataset_name, dataset_dimensions);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
auto data = initialize_container<Container, float>(dataset_dimensions);
assign_data(data);
if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0)
std::string dataset_name("dataset_4");
auto dataset =
group.create_dataset<Number>(dataset_name, dataset_dimensions);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Write): " << dataset.dimensions() << std::endl;
{
std::string dataset_name("dataset_1");
auto dataset = group.dataset(dataset_name);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Read): " << dataset.dimensions() << std::endl;
{
std::string dataset_name("dataset_2");
auto dataset = group.dataset(dataset_name);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Read): " << dataset.dimensions() << std::endl;
{
std::string dataset_name("dataset_3");
auto dataset = group.dataset(dataset_name);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Read): " << dataset.dimensions() << std::endl;
{
std::string dataset_name("dataset_4");
auto dataset = group.dataset(dataset_name);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Read): " << dataset.dimensions() << std::endl;
std::string dataset_name("dataset_1");
auto dataset =
group.create_dataset<Number>(dataset_name, dataset_dimensions);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Write): " << dataset.dimensions() << std::endl;
std::string dataset_name("dataset_2");
auto dataset =
group.create_dataset<Number>(dataset_name, dataset_dimensions);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Write): " << dataset.dimensions() << std::endl;
std::string dataset_name("dataset_3");
auto dataset =
group.create_dataset<Number>(dataset_name, dataset_dimensions);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Write): " << dataset.dimensions() << std::endl;
std::string dataset_name("dataset_3");
auto dataset =
group.create_dataset<Number>(dataset_name, dataset_dimensions);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
auto data = initialize_container<Container, float>(dataset_dimensions);
assign_data(data);
dataset.write(data);
std::string dataset_name("dataset_4");
auto dataset =
group.create_dataset<Number>(dataset_name, dataset_dimensions);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Write): " << dataset.dimensions() << std::endl;
{
std::string dataset_name("dataset_1");
auto dataset = group.dataset(dataset_name);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Read): " << dataset.dimensions() << std::endl;
{
std::string dataset_name("dataset_2");
auto dataset = group.dataset(dataset_name);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Read): " << dataset.dimensions() << std::endl;
{
std::string dataset_name("dataset_3");
auto dataset = group.dataset(dataset_name);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Read): " << dataset.dimensions() << std::endl;
{
std::string dataset_name("dataset_4");
auto dataset = group.dataset(dataset_name);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Read): " << dataset.dimensions() << std::endl;
{
std::string dataset_name("dataset_5");
auto dataset = group.dataset(dataset_name);
- dataset.check_io_mode(true);
+ dataset.query_io_mode(true);
deallog << "Dimensions " + dataset_name << " " << container_name << "<"
<< type_name << ">"
<< " (Read): " << dataset.dimensions() << std::endl;