17#ifdef DEAL_II_WITH_HDF5
31 namespace HDF5ObjectImplementation
40# ifdef DEAL_II_WITH_MPI
41# if __cpp_lib_uncaught_exceptions >= 201411
43 if (std::uncaught_exceptions() != 0)
45 if (std::uncaught_exception() ==
true)
49 <<
"---------------------------------------------------------\n"
50 <<
"HDF5 " + type +
" objects call " + name +
52 <<
"them and release any resources they acquired. This call\n"
53 <<
"requires MPI synchronization. Since an exception is\n"
54 <<
"currently uncaught, this synchronization would likely\n"
55 <<
"deadlock because only the current process is trying to\n"
56 <<
"destroy the object. As a consequence, the program will be\n"
57 <<
"aborted and the HDF5 might be corrupted.\n"
58 <<
"---------------------------------------------------------"
92 , query_io_mode(
false)
97 hdf5_reference = std::shared_ptr<hid_t>(
new hid_t, [](hid_t *pointer) {
106 dataspace = std::shared_ptr<hid_t>(
new hid_t, [](hid_t *pointer) {
145 const std::vector<hsize_t> &dimensions,
146 const std::shared_ptr<hid_t> &
t_type,
149 , rank(dimensions.size())
150 , dimensions(dimensions)
151 , query_io_mode(
false)
156 hdf5_reference = std::shared_ptr<hid_t>(
new hid_t, [](hid_t *pointer) {
165 dataspace = std::shared_ptr<hid_t>(
new hid_t, [](hid_t *pointer) {
216 ExcMessage(
"query_io_mode should be true in order to use io_mode"));
220 return std::string(
"H5D_MPIO_NO_COLLECTIVE");
223 return std::string(
"H5D_MPIO_CHUNK_INDEPENDENT");
226 return std::string(
"H5D_MPIO_CHUNK_COLLECTIVE");
229 return std::string(
"H5D_MPIO_CHUNK_MIXED");
232 return std::string(
"H5D_MPIO_CONTIGUOUS_COLLECTIVE");
236 return std::string(
"Internal error");
241 return std::string(
"Internal error");
246 H5D_mpio_actual_io_mode_t
251 "query_io_mode should be true in order to use get_io_mode"));
263 "query_io_mode should be true in order to use get_local_no_collective_cause()"));
275 "query_io_mode should be true in order to use get_local_no_collective_cause()"));
287 "query_io_mode should be true in order to use get_global_no_collective_cause()"));
299 "query_io_mode should be true in order to use get_global_no_collective_cause()"));
334 hdf5_reference = std::shared_ptr<hid_t>(
new hid_t, [](hid_t *pointer) {
412 :
File(name, mode,
true, mpi_communicator)
423 hdf5_reference = std::shared_ptr<hid_t>(
new hid_t, [](hid_t *pointer) {
437# ifdef DEAL_II_WITH_MPI
438# ifdef H5_HAVE_PARALLEL
481 (void)mpi_communicator;
unsigned int get_rank() const
std::vector< hsize_t > get_dimensions() const
std::vector< hsize_t > dimensions
std::uint32_t get_local_no_collective_cause_as_hdf5_type()
unsigned int get_size() const
std::shared_ptr< hid_t > dataspace
DataSet(const std::string &name, const hid_t &parent_group_id, bool mpi)
std::string get_local_no_collective_cause()
std::string get_io_mode()
std::uint32_t local_no_collective_cause
std::string get_global_no_collective_cause()
bool get_query_io_mode() const
std::uint32_t global_no_collective_cause
std::uint32_t get_global_no_collective_cause_as_hdf5_type()
H5D_mpio_actual_io_mode_t get_io_mode_as_hdf5_type()
void set_query_io_mode(const bool new_query_io_mode)
H5D_mpio_actual_io_mode_t io_mode
File(const std::string &name, const FileAccessMode mode)
DataSet open_dataset(const std::string &name) const
Group open_group(const std::string &name) const
Group(const std::string &name, const Group &parent_group, const bool mpi, const GroupAccessMode mode)
Group create_group(const std::string &name) const
std::shared_ptr< hid_t > hdf5_reference
std::string get_name() const
HDF5Object(const std::string &name, const bool mpi)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertNothrow(cond, exc)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
#define DEAL_II_ASSERT_UNREACHABLE()
void check_exception(const std::string &type, const std::string &name)
std::string no_collective_cause_to_string(const std::uint32_t no_collective_cause)