Commit e56468ff authored by BRAMAS Berenger's avatar BRAMAS Berenger

Print the time elapsed at each level in sequential and threaded fmm

parent 5b105537
......@@ -126,6 +126,8 @@ private:
// for each levels
for(int idxLevel = OctreeHeight - 2 ; idxLevel > 1 ; --idxLevel ){
FDEBUG(FTic counterTimeLevel);
// for each cells
do{
// We need the current cell and the child
......@@ -136,7 +138,9 @@ private:
} while(octreeIterator.moveRight());
avoidGotoLeftIterator.moveUp();
octreeIterator = avoidGotoLeftIterator;// equal octreeIterator.moveUp(); octreeIterator.gotoLeft();
octreeIterator = avoidGotoLeftIterator;
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
......@@ -165,6 +169,8 @@ private:
// for each levels
for(int idxLevel = 2 ; idxLevel < OctreeHeight ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel);
// for each cells
do{
const int counter = tree->getInteractionNeighbors(neighbors, octreeIterator.getCurrentGlobalCoordinate(), idxLevel);
......@@ -179,6 +185,8 @@ private:
avoidGotoLeftIterator.moveDown();
octreeIterator = avoidGotoLeftIterator;
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" );
FDEBUG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" );
......@@ -203,6 +211,8 @@ private:
const int heightMinusOne = OctreeHeight - 1;
// for each levels exepted leaf level
for(int idxLevel = 2 ; idxLevel < heightMinusOne ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel);
// for each cells
do{
FDEBUG(computationCounter.tic());
......@@ -212,6 +222,8 @@ private:
avoidGotoLeftIterator.moveDown();
octreeIterator = avoidGotoLeftIterator;
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" );
......
......@@ -129,6 +129,7 @@ public:
// for each levels
for(int idxLevel = OctreeHeight - 2 ; idxLevel > 0 ; --idxLevel ){
FDEBUG(FTic counterTimeLevel);
// for each cells
do{
// We need the current cell and the child
......@@ -140,6 +141,7 @@ public:
avoidGotoLeftIterator.moveUp();
octreeIterator = avoidGotoLeftIterator;// equal octreeIterator.moveUp(); octreeIterator.gotoLeft();
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
......@@ -166,6 +168,7 @@ public:
// for each levels
for(int idxLevel = 1 ; idxLevel < OctreeHeight ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel);
// for each cells
do{
const int counter = tree->getPeriodicInteractionNeighbors(neighbors, octreeIterator.getCurrentGlobalCoordinate(), idxLevel);
......@@ -175,6 +178,11 @@ public:
} while(octreeIterator.moveRight());
avoidGotoLeftIterator.moveDown();
octreeIterator = avoidGotoLeftIterator;
FDEBUG(computationCounter.tic());
kernels->finishedLevelM2L(idxLevel);
FDEBUG(computationCounter.tac());
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" );
FDEBUG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" );
......@@ -197,6 +205,7 @@ public:
const int heightMinusOne = OctreeHeight - 1;
// for each levels exepted leaf level
for(int idxLevel = 1 ; idxLevel < heightMinusOne ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel);
// for each cells
do{
FDEBUG(computationCounter.tic());
......@@ -206,6 +215,7 @@ public:
avoidGotoLeftIterator.moveDown();
octreeIterator = avoidGotoLeftIterator;
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" );
......
......@@ -149,6 +149,7 @@ private:
// for each levels
for(int idxLevel = OctreeHeight - 2 ; idxLevel > 1 ; --idxLevel ){
FDEBUG(FTic counterTimeLevel);
// for each cells
do{
// We need the current cell and the child
......@@ -163,6 +164,7 @@ private:
octreeIterator = avoidGotoLeftIterator;// equal octreeIterator.moveUp(); octreeIterator.gotoLeft();
#pragma omp taskwait
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
}
}
......@@ -195,6 +197,7 @@ private:
// for each levels
for(int idxLevel = 2 ; idxLevel < OctreeHeight ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel);
// for each cells
do{
const int counter = tree->getInteractionNeighbors(neighbors, octreeIterator.getCurrentGlobalCoordinate(), idxLevel);
......@@ -219,6 +222,7 @@ private:
}
#pragma omp taskwait
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
}
}
......@@ -246,6 +250,7 @@ private:
const int heightMinusOne = OctreeHeight - 1;
// for each levels exepted leaf level
for(int idxLevel = 2 ; idxLevel < heightMinusOne ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel);
// for each cells
do{
#pragma omp task
......@@ -259,6 +264,7 @@ private:
octreeIterator = avoidGotoLeftIterator;
#pragma omp taskwait
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
}
}
......
......@@ -176,6 +176,7 @@ private:
// for each levels
for(int idxLevel = OctreeHeight - 2 ; idxLevel > 1 ; --idxLevel ){
FDEBUG(FTic counterTimeLevel);
int numberOfCells = 0;
// for each cells
do{
......@@ -186,10 +187,10 @@ private:
octreeIterator = avoidGotoLeftIterator;// equal octreeIterator.moveUp(); octreeIterator.gotoLeft();
FDEBUG(computationCounter.tic());
#pragma omp parallel
#pragma omp parallel
{
KernelClass * const myThreadkernels = kernels[omp_get_thread_num()];
#pragma omp for nowait
#pragma omp for nowait
for(int idxCell = 0 ; idxCell < numberOfCells ; ++idxCell){
// We need the current cell and the child
// child is an array (of 8 child) that may be null
......@@ -198,6 +199,7 @@ private:
}
FDEBUG(computationCounter.tac());
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
......@@ -224,6 +226,7 @@ private:
// for each levels
for(int idxLevel = 2 ; idxLevel < OctreeHeight ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel);
int numberOfCells = 0;
// for each cells
do{
......@@ -250,6 +253,7 @@ private:
FDEBUG(computationCounter.tac());
}
FDEBUG(computationCounter.tac());
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" );
......@@ -275,6 +279,7 @@ private:
const int heightMinusOne = OctreeHeight - 1;
// for each levels exepted leaf level
for(int idxLevel = 2 ; idxLevel < heightMinusOne ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel);
int numberOfCells = 0;
// for each cells
do{
......@@ -294,6 +299,7 @@ private:
}
}
FDEBUG(computationCounter.tac());
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" );
......
......@@ -641,6 +641,8 @@ private:
const int counter = tree->getInteractionNeighbors(neighbors, iterArray[idxCell].getCurrentGlobalCoordinate(), idxLevel);
if(counter) myThreadkernels->M2L( iterArray[idxCell].getCurrentCell() , neighbors, counter, idxLevel);
}
myThreadkernels->finishedLevelM2L(idxLevel);
}
FDEBUG(computationCounter.tac());
}
......@@ -744,6 +746,8 @@ private:
myThreadkernels->M2L( iterArray[idxCell].getCurrentCell() , neighbors, counter, idxLevel);
}
}
myThreadkernels->finishedLevelM2L(idxLevel);
}
FDEBUG(computationCounter.tac());
}
......
......@@ -715,6 +715,8 @@ private:
const int counter = tree->getPeriodicInteractionNeighbors(neighbors, iterArray[idxCell].getCurrentGlobalCoordinate(),idxLevel);
if(counter) myThreadkernels->M2L( iterArray[idxCell].getCurrentCell() , neighbors, counter, idxLevel);
}
myThreadkernels->finishedLevelM2L(idxLevel);
}
FDEBUG(computationCounter.tac());
}
......@@ -818,6 +820,8 @@ private:
myThreadkernels->M2L( iterArray[idxCell].getCurrentCell() , neighbors, counter, idxLevel);
}
}
myThreadkernels->finishedLevelM2L(idxLevel);
}
FDEBUG(computationCounter.tac());
}
......
......@@ -167,6 +167,7 @@ public:
// for each levels
for(int idxLevel = OctreeHeight - 2 ; idxLevel > 1 ; --idxLevel ){
FDEBUG(FTic counterTimeLevel);
int numberOfCells = 0;
// for each cells
do{
......@@ -203,6 +204,7 @@ public:
}
}
FDEBUG(computationCounter.tac());
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
FDEBUG( counterTime.tac() );
......@@ -225,6 +227,7 @@ public:
// for each levels
for(int idxLevel = 2 ; idxLevel < OctreeHeight ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel);
int numberOfCells = 0;
// for each cells
do{
......@@ -261,8 +264,13 @@ public:
}
}
}
FDEBUG(computationCounter.tic());
myThreadkernels->finishedLevelM2L(idxLevel);
FDEBUG(computationCounter.tac());
}
FDEBUG(computationCounter.tac());
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" );
FDEBUG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" );
......@@ -284,6 +292,7 @@ public:
const int heightMinusOne = OctreeHeight - 1;
// for each levels exepted leaf level
for(int idxLevel = 2 ; idxLevel < heightMinusOne ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel);
int numberOfCells = 0;
// for each cells
do{
......@@ -314,6 +323,7 @@ public:
}
}
FDEBUG(computationCounter.tac());
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
FDEBUG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" );
FDEBUG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" );
......
......@@ -131,6 +131,7 @@ public:
// for each levels
for(int idxLevel = OctreeHeight - 2 ; idxLevel > 1 ; --idxLevel ){
FDEBUG(FTic counterTimeLevel);
// for each cells
do{
// We need the current cell and the child
......@@ -160,6 +161,7 @@ public:
avoidGotoLeftIterator.moveUp();
octreeIterator = avoidGotoLeftIterator;// equal octreeIterator.moveUp(); octreeIterator.gotoLeft();
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
FDEBUG( counterTime.tac() );
......@@ -184,6 +186,7 @@ public:
// for each levels
for(int idxLevel = 2 ; idxLevel < OctreeHeight ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel);
// for each cells
do{
FDEBUG(computationCounter.tic());
......@@ -209,8 +212,13 @@ public:
FDEBUG(totalComputation += computationCounter.elapsed());
} while(octreeIterator.moveRight());
FDEBUG(computationCounter.tic());
kernels->finishedLevelM2L(idxLevel);
FDEBUG(computationCounter.tac());
avoidGotoLeftIterator.moveDown();
octreeIterator = avoidGotoLeftIterator;
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
FDEBUG( counterTime.tac() );
......@@ -232,6 +240,7 @@ public:
const int heightMinusOne = OctreeHeight - 1;
// for each levels exepted leaf level
for(int idxLevel = 2 ; idxLevel < heightMinusOne ; ++idxLevel ){
FDEBUG(FTic counterTimeLevel);
// for each cells
do{
FDEBUG(computationCounter.tic());
......@@ -253,6 +262,7 @@ public:
avoidGotoLeftIterator.moveDown();
octreeIterator = avoidGotoLeftIterator;
FDEBUG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" );
}
FDEBUG( counterTime.tac() );
......
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