From: Martin Kronbichler Date: Thu, 18 Sep 2014 08:29:00 +0000 (+0200) Subject: Fix compilation of #146 without MPI X-Git-Tag: v8.2.0-rc1~142^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20954936fcb1319cc0802a0402daf994d3ce92aa;p=dealii.git Fix compilation of #146 without MPI --- diff --git a/source/base/mpi.cc b/source/base/mpi.cc index 4d87cd9da7..3ed5cd3f85 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -331,6 +331,7 @@ namespace Utilities else // user wants automatic choice { +#ifdef DEAL_II_WITH_MPI // we need to figure out how many MPI processes there // are on the current node, as well as how many CPU cores // we have. for the first task, check what get_hostname() @@ -381,6 +382,9 @@ namespace Utilities : 0), 1U); +#else + const unsigned int n_threads = multithread_info.n_cpus; +#endif // finally set this number of threads multithread_info.set_thread_limit(n_threads);