From: Timo Heister Date: Thu, 23 Jul 2015 13:01:26 +0000 (-0400) Subject: make tests/fe/cell_similariy_11 work without MPI X-Git-Tag: v8.4.0-rc2~731^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6609be8ed27dae2371b902e04649973850acd2a;p=dealii.git make tests/fe/cell_similariy_11 work without MPI Avoid exception "Calling set_thread_limit() more than once is not supported!". --- diff --git a/tests/fe/cell_similarity_11.cc b/tests/fe/cell_similarity_11.cc index 151e69f079..06a05cb2db 100644 --- a/tests/fe/cell_similarity_11.cc +++ b/tests/fe/cell_similarity_11.cc @@ -23,9 +23,12 @@ // a MappingQ to switch between a Q1 while passing through the mesh // // this tests outputs the Jacobian of the transformation and the derivatives -// in real space in two locations inside the cell. to make sure the cell -// similarity code is used, only run the program with one thread +// in real space in two locations inside the cell. +// To make sure the cell similarity code is used, only run the program with +// one thread. For this we need to disable LimitConcurreny in ../tests.h and +// then set the number of threads to 1 (in main() below): +#define DEAL_II_TEST_DO_NOT_SET_THREAD_LIMIT #include "../tests.h" #include diff --git a/tests/tests.h b/tests/tests.h index 86b8a47be8..7661a9554e 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -196,7 +196,7 @@ std::string unify_pretty_function (const std::string &text) * calls MPI_InitFinalize itself, we can't adjust the thread count * for this here. */ -#ifndef DEAL_II_WITH_MPI +#if !defined(DEAL_II_WITH_MPI) && !defined(DEAL_II_TEST_DO_NOT_SET_THREAD_LIMIT) struct LimitConcurrency { LimitConcurrency ()