]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix compilation of #146 without MPI 159/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 18 Sep 2014 08:29:00 +0000 (10:29 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 18 Sep 2014 08:29:00 +0000 (10:29 +0200)
source/base/mpi.cc

index 4d87cd9da7f0e34ce90cd246dcad767b644d2856..3ed5cd3f857b450b73c1cb200953b4bc29355aa9 100644 (file)
@@ -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);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.