From: Timo Heister Date: Fri, 13 Feb 2015 17:55:51 +0000 (-0500) Subject: avoid using multithread_info X-Git-Tag: v8.3.0-rc1~462^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fb42cf736d02999e3f0fa9658f0a4a6b88e29a6;p=dealii.git avoid using multithread_info --- diff --git a/examples/step-17/step-17.cc b/examples/step-17/step-17.cc index 6a4f02349f..d09698d831 100644 --- a/examples/step-17/step-17.cc +++ b/examples/step-17/step-17.cc @@ -780,7 +780,7 @@ namespace Step17 local_error_per_cell, ComponentMask(), 0, - multithread_info.n_threads(), + MultithreadInfo::n_threads(), this_mpi_process); // Now all processes have computed error indicators for their own cells diff --git a/examples/step-18/step-18.cc b/examples/step-18/step-18.cc index 8bf83b2f66..727e9de7aa 100644 --- a/examples/step-18/step-18.cc +++ b/examples/step-18/step-18.cc @@ -1647,7 +1647,7 @@ namespace Step18 error_per_cell, ComponentMask(), 0, - multithread_info.n_threads(), + MultithreadInfo::n_threads(), this_mpi_process); // Then set up a global vector into which we merge the local indicators diff --git a/examples/step-9/step-9.cc b/examples/step-9/step-9.cc index 76dcaad9e9..6b8ca0bff9 100644 --- a/examples/step-9/step-9.cc +++ b/examples/step-9/step-9.cc @@ -48,8 +48,7 @@ // programs. In the first one, the classes and functions are declared which we // need to do assembly in parallel (i.e. the // WorkStream namespace). The -// second file has a class MultithreadInfo (and a global object -// multithread_info of that type) which can be used to query the +// second file has a class MultithreadInfo which can be used to query the // number of processors in your system, which is often useful when deciding // how many threads to start in parallel. #include diff --git a/source/base/mpi.cc b/source/base/mpi.cc index b9a8a0ce76..473b590168 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -389,7 +389,7 @@ namespace Utilities // set maximum number of threads (also respecting the environment // variable that the called function evaluates) based on what // the user asked - multithread_info.set_thread_limit(max_num_threads); + MultithreadInfo::set_thread_limit(max_num_threads); } else // user wants automatic choice @@ -437,20 +437,20 @@ namespace Utilities // if the number would be zero, round up to one since every // process needs to have at least one thread const unsigned int n_threads - = std::max(multithread_info.n_cpus / n_local_processes + = std::max(MultithreadInfo::n_cpus / n_local_processes + - (nth_process_on_host <= multithread_info.n_cpus % n_local_processes + (nth_process_on_host <= MultithreadInfo::n_cpus % n_local_processes ? 1 : 0), 1U); #else - const unsigned int n_threads = multithread_info.n_cpus; + const unsigned int n_threads = MultithreadInfo::n_cpus; #endif // finally set this number of threads - multithread_info.set_thread_limit(n_threads); + MultithreadInfo::set_thread_limit(n_threads); } } diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index d133464e5e..d9bee6e3ab 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -3283,7 +3283,7 @@ FEValuesBase::check_cell_similarity // // TODO: Is it reasonable to introduce a flag "unsafe" in the constructor of // FEValues to re-enable this feature? - if (multithread_info.n_threads() > 1) + if (MultithreadInfo::n_threads() > 1) { cell_similarity = CellSimilarity::none; return; diff --git a/source/lac/petsc_vector_base.cc b/source/lac/petsc_vector_base.cc index a3ee01e88d..44fe52e1b3 100644 --- a/source/lac/petsc_vector_base.cc +++ b/source/lac/petsc_vector_base.cc @@ -152,7 +152,7 @@ namespace PETScWrappers last_action (::dealii::VectorOperation::unknown), attained_ownership(true) { - Assert( multithread_info.is_running_single_threaded(), + Assert( MultithreadInfo::is_running_single_threaded(), ExcMessage("PETSc does not support multi-threaded access, set " "the thread limit to 1 in MPI_InitFinalize().")); } @@ -167,7 +167,7 @@ namespace PETScWrappers last_action (::dealii::VectorOperation::unknown), attained_ownership(true) { - Assert( multithread_info.is_running_single_threaded(), + Assert( MultithreadInfo::is_running_single_threaded(), ExcMessage("PETSc does not support multi-threaded access, set " "the thread limit to 1 in MPI_InitFinalize().")); @@ -188,7 +188,7 @@ namespace PETScWrappers last_action (::dealii::VectorOperation::unknown), attained_ownership(false) { - Assert( multithread_info.is_running_single_threaded(), + Assert( MultithreadInfo::is_running_single_threaded(), ExcMessage("PETSc does not support multi-threaded access, set " "the thread limit to 1 in MPI_InitFinalize().")); } diff --git a/source/numerics/data_out.cc b/source/numerics/data_out.cc index 361e15cd63..3a12855a0e 100644 --- a/source/numerics/data_out.cc +++ b/source/numerics/data_out.cc @@ -460,7 +460,7 @@ void DataOut::build_patches (const Mapping