]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Disable multithreading path when not using more than one thread.
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 24 Nov 2013 14:22:10 +0000 (14:22 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 24 Nov 2013 14:22:10 +0000 (14:22 +0000)
git-svn-id: https://svn.dealii.org/trunk@31784 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/matrix_free/matrix_free.templates.h

index 4e3d3c463a80a32d1a95cab03a29133186afd85a..0a4fa866e7fd3d19e381569e9d954d25307a7e88 100644 (file)
@@ -263,7 +263,8 @@ internal_reinit(const Mapping<dim>                            &mapping,
       // initialize the basic multithreading information that needs to be
       // passed to the DoFInfo structure
 #ifdef DEAL_II_WITH_THREADS
-      if (additional_data.tasks_parallel_scheme != AdditionalData::none)
+      if (additional_data.tasks_parallel_scheme != AdditionalData::none &&
+          multithread_info.n_threads() > 1)
         {
           task_info.use_multithreading = true;
           task_info.block_size = additional_data.tasks_block_size;

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.