Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message. #14246

Merged
merged 2 commits into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions include/deal.II/base/exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,15 @@ namespace StandardExceptions
"if deal.II was configured to use LAPACK, but cmake did not "
"find a valid LAPACK library.");

/**
* This function requires support for the HDF5 library.
*/
DeclExceptionMsg(
ExcNeedsHDF5,
"You are attempting to use functionality that requires that deal.II is configured "
"with HDF5 support. However, when you called 'cmake', HDF5 support "
"was not detected.");

/**
* This function requires support for the MPI library.
*/
Expand Down
2 changes: 1 addition & 1 deletion source/base/data_out_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8825,7 +8825,7 @@ DataOutBase::write_hdf5_parallel(
(void)mesh_filename;
(void)solution_filename;
(void)comm;
AssertThrow(false, ExcMessage("HDF5 support is disabled."));
AssertThrow(false, ExcNeedsHDF5());
#else

const unsigned int n_ranks = Utilities::MPI::n_mpi_processes(comm);
Expand Down
4 changes: 2 additions & 2 deletions source/lac/scalapack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2611,7 +2611,7 @@ ScaLAPACKMatrix<NumberType>::save(
# ifndef DEAL_II_WITH_HDF5
(void)filename;
(void)chunk_size;
AssertThrow(false, ExcMessage("HDF5 support is disabled."));
AssertThrow(false, ExcNeedsHDF5());
# else

std::pair<unsigned int, unsigned int> chunks_size_ = chunk_size;
Expand Down Expand Up @@ -3043,7 +3043,7 @@ ScaLAPACKMatrix<NumberType>::load(const std::string &filename)
{
# ifndef DEAL_II_WITH_HDF5
(void)filename;
AssertThrow(false, ExcMessage("HDF5 support is disabled."));
AssertThrow(false, ExcNeedsHDF5());
# else
# ifdef H5_HAVE_PARALLEL
// implementation for configurations equipped with a parallel file system
Expand Down