]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove a non-functional test. 16933/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 28 Apr 2024 13:02:30 +0000 (18:32 +0530)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 28 Apr 2024 13:02:30 +0000 (18:32 +0530)
tests/multithreading/task_11.cc [deleted file]

diff --git a/tests/multithreading/task_11.cc b/tests/multithreading/task_11.cc
deleted file mode 100644 (file)
index 8033b85..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-// ------------------------------------------------------------------------
-//
-// SPDX-License-Identifier: LGPL-2.1-or-later
-// Copyright (C) 2015 - 2020 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// Part of the source code is dual licensed under Apache-2.0 WITH
-// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
-// governing the source code and code contributions can be found in
-// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
-//
-// ------------------------------------------------------------------------
-
-// test calling MultithreadInfo::set_thread_limit() multiple times and the
-// effect for running tasks
-
-#include <deal.II/base/thread_management.h>
-
-#include "../tests.h"
-
-Threads::Mutex mutex;
-unsigned int   n_running;
-unsigned int   n_max_running;
-
-void
-a_task()
-{
-  mutex.lock();
-  n_running++;
-  n_max_running = std::max(n_max_running, n_running);
-  mutex.unlock();
-
-  // Sleep some time to make sure all other concurrently running tasks enter
-  // here.
-  std::this_thread::sleep_for(std::chrono::seconds(1));
-
-  mutex.lock();
-  n_running--;
-  mutex.unlock();
-}
-
-
-void
-test()
-{
-  Threads::TaskGroup<> tg;
-
-  n_running     = 0;
-  n_max_running = 0;
-
-  // force all tasks to wait until we are done starting
-  mutex.lock();
-
-  for (unsigned int t = 0; t < 10; ++t)
-    tg += Threads::new_task(a_task);
-
-  // now let the tasks run
-  mutex.unlock();
-
-  tg.join_all();
-}
-
-
-int
-main()
-{
-  initlog();
-
-  const unsigned int n = testing_max_num_threads();
-
-  // if we have a machine with less than 5 cores fake the output:
-  if (MultithreadInfo::n_threads() < n)
-    {
-      // you should buy more cores, seriously.
-      deallog << "* default thread limit for tests: " << n << std::endl;
-      deallog << "max concurrent running: " << n << " should be: " << n
-              << std::endl;
-    }
-  else if (MultithreadInfo::n_threads() == n)
-    {
-      deallog << "* default thread limit for tests: "
-              << MultithreadInfo::n_threads() << std::endl;
-      test();
-    }
-  else
-    Assert(false,
-           ExcInternalError(
-             "did somebody mess with LimitConcurrency in tests.h?"));
-
-  deallog << "* now with thread limit 1:" << std::endl;
-  MultithreadInfo::set_thread_limit(1);
-  test();
-  deallog << "* now with thread limit 2:" << std::endl;
-  MultithreadInfo::set_thread_limit(2);
-  test();
-
-  deallog << "OK" << std::endl;
-}

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.