]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Disable floating point exceptions in some scalapack tests. 8027/head
authorDavid Wells <drwells@email.unc.edu>
Tue, 7 May 2019 13:55:48 +0000 (09:55 -0400)
committerDavid Wells <drwells@email.unc.edu>
Tue, 7 May 2019 13:55:48 +0000 (09:55 -0400)
Since these tests only verify that we can save and load scalapack matrices
correctly the floating point exceptions are not relevant.

tests/scalapack/scalapack_10.cc
tests/scalapack/scalapack_10_a.cc
tests/scalapack/scalapack_10_b.cc
tests/scalapack/scalapack_10_c.cc
tests/scalapack/scalapack_10_d.cc

index b1c5b4ee1dbdf0f3b820ff791da385b0811ac673..bb396da8d97eafaf425f3e9c5ec91ddb1d7d0f52 100644 (file)
@@ -81,6 +81,16 @@ test(const unsigned int size, const unsigned int block_size)
 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
+
   Utilities::MPI::MPI_InitFinalize mpi_initialization(
     argc, argv, numbers::invalid_unsigned_int);
 
index 03d7aa5101e4cf2723185ae9ea59b55a5357c981..ebf3ba41ecf30ef4282a8eba167e2e71f61159bb 100644 (file)
@@ -103,6 +103,16 @@ test(const unsigned int size, const unsigned int block_size)
 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
+
   Utilities::MPI::MPI_InitFinalize mpi_initialization(
     argc, argv, numbers::invalid_unsigned_int);
 
index 48e064e6b019dadd3ffae685d1dc8c798f560a71..805a09ba00cbc27a3b278f19a259936dd8831617 100644 (file)
@@ -79,6 +79,16 @@ test(const std::pair<unsigned int, unsigned int> &size,
 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
+
   Utilities::MPI::MPI_InitFinalize mpi_initialization(
     argc, argv, numbers::invalid_unsigned_int);
 
index a8060a7de991944bcadfe07a74efab0c099e594a..0382cb302969a267f36c6bedd7ed49578497575a 100644 (file)
@@ -140,6 +140,16 @@ test()
 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
+
   Utilities::MPI::MPI_InitFinalize mpi_initialization(
     argc, argv, numbers::invalid_unsigned_int);
 
index 79722256223dcd863d2991c4be9a0d7f334e09ec..aa63604cf1f50e3dd868301644a3d57e494cb568 100644 (file)
@@ -87,6 +87,16 @@ test(const unsigned int size, const unsigned int block_size)
 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
+
   Utilities::MPI::MPI_InitFinalize mpi_initialization(
     argc, argv, numbers::invalid_unsigned_int);
 

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.