From: David Wells Date: Tue, 7 May 2019 13:55:48 +0000 (-0400) Subject: Disable floating point exceptions in some scalapack tests. X-Git-Tag: v9.1.0-rc1~110^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8027%2Fhead;p=dealii.git Disable floating point exceptions in some scalapack tests. Since these tests only verify that we can save and load scalapack matrices correctly the floating point exceptions are not relevant. --- diff --git a/tests/scalapack/scalapack_10.cc b/tests/scalapack/scalapack_10.cc index b1c5b4ee1d..bb396da8d9 100644 --- a/tests/scalapack/scalapack_10.cc +++ b/tests/scalapack/scalapack_10.cc @@ -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); diff --git a/tests/scalapack/scalapack_10_a.cc b/tests/scalapack/scalapack_10_a.cc index 03d7aa5101..ebf3ba41ec 100644 --- a/tests/scalapack/scalapack_10_a.cc +++ b/tests/scalapack/scalapack_10_a.cc @@ -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); diff --git a/tests/scalapack/scalapack_10_b.cc b/tests/scalapack/scalapack_10_b.cc index 48e064e6b0..805a09ba00 100644 --- a/tests/scalapack/scalapack_10_b.cc +++ b/tests/scalapack/scalapack_10_b.cc @@ -79,6 +79,16 @@ test(const std::pair &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); diff --git a/tests/scalapack/scalapack_10_c.cc b/tests/scalapack/scalapack_10_c.cc index a8060a7de9..0382cb3029 100644 --- a/tests/scalapack/scalapack_10_c.cc +++ b/tests/scalapack/scalapack_10_c.cc @@ -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); diff --git a/tests/scalapack/scalapack_10_d.cc b/tests/scalapack/scalapack_10_d.cc index 7972225622..aa63604cf1 100644 --- a/tests/scalapack/scalapack_10_d.cc +++ b/tests/scalapack/scalapack_10_d.cc @@ -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);