]> https://gitweb.dealii.org/ - dealii.git/commitdiff
avoid using multithread_info
authorTimo Heister <timo.heister@gmail.com>
Fri, 13 Feb 2015 17:55:51 +0000 (12:55 -0500)
committerTimo Heister <timo.heister@gmail.com>
Fri, 13 Feb 2015 17:57:24 +0000 (12:57 -0500)
examples/step-17/step-17.cc
examples/step-18/step-18.cc
examples/step-9/step-9.cc
source/base/mpi.cc
source/fe/fe_values.cc
source/lac/petsc_vector_base.cc
source/numerics/data_out.cc

index 6a4f02349f6149ea345baafa76a6805323535abe..d09698d8319d2f43491e9e4665e7c3c2673dd2a4 100644 (file)
@@ -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
index 8bf83b2f660f7c2be553697ba7076efb07d2f8b6..727e9de7aa19ad74fdc4673628def73f55fb5869 100644 (file)
@@ -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
index 76dcaad9e99cc71472b2acc7db8cb6aa1146c4e7..6b8ca0bff9f9e44067428883e87d19c97ed2a70a 100644 (file)
@@ -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
 // <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>
index b9a8a0ce76eb5f34fcbecb652711f0edf57852ba..473b590168365cb2a55d57bea3282d557ed960ca 100644 (file)
@@ -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);
         }
     }
 
index d133464e5efa2b85617851c33cd9394139140ac9..d9bee6e3ab38dcebd3034c066078c6b550933791 100644 (file)
@@ -3283,7 +3283,7 @@ FEValuesBase<dim,spacedim>::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;
index a3ee01e88d5067d3b0d2935edd59ec6238bf2b83..44fe52e1b343177a05102ee8131537d01c89ded6 100644 (file)
@@ -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()."));
   }
index 361e15cd6322d91d7d550c71ffc2d10dc141c8ac..3a12855a0e8e0d33242b4d9181b6a3a2ce3e57ac 100644 (file)
@@ -460,7 +460,7 @@ void DataOut<dim,DH>::build_patches (const Mapping<DH::dimension,DH::space_dimen
                      // 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);
 }
 

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.