diff --git a/Src/Components/FAbstractKernels.hpp b/Src/Components/FAbstractKernels.hpp index a5ef287861ce9af789554b36fce6d155b522ca40..038cf16d7e4d8f795c3af99e79297ceb95f467a6 100755 --- a/Src/Components/FAbstractKernels.hpp +++ b/Src/Components/FAbstractKernels.hpp @@ -18,7 +18,7 @@ #include "../Utils/FGlobal.hpp" -#include "../Utils/FDebug.hpp" +#include "../Utils/FLog.hpp" /** * @author Berenger Bramas (berenger.bramas@inria.fr) @@ -126,7 +126,7 @@ public: virtual void P2PRemote(const FTreeCoordinate& /*inLeafPosition*/, ContainerClass* const FRestrict /*targets*/, const ContainerClass* const FRestrict /*sources*/, ContainerClass* const /*directNeighborsParticles*/[27], const int /*size*/) { - FLOG( FDebug::Controller.write("Warning, P2P remote is used but not implemented!").write(FDebug::Flush) ); + FLOG( FLog::Controller.write("Warning, P2P remote is used but not implemented!").write(FLog::Flush) ); } }; diff --git a/Src/Components/FAbstractLeaf.hpp b/Src/Components/FAbstractLeaf.hpp index ec79ec5fc175feca35e05306e9eae1be0e862e38..ba2637177755f04cb0df342a5b9ff31934d74731 100755 --- a/Src/Components/FAbstractLeaf.hpp +++ b/Src/Components/FAbstractLeaf.hpp @@ -17,7 +17,7 @@ #define FABSTRACTLEAF_HPP #include "../Utils/FPoint.hpp" -#include "../Utils/FDebug.hpp" +#include "../Utils/FLog.hpp" /** * @author Berenger Bramas (berenger.bramas@inria.fr) @@ -42,7 +42,7 @@ public: */ template<typename... Args> void push(const FPoint& /*inParticlePosition*/, Args ... /*args*/){ - FLOG( FDebug::Controller.write("Warning, push is not implemented!").write(FDebug::Flush) ); + FLOG( FLog::Controller.write("Warning, push is not implemented!").write(FLog::Flush) ); } /** diff --git a/Src/Components/FAbstractParticleContainer.hpp b/Src/Components/FAbstractParticleContainer.hpp index 1bafa0c7c4774ed2ab6237577186bdf872c12283..14c8e5f19ef415808dd07324575747d11e1ca367 100755 --- a/Src/Components/FAbstractParticleContainer.hpp +++ b/Src/Components/FAbstractParticleContainer.hpp @@ -17,7 +17,7 @@ #define FABSTRACTPARTICLECONTAINER_HPP #include "../Utils/FGlobal.hpp" -#include "../Utils/FDebug.hpp" +#include "../Utils/FLog.hpp" /* forward declaration to avoid include */ class FPoint; @@ -45,7 +45,7 @@ public: */ template<typename... Args> void push(const FPoint& /*inParticlePosition*/, Args ... /*args*/){ - FLOG( FDebug::Controller.write("Warning, push is not implemented!").write(FDebug::Flush) ); + FLOG( FLog::Controller.write("Warning, push is not implemented!").write(FLog::Flush) ); } }; diff --git a/Src/Containers/FOctree.hpp b/Src/Containers/FOctree.hpp index 38bd9d5af611b7eaac9dddfee0fd3f79c3d018e5..abed91c7da9cf3f802bfd147161a293b0e8ead35 100755 --- a/Src/Containers/FOctree.hpp +++ b/Src/Containers/FOctree.hpp @@ -22,7 +22,7 @@ #include "FTreeCoordinate.hpp" #include "FBlockAllocator.hpp" -#include "../Utils/FDebug.hpp" +#include "../Utils/FLog.hpp" #include "../Utils/FGlobal.hpp" #include "../Utils/FGlobalPeriodic.hpp" #include "../Utils/FPoint.hpp" diff --git a/Src/Core/FFmmAlgorithm.hpp b/Src/Core/FFmmAlgorithm.hpp index b38b4cc435d226a0185f136541c42e4c7be22f5e..f901c2294de624a0ea98833917c48fe3f952cdf9 100755 --- a/Src/Core/FFmmAlgorithm.hpp +++ b/Src/Core/FFmmAlgorithm.hpp @@ -19,7 +19,7 @@ #include "../Utils/FGlobal.hpp" #include "../Utils/FAssertable.hpp" -#include "../Utils/FDebug.hpp" +#include "../Utils/FLog.hpp" #include "../Utils/FTrace.hpp" #include "../Utils/FTic.hpp" @@ -59,7 +59,7 @@ public: fassert(tree, "tree cannot be null", __LINE__, __FILE__); fassert(kernels, "kernels cannot be null", __LINE__, __FILE__); - FLOG(FDebug::Controller << "FFmmAlgorithm\n"); + FLOG(FLog::Controller << "FFmmAlgorithm\n"); } /** Default destructor */ @@ -92,7 +92,7 @@ private: /** P2M */ void bottomPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Bottom Pass\n").write(FDebug::Flush) ); + FLOG( FLog::Controller.write("\tStart Bottom Pass\n").write(FLog::Flush) ); FLOG(FTic counterTime); FLOG(FTic computationCounter); @@ -108,8 +108,8 @@ private: FLOG(computationCounter.tac()); } while(octreeIterator.moveRight()); - FLOG( FDebug::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); } ///////////////////////////////////////////////////////////////////////////// @@ -119,7 +119,7 @@ private: /** M2M */ void upwardPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Upward Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Upward Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); @@ -146,12 +146,12 @@ private: avoidGotoLeftIterator.moveUp(); octreeIterator = avoidGotoLeftIterator; - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } - FLOG( FDebug::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); } ///////////////////////////////////////////////////////////////////////////// @@ -162,7 +162,7 @@ private: void transferPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (M2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (M2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); @@ -192,10 +192,10 @@ private: avoidGotoLeftIterator.moveDown(); octreeIterator = avoidGotoLeftIterator; - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); } ///////////////////////////////////////////////////////////////////////////// @@ -205,7 +205,7 @@ private: /** L2L */ void downardPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (L2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (L2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter ); @@ -229,11 +229,11 @@ private: avoidGotoLeftIterator.moveDown(); octreeIterator = avoidGotoLeftIterator; - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); } @@ -245,7 +245,7 @@ private: /** P2P */ void directPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Direct Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Direct Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounterL2P); FLOG(FTic computationCounterP2P); @@ -270,9 +270,9 @@ private: } while(octreeIterator.moveRight()); - FLOG( FDebug::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation L2P : " << computationCounterL2P.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Computation P2P : " << computationCounterP2P.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation L2P : " << computationCounterL2P.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Computation P2P : " << computationCounterP2P.cumulated() << " s\n" ); } diff --git a/Src/Core/FFmmAlgorithmPeriodic.hpp b/Src/Core/FFmmAlgorithmPeriodic.hpp index 1f66b6e3cd1e0f7776593282741aef6a53ec92d7..2a8bb7d9da8b4011594cb126ec725ce4b41dd57f 100755 --- a/Src/Core/FFmmAlgorithmPeriodic.hpp +++ b/Src/Core/FFmmAlgorithmPeriodic.hpp @@ -20,7 +20,7 @@ #include "../Utils/FGlobal.hpp" #include "../Utils/FGlobalPeriodic.hpp" #include "../Utils/FAssertable.hpp" -#include "../Utils/FDebug.hpp" +#include "../Utils/FLog.hpp" #include "../Utils/FTrace.hpp" #include "../Utils/FTic.hpp" #include "../Utils/FMemUtils.hpp" @@ -69,7 +69,7 @@ public: fassert(tree, "tree cannot be null", __LINE__, __FILE__); fassert(-1 <= inUpperLevel, "inUpperLevel cannot be < -1", __LINE__, __FILE__); - FLOG(FDebug::Controller << "FFmmAlgorithmPeriodic\n"); + FLOG(FLog::Controller << "FFmmAlgorithmPeriodic\n"); } /** Default destructor */ @@ -111,7 +111,7 @@ public: /** P2M */ void bottomPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Bottom Pass\n").write(FDebug::Flush) ); + FLOG( FLog::Controller.write("\tStart Bottom Pass\n").write(FLog::Flush) ); FLOG(FTic counterTime); FLOG(FTic computationCounter); @@ -127,8 +127,8 @@ public: FLOG(computationCounter.tac()); } while(octreeIterator.moveRight()); - FLOG( FDebug::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); } ///////////////////////////////////////////////////////////////////////////// @@ -138,7 +138,7 @@ public: /** M2M */ void upwardPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Upward Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Upward Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); @@ -164,12 +164,12 @@ public: avoidGotoLeftIterator.moveUp(); octreeIterator = avoidGotoLeftIterator;// equal octreeIterator.moveUp(); octreeIterator.gotoLeft(); - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << "(" << fackLevel << ") = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << "(" << fackLevel << ") = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } - FLOG( FDebug::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); } ///////////////////////////////////////////////////////////////////////////// @@ -180,7 +180,7 @@ public: void transferPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (M2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (M2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); @@ -206,10 +206,10 @@ public: FLOG(computationCounter.tic()); kernels->finishedLevelM2L(fackLevel); FLOG(computationCounter.tac()); - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << "(" << fackLevel << ") = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << "(" << fackLevel << ") = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); } ///////////////////////////////////////////////////////////////////////////// @@ -219,7 +219,7 @@ public: void downardPass(){ // second L2L FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (L2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (L2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter ); @@ -241,11 +241,11 @@ public: avoidGotoLeftIterator.moveDown(); octreeIterator = avoidGotoLeftIterator; - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << "(" << fackLevel << ") = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << "(" << fackLevel << ") = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); } @@ -257,7 +257,7 @@ public: /** P2P */ void directPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Direct Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Direct Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounterL2P); FLOG(FTic computationCounterP2P); @@ -334,9 +334,9 @@ public: } while(octreeIterator.moveRight()); - FLOG( FDebug::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation L2P : " << computationCounterL2P.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Computation P2P : " << computationCounterP2P.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation L2P : " << computationCounterL2P.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Computation P2P : " << computationCounterP2P.cumulated() << " s\n" ); } @@ -561,12 +561,12 @@ public: */ void processPeriodicLevels(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Periodic Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Periodic Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); ///////////////////////////////////////////////////// // If nb level == -1 nothing to do if( nbLevelsAboveRoot == -1 ){ - FLOG( FDebug::Controller << "\tFinished (@Periodic = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\tFinished (@Periodic = " << counterTime.tacAndElapsed() << "s)\n" ); return; } ///////////////////////////////////////////////////// @@ -599,7 +599,7 @@ public: // put result in level 1 kernels->L2L( &rootDown, octreeIterator.getCurrentBox(), 3); - FLOG( FDebug::Controller << "\tFinished (@Periodic = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\tFinished (@Periodic = " << counterTime.tacAndElapsed() << "s)\n" ); return; } ///////////////////////////////////////////////////// @@ -1195,7 +1195,7 @@ public: delete[] cellsYZAxis; delete[] cellsXZAxis; - FLOG( FDebug::Controller << "\tFinished (@Periodic = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\tFinished (@Periodic = " << counterTime.tacAndElapsed() << "s)\n" ); } diff --git a/Src/Core/FFmmAlgorithmSectionTask.hpp b/Src/Core/FFmmAlgorithmSectionTask.hpp index b0d1a57d1d428cb6786b77657b665ce71285375f..79ba29175a12189b2c20efe956b0d823b62d84b8 100755 --- a/Src/Core/FFmmAlgorithmSectionTask.hpp +++ b/Src/Core/FFmmAlgorithmSectionTask.hpp @@ -19,7 +19,7 @@ #include "../Utils/FGlobal.hpp" #include "../Utils/FAssertable.hpp" -#include "../Utils/FDebug.hpp" +#include "../Utils/FLog.hpp" #include "../Utils/FTrace.hpp" #include "../Utils/FTic.hpp" @@ -68,7 +68,7 @@ public: this->kernels[idxThread] = new KernelClass(*inKernels); } - FLOG(FDebug::Controller << "FFmmAlgorithmSectionTask (Max Thread " << omp_get_max_threads() << ")\n"); + FLOG(FLog::Controller << "FFmmAlgorithmSectionTask (Max Thread " << omp_get_max_threads() << ")\n"); } /** Default destructor */ @@ -120,7 +120,7 @@ private: /** P2M */ void bottomPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Bottom Pass\n").write(FDebug::Flush) ); + FLOG( FLog::Controller.write("\tStart Bottom Pass\n").write(FLog::Flush) ); FLOG(FTic counterTime); typename OctreeClass::Iterator octreeIterator(tree); @@ -139,7 +139,7 @@ private: #pragma omp taskwait - FLOG( FDebug::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); } ///////////////////////////////////////////////////////////////////////////// @@ -149,7 +149,7 @@ private: /** M2M */ void upwardPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Upward Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Upward Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); // Start from leal level - 1 @@ -176,11 +176,11 @@ private: octreeIterator = avoidGotoLeftIterator;// equal octreeIterator.moveUp(); octreeIterator.gotoLeft(); #pragma omp taskwait - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } - FLOG( FDebug::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); } ///////////////////////////////////////////////////////////////////////////// @@ -191,7 +191,7 @@ private: void transferPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (M2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (M2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); const CellClass* neighbors[343]; @@ -230,10 +230,10 @@ private: } #pragma omp taskwait - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); } ///////////////////////////////////////////////////////////////////////////// @@ -242,7 +242,7 @@ private: void downardPass(){ // second L2L FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (L2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (L2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); typename OctreeClass::Iterator octreeIterator(tree); @@ -267,10 +267,10 @@ private: octreeIterator = avoidGotoLeftIterator; #pragma omp taskwait - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); } @@ -281,7 +281,7 @@ private: /** P2P */ void directPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Direct Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Direct Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); @@ -325,13 +325,13 @@ private: FLOG( computationCounter.tac() ); - FLOG( FDebug::Controller << "\tFinished (@Direct Pass (P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation P2P : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Direct Pass (P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation P2P : " << computationCounter.cumulated() << " s\n" ); } void L2PPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart L2P Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart L2P Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); typename OctreeClass::Iterator octreeIterator(tree); @@ -347,7 +347,7 @@ private: #pragma omp taskwait - FLOG( FDebug::Controller << "\tFinished (@Direct Pass (L2P) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\tFinished (@Direct Pass (L2P) = " << counterTime.tacAndElapsed() << "s)\n" ); } }; diff --git a/Src/Core/FFmmAlgorithmTask.hpp b/Src/Core/FFmmAlgorithmTask.hpp index 63b81c5151eee52e39cd6882bdf59b0c75a43568..d8fd952b8945b367baa466f9483dc0abe4763b2f 100755 --- a/Src/Core/FFmmAlgorithmTask.hpp +++ b/Src/Core/FFmmAlgorithmTask.hpp @@ -19,7 +19,7 @@ #include "../Utils/FGlobal.hpp" #include "../Utils/FAssertable.hpp" -#include "../Utils/FDebug.hpp" +#include "../Utils/FLog.hpp" #include "../Utils/FTrace.hpp" #include "../Utils/FTic.hpp" @@ -68,7 +68,7 @@ public: this->kernels[idxThread] = new KernelClass(*inKernels); } - FLOG(FDebug::Controller << "FFmmAlgorithmTask (Max Thread " << omp_get_max_threads() << ")\n"); + FLOG(FLog::Controller << "FFmmAlgorithmTask (Max Thread " << omp_get_max_threads() << ")\n"); } /** Default destructor */ @@ -105,7 +105,7 @@ private: /** P2M */ void bottomPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Bottom Pass\n").write(FDebug::Flush) ); + FLOG( FLog::Controller.write("\tStart Bottom Pass\n").write(FLog::Flush) ); FLOG(FTic counterTime); #pragma omp parallel @@ -129,7 +129,7 @@ private: } } - FLOG( FDebug::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); } ///////////////////////////////////////////////////////////////////////////// @@ -139,7 +139,7 @@ private: /** M2M */ void upwardPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Upward Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Upward Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); #pragma omp parallel @@ -170,13 +170,13 @@ private: octreeIterator = avoidGotoLeftIterator;// equal octreeIterator.moveUp(); octreeIterator.gotoLeft(); #pragma omp taskwait - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } } } - FLOG( FDebug::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); } ///////////////////////////////////////////////////////////////////////////// @@ -187,7 +187,7 @@ private: void transferPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (M2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (M2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); #pragma omp parallel { @@ -229,11 +229,11 @@ private: } #pragma omp taskwait - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } } } - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); } ///////////////////////////////////////////////////////////////////////////// @@ -242,7 +242,7 @@ private: void downardPass(){ // second L2L FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (L2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (L2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); #pragma omp parallel @@ -271,12 +271,12 @@ private: octreeIterator = avoidGotoLeftIterator; #pragma omp taskwait - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } } } - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); } @@ -287,7 +287,7 @@ private: /** P2P */ void directPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Direct Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Direct Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); @@ -339,8 +339,8 @@ private: } - FLOG( FDebug::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation L2P + P2P : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation L2P + P2P : " << computationCounter.cumulated() << " s\n" ); } }; diff --git a/Src/Core/FFmmAlgorithmThread.hpp b/Src/Core/FFmmAlgorithmThread.hpp index 226514c08fcb49c1d92cac3d96110dabf71a6d6f..d31d89e4a1adaeb160024869a9ddfe520c153827 100755 --- a/Src/Core/FFmmAlgorithmThread.hpp +++ b/Src/Core/FFmmAlgorithmThread.hpp @@ -18,7 +18,7 @@ #include "../Utils/FAssertable.hpp" -#include "../Utils/FDebug.hpp" +#include "../Utils/FLog.hpp" #include "../Utils/FTrace.hpp" #include "../Utils/FTic.hpp" #include "../Utils/FGlobal.hpp" @@ -76,7 +76,7 @@ public: this->kernels[idxThread] = new KernelClass(*inKernels); } - FLOG(FDebug::Controller << "FFmmAlgorithmThread (Max Thread " << omp_get_max_threads() << ")\n"); + FLOG(FLog::Controller << "FFmmAlgorithmThread (Max Thread " << omp_get_max_threads() << ")\n"); } /** Default destructor */ @@ -133,7 +133,7 @@ private: /** P2M */ void bottomPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Bottom Pass\n").write(FDebug::Flush) ); + FLOG( FLog::Controller.write("\tStart Bottom Pass\n").write(FLog::Flush) ); FLOG(FTic counterTime); typename OctreeClass::Iterator octreeIterator(tree); @@ -158,8 +158,8 @@ private: } FLOG(computationCounter.tac() ); - FLOG( FDebug::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.elapsed() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.elapsed() << " s\n" ); } @@ -170,7 +170,7 @@ private: /** M2M */ void upwardPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Upward Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Upward Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); @@ -205,12 +205,12 @@ private: } FLOG(computationCounter.tac()); - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } - FLOG( FDebug::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); } @@ -222,7 +222,7 @@ private: void transferPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (M2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (M2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); @@ -259,11 +259,11 @@ private: FLOG(computationCounter.tac()); } FLOG(computationCounter.tac()); - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); } ///////////////////////////////////////////////////////////////////////////// @@ -273,7 +273,7 @@ private: void downardPass(){ // second L2L FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (L2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (L2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); @@ -305,11 +305,11 @@ private: } } FLOG(computationCounter.tac()); - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); } @@ -321,7 +321,7 @@ private: /** P2P */ void directPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Direct Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Direct Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); FLOG(FTic computationCounterP2P); @@ -417,9 +417,9 @@ private: } - FLOG( FDebug::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation L2P + P2P : " << computationCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Computation P2P : " << computationCounterP2P.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation L2P + P2P : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Computation P2P : " << computationCounterP2P.cumulated() << " s\n" ); } diff --git a/Src/Core/FFmmAlgorithmThreadProc.hpp b/Src/Core/FFmmAlgorithmThreadProc.hpp index 50c79311da144092a431850dd35f8739dd4460c3..3596cbd3b0bcac92cf0961806293484a6a87cfe2 100755 --- a/Src/Core/FFmmAlgorithmThreadProc.hpp +++ b/Src/Core/FFmmAlgorithmThreadProc.hpp @@ -18,7 +18,7 @@ #include "../Utils/FAssertable.hpp" -#include "../Utils/FDebug.hpp" +#include "../Utils/FLog.hpp" #include "../Utils/FTrace.hpp" #include "../Utils/FTic.hpp" #include "../Utils/FGlobal.hpp" @@ -124,8 +124,8 @@ public: this->kernels[idxThread] = new KernelClass(*inKernels); } - FLOG(FDebug::Controller << "FFmmAlgorithmThreadProc\n"); - FLOG(FDebug::Controller << "Max threads = " << MaxThreads << ", Procs = " << nbProcess << ", I am " << idProcess << ".\n"); + FLOG(FLog::Controller << "FFmmAlgorithmThreadProc\n"); + FLOG(FLog::Controller << "Max threads = " << MaxThreads << ", Procs = " << nbProcess << ", I am " << idProcess << ".\n"); } /** Default destructor */ @@ -221,7 +221,7 @@ private: /** P2M Bottom Pass */ void bottomPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Bottom Pass\n").write(FDebug::Flush) ); + FLOG( FLog::Controller.write("\tStart Bottom Pass\n").write(FLog::Flush) ); FLOG(FTic counterTime); typename OctreeClass::Iterator octreeIterator(tree); @@ -245,8 +245,8 @@ private: FLOG(computationCounter.tac()); - FLOG( FDebug::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.elapsed() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.elapsed() << " s\n" ); } @@ -257,7 +257,7 @@ private: /** M2M */ void upwardPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Upward Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Upward Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); FLOG(FTic prepareCounter); @@ -431,10 +431,10 @@ private: } - FLOG( FDebug::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Prepare : " << prepareCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Wait : " << waitCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Prepare : " << prepareCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Wait : " << waitCounter.cumulated() << " s\n" ); } @@ -446,7 +446,7 @@ private: void transferPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (M2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (M2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); FLOG(FTic sendCounter); @@ -784,12 +784,12 @@ private: delete[] requests; delete[] status; - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Send : " << sendCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Receive : " << receiveCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Gather : " << gatherCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Prepare : " << prepareCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Send : " << sendCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Receive : " << receiveCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Gather : " << gatherCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Prepare : " << prepareCounter.cumulated() << " s\n" ); } ////////////////////////////////////////////////////////////////// @@ -798,7 +798,7 @@ private: void downardPass(){ // second L2L FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (L2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (L2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); FLOG(FTic prepareCounter); @@ -920,10 +920,10 @@ private: delete[] requests; delete[] status; - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Prepare : " << prepareCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Wait : " << waitCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Prepare : " << prepareCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Wait : " << waitCounter.cumulated() << " s\n" ); } @@ -939,7 +939,7 @@ private: /** P2P */ void directPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Direct Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Direct Pass\n").write(FLog::Flush); ); FLOG( FTic counterTime); FLOG( FTic prepareCounter); FLOG( FTic gatherCounter); @@ -1266,12 +1266,12 @@ private: FLOG(computation2Counter.tac()); - FLOG( FDebug::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation L2P + P2P : " << computationCounter.elapsed() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Computation P2P 2 : " << computation2Counter.elapsed() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Prepare P2P : " << prepareCounter.elapsed() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Gather P2P : " << gatherCounter.elapsed() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Wait : " << waitCounter.elapsed() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation L2P + P2P : " << computationCounter.elapsed() << " s\n" ); + FLOG( FLog::Controller << "\t\t Computation P2P 2 : " << computation2Counter.elapsed() << " s\n" ); + FLOG( FLog::Controller << "\t\t Prepare P2P : " << prepareCounter.elapsed() << " s\n" ); + FLOG( FLog::Controller << "\t\t Gather P2P : " << gatherCounter.elapsed() << " s\n" ); + FLOG( FLog::Controller << "\t\t Wait : " << waitCounter.elapsed() << " s\n" ); } diff --git a/Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp b/Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp index b858442e5ebf00d867688f03f78f7f051731227c..fa294413d3d9b83932126337144eb03c5637b39b 100755 --- a/Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp +++ b/Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp @@ -18,7 +18,7 @@ #include "../Utils/FAssertable.hpp" -#include "../Utils/FDebug.hpp" +#include "../Utils/FLog.hpp" #include "../Utils/FTrace.hpp" #include "../Utils/FTic.hpp" #include "../Utils/FGlobal.hpp" @@ -135,8 +135,8 @@ public: fassert(tree, "tree cannot be null", __LINE__, __FILE__); fassert(-1 <= inUpperLevel, "inUpperLevel cannot be < -1", __LINE__, __FILE__); - FLOG(FDebug::Controller << "FFmmAlgorithmThreadProcPeriodic\n"); - FLOG(FDebug::Controller << "Max threads = " << MaxThreads << ", Procs = " << nbProcess << ", I am " << idProcess << ".\n"); + FLOG(FLog::Controller << "FFmmAlgorithmThreadProcPeriodic\n"); + FLOG(FLog::Controller << "Max threads = " << MaxThreads << ", Procs = " << nbProcess << ", I am " << idProcess << ".\n"); } /** Default destructor */ @@ -232,7 +232,7 @@ private: /** P2M Bottom Pass */ void bottomPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Bottom Pass\n").write(FDebug::Flush) ); + FLOG( FLog::Controller.write("\tStart Bottom Pass\n").write(FLog::Flush) ); FLOG(FTic counterTime); typename OctreeClass::Iterator octreeIterator(tree); @@ -256,8 +256,8 @@ private: FLOG(computationCounter.tac()); - FLOG( FDebug::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.elapsed() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.elapsed() << " s\n" ); } @@ -268,7 +268,7 @@ private: /** M2M */ void upwardPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Upward Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Upward Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); FLOG(FTic prepareCounter); @@ -443,10 +443,10 @@ private: } - FLOG( FDebug::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Prepare : " << prepareCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Wait : " << waitCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Prepare : " << prepareCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Wait : " << waitCounter.cumulated() << " s\n" ); ////////////////////////////////////////////////////////////////// //Periodicity @@ -530,7 +530,7 @@ private: void transferPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (M2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (M2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); FLOG(FTic sendCounter); @@ -871,12 +871,12 @@ private: delete[] requests; delete[] status; - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Send : " << sendCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Receive : " << receiveCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Gather : " << gatherCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Prepare : " << prepareCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Send : " << sendCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Receive : " << receiveCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Gather : " << gatherCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Prepare : " << prepareCounter.cumulated() << " s\n" ); } ////////////////////////////////////////////////////////////////// @@ -885,7 +885,7 @@ private: void downardPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (L2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (L2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); FLOG(FTic prepareCounter); @@ -1022,10 +1022,10 @@ private: delete[] requests; delete[] status; - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Prepare : " << prepareCounter.cumulated() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Wait : " << waitCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Prepare : " << prepareCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\t\t Wait : " << waitCounter.cumulated() << " s\n" ); } @@ -1041,7 +1041,7 @@ private: /** P2P */ void directPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Direct Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Direct Pass\n").write(FLog::Flush); ); FLOG( FTic counterTime); FLOG( FTic prepareCounter); FLOG( FTic gatherCounter); @@ -1415,12 +1415,12 @@ private: FLOG(computation2Counter.tac()); - FLOG( FDebug::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation L2P + P2P : " << computationCounter.elapsed() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Computation P2P 2 : " << computation2Counter.elapsed() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Prepare P2P : " << prepareCounter.elapsed() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Gather P2P : " << gatherCounter.elapsed() << " s\n" ); - FLOG( FDebug::Controller << "\t\t Wait : " << waitCounter.elapsed() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation L2P + P2P : " << computationCounter.elapsed() << " s\n" ); + FLOG( FLog::Controller << "\t\t Computation P2P 2 : " << computation2Counter.elapsed() << " s\n" ); + FLOG( FLog::Controller << "\t\t Prepare P2P : " << prepareCounter.elapsed() << " s\n" ); + FLOG( FLog::Controller << "\t\t Gather P2P : " << gatherCounter.elapsed() << " s\n" ); + FLOG( FLog::Controller << "\t\t Wait : " << waitCounter.elapsed() << " s\n" ); } diff --git a/Src/Core/FFmmAlgorithmThreadTsm.hpp b/Src/Core/FFmmAlgorithmThreadTsm.hpp index 6902c4d50d9c0900adaa9dc0fb8e31531f48c88c..7a9a3f6788954549d3dd1844dc589c2bd774e33e 100755 --- a/Src/Core/FFmmAlgorithmThreadTsm.hpp +++ b/Src/Core/FFmmAlgorithmThreadTsm.hpp @@ -18,7 +18,7 @@ #include "../Utils/FAssertable.hpp" -#include "../Utils/FDebug.hpp" +#include "../Utils/FLog.hpp" #include "../Utils/FTrace.hpp" #include "../Utils/FTic.hpp" #include "../Utils/FGlobal.hpp" @@ -72,7 +72,7 @@ public: this->kernels[idxThread] = new KernelClass(*inKernels); } - FLOG(FDebug::Controller << "FFmmAlgorithmThreadTsm\n"); + FLOG(FLog::Controller << "FFmmAlgorithmThreadTsm\n"); } /** Default destructor */ @@ -119,7 +119,7 @@ public: /** P2M */ void bottomPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Bottom Pass\n").write(FDebug::Flush) ); + FLOG( FLog::Controller.write("\tStart Bottom Pass\n").write(FLog::Flush) ); FLOG( FTic counterTime ); typename OctreeClass::Iterator octreeIterator(tree); @@ -152,15 +152,15 @@ public: FLOG(computationCounter.tac()); FLOG( counterTime.tac() ); - FLOG( FDebug::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.elapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.elapsed() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.elapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.elapsed() << " s\n" ); } /** M2M */ void upwardPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Upward Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Upward Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); @@ -209,12 +209,12 @@ public: } } FLOG(computationCounter.tac()); - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } FLOG( counterTime.tac() ); - FLOG( FDebug::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.elapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.elapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); } @@ -222,7 +222,7 @@ public: void transferPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (M2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (M2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); @@ -275,17 +275,17 @@ public: FLOG(computationCounter.tac()); } FLOG(computationCounter.tac()); - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); } /* L2L */ void downardPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (L2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (L2L)\n").write(FLog::Flush); ); FLOG(FTic counterTime); FLOG(FTic computationCounter); @@ -328,17 +328,17 @@ public: } } FLOG(computationCounter.tac()); - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << computationCounter.cumulated() << " s\n" ); } /** P2P */ void directPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Direct Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Direct Pass\n").write(FLog::Flush); ); FLOG(FTic counterTime); int numberOfLeafs = 0; @@ -372,8 +372,8 @@ public: FLOG(computationCounter.tac()); FLOG( counterTime.tac() ); - FLOG( FDebug::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation L2P + P2P : " << computationCounter.elapsed() << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.tacAndElapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation L2P + P2P : " << computationCounter.elapsed() << " s\n" ); } diff --git a/Src/Core/FFmmAlgorithmTsm.hpp b/Src/Core/FFmmAlgorithmTsm.hpp index a1270f3c33e91b5dfe09198813fe7d9b1aa79cd1..2a6b71c6a061ccdfca2fd8bc1eedde40d2a88c87 100755 --- a/Src/Core/FFmmAlgorithmTsm.hpp +++ b/Src/Core/FFmmAlgorithmTsm.hpp @@ -18,7 +18,7 @@ #include "../Utils/FAssertable.hpp" -#include "../Utils/FDebug.hpp" +#include "../Utils/FLog.hpp" #include "../Utils/FTrace.hpp" #include "../Utils/FTic.hpp" @@ -61,7 +61,7 @@ public: fassert(tree, "tree cannot be null", __LINE__, __FILE__); fassert(kernels, "kernels cannot be null", __LINE__, __FILE__); - FLOG(FDebug::Controller << "FFmmAlgorithmTsm\n"); + FLOG(FLog::Controller << "FFmmAlgorithmTsm\n"); } /** Default destructor */ @@ -89,7 +89,7 @@ public: /** P2M */ void bottomPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Bottom Pass\n").write(FDebug::Flush) ); + FLOG( FLog::Controller.write("\tStart Bottom Pass\n").write(FLog::Flush) ); FLOG( counterTime.tic() ); FLOG( double totalComputation = 0 ); @@ -114,15 +114,15 @@ public: } while(octreeIterator.moveRight()); FLOG( counterTime.tac() ); - FLOG( FDebug::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.elapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << totalComputation << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Bottom Pass (P2M) = " << counterTime.elapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << totalComputation << " s\n" ); } /** M2M */ void upwardPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Upward Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Upward Pass\n").write(FLog::Flush); ); FLOG( counterTime.tic() ); FLOG( double totalComputation = 0 ); @@ -165,19 +165,19 @@ public: avoidGotoLeftIterator.moveUp(); octreeIterator = avoidGotoLeftIterator;// equal octreeIterator.moveUp(); octreeIterator.gotoLeft(); - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } FLOG( counterTime.tac() ); - FLOG( FDebug::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.elapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << totalComputation << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Upward Pass (M2M) = " << counterTime.elapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << totalComputation << " s\n" ); } /** M2L */ void transferPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Downward Pass (M2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (M2L)\n").write(FLog::Flush); ); FLOG( counterTime.tic() ); FLOG( double totalComputation = 0 ); @@ -222,17 +222,17 @@ public: avoidGotoLeftIterator.moveDown(); octreeIterator = avoidGotoLeftIterator; - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } FLOG( counterTime.tac() ); - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.elapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << totalComputation << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (M2L) = " << counterTime.elapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << totalComputation << " s\n" ); } /** L2L */ void downardPass(){ - FLOG( FDebug::Controller.write("\tStart Downward Pass (L2L)\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Downward Pass (L2L)\n").write(FLog::Flush); ); FLOG( counterTime.tic() ); FLOG( double totalComputation = 0 ); @@ -266,12 +266,12 @@ public: avoidGotoLeftIterator.moveDown(); octreeIterator = avoidGotoLeftIterator; - FLOG( FDebug::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); + FLOG( FLog::Controller << "\t\t>> Level " << idxLevel << " = " << counterTimeLevel.tacAndElapsed() << "s\n" ); } FLOG( counterTime.tac() ); - FLOG( FDebug::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.elapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation : " << totalComputation << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Downward Pass (L2L) = " << counterTime.elapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation : " << totalComputation << " s\n" ); } @@ -279,7 +279,7 @@ public: /** P2P */ void directPass(){ FTRACE( FTrace::FFunction functionTrace(__FUNCTION__, "Fmm" , __FILE__ , __LINE__) ); - FLOG( FDebug::Controller.write("\tStart Direct Pass\n").write(FDebug::Flush); ); + FLOG( FLog::Controller.write("\tStart Direct Pass\n").write(FLog::Flush); ); FLOG( counterTime.tic() ); FLOG( double totalComputation = 0 ); @@ -302,8 +302,8 @@ public: } while(octreeIterator.moveRight()); FLOG( counterTime.tac() ); - FLOG( FDebug::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.elapsed() << "s)\n" ); - FLOG( FDebug::Controller << "\t\t Computation L2P + P2P : " << totalComputation << " s\n" ); + FLOG( FLog::Controller << "\tFinished (@Direct Pass (L2P + P2P) = " << counterTime.elapsed() << "s)\n" ); + FLOG( FLog::Controller << "\t\t Computation L2P + P2P : " << totalComputation << " s\n" ); } diff --git a/Src/Files/FFmaBinLoader.hpp b/Src/Files/FFmaBinLoader.hpp index 14f79efeaed4509e45dac3db7181a61ac2a48a6e..3c3f0ddaa0301dd4ccef9fc98a431cc4e036816c 100755 --- a/Src/Files/FFmaBinLoader.hpp +++ b/Src/Files/FFmaBinLoader.hpp @@ -22,7 +22,7 @@ #include "../Utils/FGlobal.hpp" #include "FAbstractLoader.hpp" #include "../Utils/FPoint.hpp" -#include "../Utils/FDebug.hpp" +#include "../Utils/FLog.hpp" /** * @author Berenger Bramas (berenger.bramas@inria.fr) @@ -72,7 +72,7 @@ public: int sizeOfElement(0); removeWarning += fread(&sizeOfElement, sizeof(int), 1, file); FLOG(if(sizeOfElement != int(sizeof(FReal)) ){) - FLOG( FDebug::Controller.writeFromLine("Warning type size between file and FReal are differents\n", __LINE__, __FILE__); ) + FLOG( FLog::Controller.writeFromLine("Warning type size between file and FReal are differents\n", __LINE__, __FILE__); ) printf("%d sizeofelement\n",sizeOfElement); FLOG(}) removeWarning += fread(&this->nbParticles, sizeof(FSize), 1, file); diff --git a/Src/Files/FMpiFmaLoader.hpp b/Src/Files/FMpiFmaLoader.hpp index 7e7ce768f400bae0e528a3a39fb10fe76c48f1c7..50878a4353a254ae616c6e82374dc09929197c0f 100755 --- a/Src/Files/FMpiFmaLoader.hpp +++ b/Src/Files/FMpiFmaLoader.hpp @@ -84,7 +84,7 @@ public: && MPI_File_read(file, xyzBoxWidth, 4, MPI_FLOAT, &status) == MPI_SUCCESS ){ FLOG(if(sizeOfElement != sizeof(FReal)){) - FLOG( FDebug::Controller.writeFromLine("Warning type size between file and FReal are differents\n", __LINE__, __FILE__); ) + FLOG( FLog::Controller.writeFromLine("Warning type size between file and FReal are differents\n", __LINE__, __FILE__); ) FLOG(}) this->boxWidth = xyzBoxWidth[3]; @@ -122,7 +122,7 @@ public: int count(0); MPI_Get_count(&status, MPI_INT, &count); FLOG(if(count / 4 != this->nbParticles){) - FLOG( FDebug::Controller<< "Error read " << count << " data, nbPart is " << this->nbParticles << __LINE__ << " " << __FILE__ << "\n"; ) + FLOG( FLog::Controller<< "Error read " << count << " data, nbPart is " << this->nbParticles << __LINE__ << " " << __FILE__ << "\n"; ) FLOG(}) } else{ @@ -139,7 +139,7 @@ public: int sizeOfElement(0); removeWarning += fread(&sizeOfElement, sizeof(int), 1, file); FLOG(if(sizeOfElement != int(sizeof(FReal)) ){) - FLOG( FDebug::Controller.writeFromLine("Warning type size between file and FReal are differents\n", __LINE__, __FILE__); ) + FLOG( FLog::Controller.writeFromLine("Warning type size between file and FReal are differents\n", __LINE__, __FILE__); ) FLOG(}) removeWarning += fread(&this->totalNbParticles, sizeof(FSize), 1, file); diff --git a/Src/Kernels/Taylor/FTaylorKernel.hpp b/Src/Kernels/Taylor/FTaylorKernel.hpp index dec55300e1db4078e266f9f7e90c3d245a4d4f3d..b4959072dabaa2a600a670592f6fb012719061e8 100644 --- a/Src/Kernels/Taylor/FTaylorKernel.hpp +++ b/Src/Kernels/Taylor/FTaylorKernel.hpp @@ -18,7 +18,7 @@ #include "../../Components/FAbstractKernels.hpp" #include "../../Utils/FMemUtils.hpp" -#include "../../Utils/FDebug.hpp" +#include "../../Utils/FLog.hpp" #include "../P2P/FP2P.hpp" diff --git a/Src/Kernels/Taylor/FTaylorKernelTempo.hpp b/Src/Kernels/Taylor/FTaylorKernelTempo.hpp index 7cbf6ed9e71bec3079137dd993376b319fcfea1a..441ae69fda5d812b968a232c5c717f6aea0bf9a1 100644 --- a/Src/Kernels/Taylor/FTaylorKernelTempo.hpp +++ b/Src/Kernels/Taylor/FTaylorKernelTempo.hpp @@ -18,7 +18,7 @@ #include "../../Components/FAbstractKernels.hpp" #include "../../Utils/FMemUtils.hpp" -#include "../../Utils/FDebug.hpp" +#include "../../Utils/FLog.hpp" #include "../P2P/FP2P.hpp" diff --git a/Src/Kernels/Taylor/FTaylorKernel_Boucle.hpp b/Src/Kernels/Taylor/FTaylorKernel_Boucle.hpp index ee817b0402acef16adbcc4f87b69f4ece756380d..671da9c05b726defcbf229ef0fd367270dcd2f6b 100644 --- a/Src/Kernels/Taylor/FTaylorKernel_Boucle.hpp +++ b/Src/Kernels/Taylor/FTaylorKernel_Boucle.hpp @@ -18,7 +18,7 @@ #include "../../Components/FAbstractKernels.hpp" #include "../../Utils/FMemUtils.hpp" -#include "../../Utils/FDebug.hpp" +#include "../../Utils/FLog.hpp" #include "../P2P/FP2P.hpp" diff --git a/Src/Kernels/Taylor/FTaylorKernel_Boucle2.hpp b/Src/Kernels/Taylor/FTaylorKernel_Boucle2.hpp index ffbed6d7903ee4eee5cc9dc2c981e5c07bfd5d28..146ba5278ff6ec6266ac953459c71758ec769012 100644 --- a/Src/Kernels/Taylor/FTaylorKernel_Boucle2.hpp +++ b/Src/Kernels/Taylor/FTaylorKernel_Boucle2.hpp @@ -18,7 +18,7 @@ #include "../../Components/FAbstractKernels.hpp" #include "../../Utils/FMemUtils.hpp" -#include "../../Utils/FDebug.hpp" +#include "../../Utils/FLog.hpp" #include "../P2P/FP2P.hpp" diff --git a/Src/Kernels/Taylor/FTaylorKernel_Boucle3.hpp b/Src/Kernels/Taylor/FTaylorKernel_Boucle3.hpp index b7eb7f6b217f05546c17c3cc8e03aea19d499c1c..9b24cb1b255257d92242edbe192052dcf5d8dafb 100644 --- a/Src/Kernels/Taylor/FTaylorKernel_Boucle3.hpp +++ b/Src/Kernels/Taylor/FTaylorKernel_Boucle3.hpp @@ -18,7 +18,7 @@ #include "../../Components/FAbstractKernels.hpp" #include "../../Utils/FMemUtils.hpp" -#include "../../Utils/FDebug.hpp" +#include "../../Utils/FLog.hpp" #include "../P2P/FP2P.hpp" diff --git a/Src/Kernels/Taylor/FTaylorKernel_Opt.hpp b/Src/Kernels/Taylor/FTaylorKernel_Opt.hpp index 88c013049142576821e19e667612f24f0e5dbe0d..ab2c4df9f6f6184945da2787ecba037bf9995050 100644 --- a/Src/Kernels/Taylor/FTaylorKernel_Opt.hpp +++ b/Src/Kernels/Taylor/FTaylorKernel_Opt.hpp @@ -18,7 +18,7 @@ #include "../../Components/FAbstractKernels.hpp" #include "../../Utils/FMemUtils.hpp" -#include "../../Utils/FDebug.hpp" +#include "../../Utils/FLog.hpp" #include "../P2P/FP2P.hpp" diff --git a/Src/Kernels/Taylor/FTaylorKernel_OptPreInd.hpp b/Src/Kernels/Taylor/FTaylorKernel_OptPreInd.hpp index cd5bbdf4c3f49d4aa2a3d07288265cdd4a8c4071..f8c8a7806a6059f744f4b8e88c028b32805d27e2 100644 --- a/Src/Kernels/Taylor/FTaylorKernel_OptPreInd.hpp +++ b/Src/Kernels/Taylor/FTaylorKernel_OptPreInd.hpp @@ -18,7 +18,7 @@ #include "../../Components/FAbstractKernels.hpp" #include "../../Utils/FMemUtils.hpp" -#include "../../Utils/FDebug.hpp" +#include "../../Utils/FLog.hpp" #include "../../Utils/FSmartPointer.hpp" #include "../P2P/FP2P.hpp" diff --git a/Src/Utils/FDebug.cpp b/Src/Utils/FLog.cpp similarity index 94% rename from Src/Utils/FDebug.cpp rename to Src/Utils/FLog.cpp index 11995fcecd4e79b2132e54df486852005e5132b7..d238c89fd94fedc0eae1073957223ef620a34f60 100755 --- a/Src/Utils/FDebug.cpp +++ b/Src/Utils/FLog.cpp @@ -13,14 +13,14 @@ // "http://www.cecill.info". // "http://www.gnu.org/licenses". // =================================================================================== -#include "FDebug.hpp" +#include "FLog.hpp" #ifdef ScalFMM_USE_LOG /** * Singleton debug */ -FDebug FDebug::Controller; +FLog FLog::Controller; diff --git a/Src/Utils/FDebug.hpp b/Src/Utils/FLog.hpp similarity index 79% rename from Src/Utils/FDebug.hpp rename to Src/Utils/FLog.hpp index a66b6be9be5c8e5609232f0ab4c9ace6cfea40fb..6b22e319c58e39a73f48a12d399fbbba7b1c80ce 100755 --- a/Src/Utils/FDebug.hpp +++ b/Src/Utils/FLog.hpp @@ -35,27 +35,27 @@ /** * @author Berenger Bramas (berenger.bramas@inria.fr) -* @class FDebug +* @class FLog * Please read the license * * This class is used to print debug data durint processing. * You have to use the DEBUG macro as shown in the example. * * <code> -* FLOG( FDebug::Controller.writeFromLine("hello World", __LINE__, __FILE__); ) <br> -* FLOG( FDebug::Controller << "I want to debug " << toto << "\n"; ) +* FLOG( FLog::Controller.writeFromLine("hello World", __LINE__, __FILE__); ) <br> +* FLOG( FLog::Controller << "I want to debug " << toto << "\n"; ) * </code> */ -class FDebug : public FNoCopyable { +class FLog : public FNoCopyable { private: std::ostream* stream; //< Standart c++ ostream /** Default constructor forbiden */ - FDebug() : stream(&std::cout) { + FLog() : stream(&std::cout) { } /** Default destructor forbiden */ - virtual ~FDebug(){ + virtual ~FLog(){ close(); } @@ -70,7 +70,7 @@ private: } public: - static FDebug Controller; //< Singleton + static FLog Controller; //< Singleton /** * To set the debug stream to write into a file @@ -96,20 +96,20 @@ public: /** * stream operator to print debug data * @param inMessage a message - from any type - to print - * @return current FDebug + * @return current FLog */ template <class T> - FDebug& operator<<(const T& inMessage){ + FLog& operator<<(const T& inMessage){ return write(inMessage); } /** * to write debug data * @param inMessage a message - from any type - to print - * @return current FDebug + * @return current FLog */ template <class T> - FDebug& write(const T& inMessage){ + FLog& write(const T& inMessage){ (*this->stream) << inMessage; return *this; } @@ -127,9 +127,9 @@ public: /** * stream operator to flush debug data * @param inType flush type - * @return current FDebug + * @return current FLog */ - FDebug& write(const FlushType inType){ + FLog& write(const FlushType inType){ if(inType == FlushWithLine) (*this->stream) << '\n'; flush(); return *this; @@ -140,14 +140,14 @@ public: * @param inMessage a message - from any type - to print * @param inLinePosition line number * @param inFilePosition file name - * @return current FDebug + * @return current FLog * - * <code> FDebug::Controller.writeFromLine("hello World", __LINE__, __FILE__); </code> + * <code> FLog::Controller.writeFromLine("hello World", __LINE__, __FILE__); </code> * * To prevent use from multiple thread we use a ostringstream before printing */ template <class T, class Tline, class Tfile> - FDebug& writeFromLine(const T& inMessage, const Tline& inLinePosition, const Tfile& inFilePosition){ + FLog& writeFromLine(const T& inMessage, const Tline& inLinePosition, const Tfile& inFilePosition){ std::ostringstream oss; oss << "Message from " << inFilePosition << " (at line " << inLinePosition <<")\n"; oss << ">> " << inMessage << "\n"; @@ -162,14 +162,14 @@ public: * @param inValue variable value * @param inLinePosition line number * @param inFilePosition file name - * @return current FDebug + * @return current FLog * - * <code> FDebug::Controller.writeVariableFromLine( "toto", toto, __LINE__, __FILE__); </code> + * <code> FLog::Controller.writeVariableFromLine( "toto", toto, __LINE__, __FILE__); </code> * * To prevent use from multiple thread we use a ostringstream before printing */ template <class T, class Tline, class Tfile> - FDebug& writeVariableFromLine(const char* const inVariable, const T& inValue, const Tline& inLinePosition, const Tfile& inFilePosition){ + FLog& writeVariableFromLine(const char* const inVariable, const T& inValue, const Tline& inLinePosition, const Tfile& inFilePosition){ std::ostringstream oss; oss << "[Value] " << inVariable << " = " << inValue << " at line " << inLinePosition <<" (file " << inFilePosition << ")\n"; diff --git a/Src/Utils/FSpherical.hpp b/Src/Utils/FSpherical.hpp index 9fe1b1c0a502bbd4140731579ac4d4be19b030dc..e5ecb6748b929e38ffb29fd68eee8c53b1b06a2e 100755 --- a/Src/Utils/FSpherical.hpp +++ b/Src/Utils/FSpherical.hpp @@ -19,7 +19,7 @@ #include "FGlobal.hpp" #include "FMath.hpp" #include "FPoint.hpp" -#include "FDebug.hpp" +#include "FLog.hpp" /** * This class is a Spherical position @@ -59,7 +59,7 @@ public: this->sinTheta = FMath::Sqrt(x2y2) / r; this->theta = FMath::ACos(this->cosTheta); // if r == 0 we cannot divide! - FLOG(if( r < FMath::Epsilon ) FDebug::Controller << "!!! In FSpherical, r == 0!\n"; ) + FLOG(if( r < FMath::Epsilon ) FLog::Controller << "!!! In FSpherical, r == 0!\n"; ) } /** Get the radius */ diff --git a/Tests/Kernels/testTaylorKernel.cpp b/Tests/Kernels/testTaylorKernel.cpp index d34217d03c3f2593e6094ec9ac3520e6c9b741ed..42c758faf3ff77d9ee0de322d0308629d536df4e 100644 --- a/Tests/Kernels/testTaylorKernel.cpp +++ b/Tests/Kernels/testTaylorKernel.cpp @@ -17,7 +17,7 @@ #include <string> #include "../../Src/Utils/FPoint.hpp" -#include "../../Src/Utils/FDebug.hpp" +#include "../../Src/Utils/FLog.hpp" #include "../../Src/Utils/FMath.hpp" #include "../../Src/Kernels/Taylor/FTaylorCell.hpp" diff --git a/Tests/Kernels/testTaylorSimple.cpp b/Tests/Kernels/testTaylorSimple.cpp index 8b2ce1e02df097eb0244b12343236b36c5c9b7f8..828be198d300111320e21d615ad62e39ce852970 100644 --- a/Tests/Kernels/testTaylorSimple.cpp +++ b/Tests/Kernels/testTaylorSimple.cpp @@ -3,7 +3,7 @@ #include <string> #include "../../Src/Utils/FPoint.hpp" -#include "../../Src/Utils/FDebug.hpp" +#include "../../Src/Utils/FLog.hpp" #include "../../Src/Utils/FMath.hpp" #include "../../Src/Utils/FParameters.hpp" diff --git a/Tests/Utils/testDebug.cpp b/Tests/Utils/testDebug.cpp index 8073b8cc69f7794db19dcda22e4196beb79e6853..51bfaa90960ce9a8b82beb939d7b39f2aa874d11 100755 --- a/Tests/Utils/testDebug.cpp +++ b/Tests/Utils/testDebug.cpp @@ -13,35 +13,35 @@ // "http://www.cecill.info". // "http://www.gnu.org/licenses". // =================================================================================== -#include "../../Src/Utils/FDebug.hpp" +#include "../../Src/Utils/FLog.hpp" /** * In this file we show how to use the debug module. -* Warning, in FGlobal.hpp (included in FDebug.hpp) SCALFMM_USE_DEBUG might be undefined. +* Warning, in FGlobal.hpp (included in FLog.hpp) SCALFMM_USE_DEBUG might be undefined. */ int main(void){ ///////////////////////What we do///////////////////////////// std::cout << ">> This executable is useless to execute.\n"; std::cout << ">> It is only interesting to wath the code to understand\n"; - std::cout << ">> to understand the FDebug system.\n"; + std::cout << ">> to understand the FLog system.\n"; ////////////////////////////////////////////////////////////// // Print data simply - FLOG( FDebug::Controller << "Hello Wordl\n"); + FLOG( FLog::Controller << "Hello Wordl\n"); // Print a variable (formated print) int i = 50; - FLOG( FDebug::Controller.writeVariableFromLine( "i", i, __LINE__, __FILE__);); + FLOG( FLog::Controller.writeVariableFromLine( "i", i, __LINE__, __FILE__);); // Write a developer information - FLOG( FDebug::Controller.writeFromLine("Strange things are there!", __LINE__, __FILE__); ) + FLOG( FLog::Controller.writeFromLine("Strange things are there!", __LINE__, __FILE__); ) // Flush - FLOG( FDebug::Controller << FDebug::Flush ); + FLOG( FLog::Controller << FLog::Flush ); // Change stream type - FLOG( FDebug::Controller.writeToFile("testDebug.out.temp"); ) - FLOG( FDebug::Controller << "Hello Wordl 2 the return\n"); + FLOG( FLog::Controller.writeToFile("testDebug.out.temp"); ) + FLOG( FLog::Controller << "Hello Wordl 2 the return\n"); return 0; }