From d6609be8ed27dae2371b902e04649973850acd2a Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Thu, 23 Jul 2015 09:01:26 -0400 Subject: [PATCH] make tests/fe/cell_similariy_11 work without MPI Avoid exception "Calling set_thread_limit() more than once is not supported!". --- tests/fe/cell_similarity_11.cc | 7 +++++-- tests/tests.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) 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 () -- 2.39.5