]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add a test 13388/head
authorMatthias Maier <tamiko@43-1.org>
Tue, 15 Feb 2022 13:35:33 +0000 (07:35 -0600)
committerMatthias Maier <tamiko@43-1.org>
Tue, 15 Feb 2022 15:28:34 +0000 (09:28 -0600)
tests/a-framework/concurrent_threads.cc [new file with mode: 0644]
tests/a-framework/concurrent_threads.threads=2.output [new file with mode: 0644]
tests/a-framework/concurrent_threads.threads=4.output [new file with mode: 0644]

diff --git a/tests/a-framework/concurrent_threads.cc b/tests/a-framework/concurrent_threads.cc
new file mode 100644 (file)
index 0000000..de0733a
--- /dev/null
@@ -0,0 +1,28 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2003 - 2018 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+// test the testsuite framework.
+
+// Verify that the "threads=N" test annotation actually works.
+
+#include "../tests.h"
+
+int
+main()
+{
+  std::cout << "Number of threads " << dealii::MultithreadInfo::n_threads()
+            << std::endl;
+  return 0;
+}
diff --git a/tests/a-framework/concurrent_threads.threads=2.output b/tests/a-framework/concurrent_threads.threads=2.output
new file mode 100644 (file)
index 0000000..810e967
--- /dev/null
@@ -0,0 +1 @@
+Number of threads 2
diff --git a/tests/a-framework/concurrent_threads.threads=4.output b/tests/a-framework/concurrent_threads.threads=4.output
new file mode 100644 (file)
index 0000000..0639ba6
--- /dev/null
@@ -0,0 +1 @@
+Number of threads 4

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.