From: Matthias Maier Date: Tue, 15 Feb 2022 13:35:33 +0000 (-0600) Subject: add a test X-Git-Tag: v9.4.0-rc1~475^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13388%2Fhead;p=dealii.git add a test --- 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