]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Disable floating point exceptions in two HDF5 tests. 8148/head
authorDavid Wells <drwells@email.unc.edu>
Mon, 13 May 2019 21:03:37 +0000 (17:03 -0400)
committerDavid Wells <drwells@email.unc.edu>
Mon, 13 May 2019 21:03:37 +0000 (17:03 -0400)
tests/base/hdf5_03.cc
tests/base/hdf5_05.cc

index ef496fc72baf44ee0f3ea91dd7d735671a9fe0ef..604f4d408302a1ec54c6665dae67bd0063e54b33 100644 (file)
@@ -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
index e42b1dde5681c50956fb7320c7d2b2f795e0828c..86635f11a1cc406bd28085ad2c14909066d2d69f 100644 (file)
@@ -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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.