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 1 commit
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
6 changes: 5 additions & 1 deletion source/base/data_out_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8825,7 +8825,11 @@ DataOutBase::write_hdf5_parallel(
(void)mesh_filename;
(void)solution_filename;
(void)comm;
AssertThrow(false, ExcMessage("HDF5 support is disabled."));
AssertThrow(false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to do it like this:

DeclExceptionMsg(
ExcNeedsLAPACK,
"You are attempting to use functionality that is only available "
"if deal.II was configured to use LAPACK, but cmake did not "
"find a valid LAPACK library.");
?

ExcMessage(
"This function requires that deal.II is configured "
"with HDF5 support, but when you called 'cmake', HDF5 support "
"was not detected."));
#else

const unsigned int n_ranks = Utilities::MPI::n_mpi_processes(comm);
Expand Down
12 changes: 10 additions & 2 deletions source/lac/scalapack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2611,7 +2611,11 @@ ScaLAPACKMatrix<NumberType>::save(
# ifndef DEAL_II_WITH_HDF5
(void)filename;
(void)chunk_size;
AssertThrow(false, ExcMessage("HDF5 support is disabled."));
AssertThrow(false,
ExcMessage(
"This function requires that deal.II is configured "
"with HDF5 support, but when you called 'cmake', HDF5 support "
"was not detected."));
# else

std::pair<unsigned int, unsigned int> chunks_size_ = chunk_size;
Expand Down Expand Up @@ -3043,7 +3047,11 @@ ScaLAPACKMatrix<NumberType>::load(const std::string &filename)
{
# ifndef DEAL_II_WITH_HDF5
(void)filename;
AssertThrow(false, ExcMessage("HDF5 support is disabled."));
AssertThrow(false,
ExcMessage(
"This function requires that deal.II is configured "
"with HDF5 support, but when you called 'cmake', HDF5 support "
"was not detected."));
# else
# ifdef H5_HAVE_PARALLEL
// implementation for configurations equipped with a parallel file system
Expand Down