Commit 3d6117e7 authored by BRAMAS Berenger's avatar BRAMAS Berenger

use the openmp thread again in the construction of the group tree for starpu

parent ebb311bc
...@@ -196,7 +196,7 @@ public: ...@@ -196,7 +196,7 @@ public:
#endif #endif
starpu_pthread_mutex_destroy(&initMutex); starpu_pthread_mutex_destroy(&initMutex);
//starpu_pause(); starpu_pause();
cellHandles = new std::vector<CellHandles>[tree->getHeight()]; cellHandles = new std::vector<CellHandles>[tree->getHeight()];
...@@ -252,7 +252,7 @@ public: ...@@ -252,7 +252,7 @@ public:
} }
~FGroupTaskStarPUAlgorithm(){ ~FGroupTaskStarPUAlgorithm(){
//starpu_resume(); starpu_resume();
cleanHandle(); cleanHandle();
delete[] cellHandles; delete[] cellHandles;
...@@ -298,8 +298,8 @@ public: ...@@ -298,8 +298,8 @@ public:
|| strcmp(getenv("OMP_WAIT_POLICY"), "PASSIVE") == 0 || strcmp(getenv("OMP_WAIT_POLICY"), "PASSIVE") == 0
|| strcmp(getenv("OMP_WAIT_POLICY"), "passive") == 0); || strcmp(getenv("OMP_WAIT_POLICY"), "passive") == 0);
//#pragma omp parallel #pragma omp parallel
//#pragma omp single #pragma omp single
buildExternalInteractionVecs(); buildExternalInteractionVecs();
buildHandles(); buildHandles();
...@@ -317,7 +317,7 @@ protected: ...@@ -317,7 +317,7 @@ protected:
FTIME_TASKS(cpuWrapper.taskTimeRecorder.start()); FTIME_TASKS(cpuWrapper.taskTimeRecorder.start());
#endif #endif
//starpu_resume(); starpu_resume();
FLOG( FTic timerSoumission; ); FLOG( FTic timerSoumission; );
if( operationsToProceed & FFmmP2P ) directPass(); if( operationsToProceed & FFmmP2P ) directPass();
...@@ -339,7 +339,7 @@ protected: ...@@ -339,7 +339,7 @@ protected:
FLOG( FLog::Controller << "\t\t Submitting the tasks took " << timerSoumission.tacAndElapsed() << "s\n" ); FLOG( FLog::Controller << "\t\t Submitting the tasks took " << timerSoumission.tacAndElapsed() << "s\n" );
starpu_task_wait_for_all(); starpu_task_wait_for_all();
//starpu_pause(); starpu_pause();
#ifdef STARPU_USE_CPU #ifdef STARPU_USE_CPU
FTIME_TASKS(cpuWrapper.taskTimeRecorder.end()); FTIME_TASKS(cpuWrapper.taskTimeRecorder.end());
...@@ -731,7 +731,7 @@ protected: ...@@ -731,7 +731,7 @@ protected:
std::vector<BlockInteractions<ParticleGroupClass>>* externalInteractions = &externalInteractionsLeafLevel[idxGroup]; std::vector<BlockInteractions<ParticleGroupClass>>* externalInteractions = &externalInteractionsLeafLevel[idxGroup];
//#pragma omp task default(none) firstprivate(idxGroup, containers, externalInteractions) #pragma omp task default(none) firstprivate(idxGroup, containers, externalInteractions)
{ // Can be a task(inout:iterCells) { // Can be a task(inout:iterCells)
std::vector<OutOfBlockInteraction> outsideInteractions; std::vector<OutOfBlockInteraction> outsideInteractions;
const MortonIndex blockStartIdx = containers->getStartingIndex(); const MortonIndex blockStartIdx = containers->getStartingIndex();
...@@ -820,7 +820,7 @@ protected: ...@@ -820,7 +820,7 @@ protected:
std::vector<BlockInteractions<CellContainerClass>>* externalInteractions = &externalInteractionsAllLevel[idxLevel][idxGroup]; std::vector<BlockInteractions<CellContainerClass>>* externalInteractions = &externalInteractionsAllLevel[idxLevel][idxGroup];
//#pragma omp task default(none) firstprivate(idxGroup, currentCells, idxLevel, externalInteractions) #pragma omp task default(none) firstprivate(idxGroup, currentCells, idxLevel, externalInteractions)
{ {
std::vector<OutOfBlockInteraction> outsideInteractions; std::vector<OutOfBlockInteraction> outsideInteractions;
const MortonIndex blockStartIdx = currentCells->getStartingIndex(); const MortonIndex blockStartIdx = currentCells->getStartingIndex();
...@@ -901,7 +901,7 @@ protected: ...@@ -901,7 +901,7 @@ protected:
} }
FLOG( cellTimer.tac(); ); FLOG( cellTimer.tac(); );
//#pragma omp taskwait #pragma omp taskwait
FLOG( FLog::Controller << "\t\t Prepare in " << timer.tacAndElapsed() << "s\n" ); FLOG( FLog::Controller << "\t\t Prepare in " << timer.tacAndElapsed() << "s\n" );
FLOG( FLog::Controller << "\t\t\t Prepare at leaf level in " << leafTimer.elapsed() << "s\n" ); FLOG( FLog::Controller << "\t\t\t Prepare at leaf level in " << leafTimer.elapsed() << "s\n" );
......
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