]> https://gitweb.dealii.org/ - dealii.git/commitdiff
MatrixCreator: use queue_size=1 in debug mode 17137/head
authorTimo Heister <timo.heister@gmail.com>
Tue, 18 Jun 2024 22:09:24 +0000 (18:09 -0400)
committerTimo Heister <timo.heister@gmail.com>
Tue, 18 Jun 2024 22:27:47 +0000 (18:27 -0400)
include/deal.II/numerics/matrix_creator.templates.h

index 5a67ba86a82a55c2a388636a27e5722d4ec54850..494922bfba4cfaa2c15411aeca8e6593677f0ec0 100644 (file)
@@ -781,7 +781,14 @@ namespace MatrixCreator
                                                       &rhs_vector);
       },
       assembler_data,
-      copy_data);
+      copy_data
+#ifdef DEBUG
+      // use chunk_size = 1 to make multithreading bugs/races more likely:
+      ,
+      /* queue_length (default) = */ 2 * MultithreadInfo::n_threads(),
+      /* chunk_size = */ 1
+#endif
+    );
 
     matrix.compress(VectorOperation::add);
   }

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.