]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove DeadlockKiller from tests. The rationale is
authorMatthias Maier <tamiko@kyomu.43-1.org>
Wed, 16 Oct 2013 11:45:44 +0000 (11:45 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Wed, 16 Oct 2013 11:45:44 +0000 (11:45 +0000)
 (a) it is no longer necessary with ctest which will take care of killing
     deadlocked tests, too.

 (b) exiting on the main thread without joining the other threads first
     violates current language standard - so a significant rewrite would be
     necessary

git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31254 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/data_out_curved_cells.cc
tests/bits/fe_system.cc
tests/tests.h

index 0ea4b99d791c00b29e2089fd87b8b4da090deb58..cfe6a99c92c7dd12826f47d0f68a745a33391f2b 100644 (file)
@@ -256,14 +256,6 @@ int main ()
   deallog.depth_console(0);
   deallog.threshold_double(1.e-10);
 
-  // this test, for reasons unknown
-  // to me, appears to deadlock at
-  // times. make sure we kill it
-  // after some time
-#ifdef DEAL_II_WITH_THREADS
-  DeadlockKiller killer;
-#endif
-
   curved_grid (logfile);
 }
 
index 5e1db16cfadeb024742b1a1dd9c279e43a2210bd..f871d9a8bb7d50a94e685d6c51c8b5d9068a83b2 100644 (file)
 template<int dim>
 void test()
 {
-#ifdef DEAL_II_WITH_THREADS
-
-  DeadlockKiller killer;
-#endif
-
   // 0 components is not okay
   FESystem<dim> fe(FE_Q<dim>(1), 1, FE_Q<dim>(2), 0);
   Triangulation<dim> tria;
index f94966866e0f6259c393a73b4064eabbdfcabbf4..fadd4b7fc65fd09a348dbcc0f4fa3e687e9be92b 100644 (file)
@@ -301,66 +301,6 @@ struct SetGrainSizes
 }
 set_grain_sizes;
 
-
-
-// spawn a thread that terminates the program after a certain time
-// given by the environment variable WALLTIME. this makes
-// sure we don't let jobs that deadlock on some mutex hang around
-// forever. note that this is orthogonal to using "ulimit" in
-// Makefile.rules, which only affects CPU time and consequently works
-// on infinite loops but not deadlocks
-//
-// the actual sleep time isn't all that important. the point is that
-// we need to kill deadlocked threads at one point, whenever that is
-#ifdef DEAL_II_WITH_THREADS
-
-struct DeadlockKiller
-{
-private:
-  static void nuke_it ()
-  {
-    char *env = std::getenv("WALLTIME");
-
-    if (env != 0)
-      {
-        std::istringstream conv (env);
-        int delay;
-        conv >> delay;
-        if (conv)
-          {
-            sleep (delay);
-            std::cerr << "Time's up: Killing job after "
-                      << delay
-                      << " seconds because it overran its allowed walltime."
-                      << std::endl;
-            std::abort ();
-          }
-        else
-          {
-            std::cerr << "Invalid value for WALLTIME environment variable."
-                      << std::endl;
-            std::abort ();
-          }
-      }
-    else
-      // environment variable is not set, so assume infinite wait time
-      // and simply quit this thread
-      {
-      }
-  }
-
-public:
-  DeadlockKiller ()
-  {
-    dealii::Threads::new_thread (&nuke_it);
-  }
-};
-
-#endif
-
 DEAL_II_NAMESPACE_CLOSE
 
-
-
-
 #endif // __tests_tests_h

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.