From f63a0cd6333858187ba8fc3ea81dd10e26b1e8d7 Mon Sep 17 00:00:00 2001 From: David Wells Date: Mon, 13 May 2019 17:03:37 -0400 Subject: [PATCH] Disable floating point exceptions in two HDF5 tests. --- tests/base/hdf5_03.cc | 10 ++++++++++ tests/base/hdf5_05.cc | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/tests/base/hdf5_03.cc b/tests/base/hdf5_03.cc index ef496fc72b..604f4d4083 100644 --- a/tests/base/hdf5_03.cc +++ b/tests/base/hdf5_03.cc @@ -754,6 +754,16 @@ read_test(HDF5::Group root_group, int main(int argc, char **argv) { + // tests.h enables floating point exceptions in debug mode, but this test + // generates an (irrelevant) exception when run with more than one MPI + // process so disable them again: +#if defined(DEBUG) && defined(DEAL_II_HAVE_FP_EXCEPTIONS) + { + const int current_fe_except = fegetexcept(); + fedisableexcept(current_fe_except); + } +#endif + initlog(); try diff --git a/tests/base/hdf5_05.cc b/tests/base/hdf5_05.cc index e42b1dde56..86635f11a1 100644 --- a/tests/base/hdf5_05.cc +++ b/tests/base/hdf5_05.cc @@ -1394,6 +1394,16 @@ read_test(HDF5::Group root_group, int main(int argc, char **argv) { + // tests.h enables floating point exceptions in debug mode, but this test + // generates an (irrelevant) exception when run with more than one MPI + // process so disable them again: +#if defined(DEBUG) && defined(DEAL_II_HAVE_FP_EXCEPTIONS) + { + const int current_fe_except = fegetexcept(); + fedisableexcept(current_fe_except); + } +#endif + initlog(); try -- 2.39.5