diff --git a/Src/Core/FFmmAlgorithmThread.hpp b/Src/Core/FFmmAlgorithmThread.hpp index 506ff65442866dbc61ad5bdba2b31d8b0894422a..ac1a69caf8bdcdf6dc46c7fd9532f49e1a83902b 100644 --- a/Src/Core/FFmmAlgorithmThread.hpp +++ b/Src/Core/FFmmAlgorithmThread.hpp @@ -358,7 +358,7 @@ public: for(int idxShape = 0 ; idxShape < SizeShape ; ++idxShape){ const int endAtThisShape = this->shapeLeaf[idxShape] + previous; - #pragma omp for + #pragma omp for schedule(dynamic) for(int idxLeafs = previous ; idxLeafs < endAtThisShape ; ++idxLeafs){ LeafData& currentIter = leafsDataArray[idxLeafs]; myThreadkernels.L2P(currentIter.cell, currentIter.targets); diff --git a/Src/Core/FFmmAlgorithmThreadProc.hpp b/Src/Core/FFmmAlgorithmThreadProc.hpp index 9db4ca8e5321cc476f550fd3a601f3eccb328ae2..3b6e5d6bca49d7a9d7463e7d57f3162cbbc6f11f 100644 --- a/Src/Core/FFmmAlgorithmThreadProc.hpp +++ b/Src/Core/FFmmAlgorithmThreadProc.hpp @@ -876,7 +876,7 @@ public: for(int idxShape = 0 ; idxShape < SizeShape ; ++idxShape){ const int leafAtThisShape = shapeLeaf[idxShape]; - #pragma omp for + #pragma omp for schedule(dynamic) for(int idxLeafs = startIdx ; idxLeafs < leafAtThisShape ; ++idxLeafs){ OctreeIterator currentIter = shapeArray[idxShape][idxLeafs]; myThreadkernels->L2P(currentIter.getCurrentCell(), currentIter.getCurrentListTargets());