From 2f8b4880d14d4ca9bea3302e97427c692bbcce1d Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 15 Feb 2022 07:35:33 -0600 Subject: [PATCH] add a test --- tests/a-framework/concurrent_threads.cc | 28 +++++++++++++++++++ .../concurrent_threads.threads=2.output | 1 + .../concurrent_threads.threads=4.output | 1 + 3 files changed, 30 insertions(+) create mode 100644 tests/a-framework/concurrent_threads.cc create mode 100644 tests/a-framework/concurrent_threads.threads=2.output create mode 100644 tests/a-framework/concurrent_threads.threads=4.output diff --git a/tests/a-framework/concurrent_threads.cc b/tests/a-framework/concurrent_threads.cc new file mode 100644 index 0000000000..de0733a830 --- /dev/null +++ b/tests/a-framework/concurrent_threads.cc @@ -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 index 0000000000..810e96794b --- /dev/null +++ b/tests/a-framework/concurrent_threads.threads=2.output @@ -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 index 0000000000..0639ba61e9 --- /dev/null +++ b/tests/a-framework/concurrent_threads.threads=4.output @@ -0,0 +1 @@ +Number of threads 4 -- 2.39.5