From 1c600ab117350947fb074476158d67a4af090dae Mon Sep 17 00:00:00 2001
From: Berenger Bramas <Berenger.Bramas@inria.fr>
Date: Sat, 15 Aug 2015 19:13:54 +0200
Subject: [PATCH] make the level private in the task fmm

---
 Src/Core/FFmmAlgorithmTask.hpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Src/Core/FFmmAlgorithmTask.hpp b/Src/Core/FFmmAlgorithmTask.hpp
index a0325da5f..88b11dbd8 100644
--- a/Src/Core/FFmmAlgorithmTask.hpp
+++ b/Src/Core/FFmmAlgorithmTask.hpp
@@ -185,7 +185,7 @@ protected:
 					do{
 						// We need the current cell and the child
 						// child is an array (of 8 child) that may be null
-#pragma omp task firstprivate(octreeIterator) shared(idxLevel)
+#pragma omp task firstprivate(octreeIterator,idxLevel)
 						{
 							kernels[omp_get_thread_num()]->M2M( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), idxLevel);
 						}
@@ -243,7 +243,7 @@ protected:
                     const int separationCriteria = (idxLevel != FAbstractAlgorithm::lowerWorkingLevel-1 ? 1 : leafLevelSeparationCriteria);
 					// for each cell we apply the M2L with all cells in the implicit interaction list
 					do{
-#pragma omp task firstprivate(octreeIterator) shared(idxLevel)
+#pragma omp task firstprivate(octreeIterator,idxLevel)
 						{
                             const CellClass* neighbors[343];
 							const int counter = tree->getInteractionNeighbors(neighbors, octreeIterator.getCurrentGlobalCoordinate(), idxLevel, separationCriteria);
@@ -290,7 +290,7 @@ protected:
                     const int separationCriteria = (idxLevel != FAbstractAlgorithm::lowerWorkingLevel-1 ? 1 : leafLevelSeparationCriteria);
 					// for each cells
 					do{
-                        #pragma omp task default(none) firstprivate(octreeIterator,separationCriteria) shared(idxLevel)
+                        #pragma omp task default(none) firstprivate(octreeIterator,separationCriteria,idxLevel)
                         {
                             const CellClass* neighbors[343];
                                 const int counter = tree->getInteractionNeighbors(neighbors, octreeIterator.getCurrentGlobalCoordinate(), idxLevel, separationCriteria);
@@ -347,7 +347,7 @@ protected:
 					FLOG(FTic counterTimeLevel);
 					// for each cells
 					do{
-#pragma omp task firstprivate(octreeIterator) shared(idxLevel)
+#pragma omp task firstprivate(octreeIterator,idxLevel)
 						{
 							kernels[omp_get_thread_num()]->L2L( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), idxLevel);
 						}
-- 
GitLab