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
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
// programs. In the first one, the classes and functions are declared which we
// need to do assembly in parallel (i.e. the
// <code>WorkStream</code> namespace). The
-// second file has a class <code>MultithreadInfo</code> (and a global object
-// <code>multithread_info</code> of that type) which can be used to query the
+// second file has a class <code>MultithreadInfo</code> 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 <deal.II/base/work_stream.h>
// 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
// 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);
}
}
//
// 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;
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()."));
}
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()."));
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()."));
}
// about 10% improvement) and the items in flight at any
// given time (another 5% on the testcase discussed in
// @ref workstream_paper, on 32 cores) and if
- 8*multithread_info.n_threads(),
+ 8*MultithreadInfo::n_threads(),
64);
}