Commit d727abb6 authored by ESTERIE Pierre's avatar ESTERIE Pierre
Browse files

Fix OMP

parent b77f1e0e
......@@ -977,7 +977,7 @@ protected:
{
const int chunckSize = userChunkSize;
for(int idxCell = 0 ; idxCell < numberOfCells ; idxCell += chunckSize){
#pragma omp task default(none) shared(numberOfCells,idxLevel) firstprivate(idxCell) //+ shared(chunckSize)
#pragma omp task default(none) shared(numberOfCells,idxLevel) firstprivate(idxCell) shared(chunckSize, separationCriteria)
{
KernelClass * const myThreadkernels = kernels[omp_get_thread_num()];
const CellClass* neighbors[342] {};
......@@ -1698,7 +1698,7 @@ protected:
for(int idxLeafs = previous ; idxLeafs < endAtThisShape ; idxLeafs += chunckSize){
const int nbLeavesInTask = FMath::Min(endAtThisShape-idxLeafs, chunckSize);
#pragma omp task default(none) firstprivate(nbLeavesInTask,idxLeafs) //+shared(leafsDataArray)
#pragma omp task default(none) firstprivate(nbLeavesInTask,idxLeafs, l2pEnabled, p2pEnabled) shared(leafsDataArray)
{
KernelClass* myThreadkernels = (kernels[omp_get_thread_num()]);
// There is a maximum of 26 neighbors
......
......@@ -1055,7 +1055,7 @@ protected:
{
const int chunckSize = userChunkSize;
for(int idxCell = 0 ; idxCell < numberOfCells ; idxCell += chunckSize){
#pragma omp task default(none) shared(numberOfCells,idxLevel) firstprivate(idxCell) //+ shared(chunckSize)
#pragma omp task default(none) shared(numberOfCells,idxLevel) firstprivate(idxCell) shared(chunckSize) firstprivate(separationCriteria)
{
KernelClass * const myThreadkernels = kernels[omp_get_thread_num()];
const CellClass* neighbors[342];
......@@ -1104,7 +1104,7 @@ protected:
#pragma omp taskwait
for(int idxThread = 0 ; idxThread < omp_get_num_threads() ; ++idxThread){
#pragma omp task default(none) firstprivate(idxThread,idxLevel)
#pragma omp task default(none) firstprivate(idxThread,idxLevel,fakeLevel)
{
kernels[idxThread]->finishedLevelM2L(fakeLevel);
}
......@@ -1826,7 +1826,7 @@ protected:
for(int idxLeafs = previous ; idxLeafs < endAtThisShape ; idxLeafs += chunckSize){
const int nbLeavesInTask = FMath::Min(endAtThisShape-idxLeafs, chunckSize);
#pragma omp task default(none) firstprivate(nbLeavesInTask,idxLeafs)
#pragma omp task default(none) firstprivate(nbLeavesInTask,idxLeafs,l2pEnabled, p2pEnabled, LeafIndex, boxWidth) shared(leafsDataArray)
{
KernelClass* myThreadkernels = (kernels[omp_get_thread_num()]);
......
......@@ -1016,7 +1016,7 @@ protected:
{
const int chunckSize = userChunkSize;
for(int idxCell = 0 ; idxCell < numberOfCells ; idxCell += chunckSize){
#pragma omp task default(none) shared(numberOfCells,idxLevel) firstprivate(idxCell) //+ shared(chunckSize)
#pragma omp task default(none) shared(numberOfCells,idxLevel) firstprivate(idxCell) shared(chunckSize, separationCriteria)
{
KernelClass * const myThreadkernels = kernels[omp_get_thread_num()];
const CellClass* neighbors[342];
......@@ -1785,7 +1785,7 @@ protected:
for(int idxLeafs = previous ; idxLeafs < endAtThisShape ; idxLeafs += chunckSize){
const int nbLeavesInTask = FMath::Min(endAtThisShape-idxLeafs, chunckSize);
#pragma omp task default(none) firstprivate(nbLeavesInTask,idxLeafs) //+shared(leafsDataArray)
#pragma omp task default(none) firstprivate(nbLeavesInTask,idxLeafs, l2pEnabled, p2pEnabled) shared(leafsDataArray)
{
KernelClass* myThreadkernels = (kernels[omp_get_thread_num()]);
// There is a maximum of 26 neighbors
......
......@@ -997,7 +997,7 @@ protected:
std::vector<BlockInteractions<CellContainerClass>>* externalInteractions = &externalInteractionsAllLevelMpi[idxLevel][idxGroup];
#pragma omp task default(none) firstprivate(idxGroup, currentCells, idxLevel, externalInteractions)
#pragma omp task default(none) firstprivate(idxGroup, currentCells, idxLevel, externalInteractions, myFirstIndex, myLastIndex)
{
std::vector<OutOfBlockInteraction> outsideInteractions;
......@@ -1100,7 +1100,7 @@ protected:
std::vector<BlockInteractions<ParticleGroupClass>>* externalInteractions = &externalInteractionsLeafLevelMpi[idxGroup];
#pragma omp task default(none) firstprivate(idxGroup, containers, externalInteractions)
#pragma omp task default(none) firstprivate(idxGroup, containers, externalInteractions, myFirstIndex, myLastIndex)
{ // Can be a task(inout:iterCells)
std::vector<OutOfBlockInteraction> outsideInteractions;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment