From 2c72c20c8738e26e7f72505a410e0303ccb03b0b Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Sun, 30 May 2021 18:50:53 +0200 Subject: [PATCH] smaller tasks --- libsrc/meshing/meshclass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsrc/meshing/meshclass.cpp b/libsrc/meshing/meshclass.cpp index d3ee07eb..c6db8fb7 100644 --- a/libsrc/meshing/meshclass.cpp +++ b/libsrc/meshing/meshclass.cpp @@ -2371,7 +2371,7 @@ namespace netgen */ - size_t numtasks = ngcore::TaskManager::GetNumThreads(); + size_t numtasks = 4*ngcore::TaskManager::GetNumThreads(); Array> thread_openelements(numtasks); ParallelJob ( [&](TaskInfo & ti) @@ -2496,7 +2496,7 @@ namespace netgen thread_openelements[ti.task_nr].Append (tri); } } - }}); + }}, numtasks); for (auto & a : thread_openelements) for (auto & el : a)