From 12dd385c6d20597ab03264af792ff4015754041c Mon Sep 17 00:00:00 2001 From: Olivier Coulaud Date: Wed, 4 Jul 2018 16:51:02 +0200 Subject: [PATCH] Fix bug with optidis. The level in rootcell should be set in the construcor (needed in M2M operator) --- Examples/ChebyshevStarpuImplicit.cpp | 2 -- Examples/LagrangeStarpuImplicit.cpp | 2 -- Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp | 3 ++- Src/Utils/FCompareResults.hpp | 10 ++++++++ Utils/scripts/cmpOpenMPAlgo.slurm | 25 +++++++++++++------- 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/Examples/ChebyshevStarpuImplicit.cpp b/Examples/ChebyshevStarpuImplicit.cpp index d7f2b534..8b9fe7e4 100644 --- a/Examples/ChebyshevStarpuImplicit.cpp +++ b/Examples/ChebyshevStarpuImplicit.cpp @@ -1,7 +1,5 @@ // ==== CMAKE ===== // @FUSE_BLAS -// ================ -// Keep in private GIT // @FUSE_MPI // @FUSE_STARPU // diff --git a/Examples/LagrangeStarpuImplicit.cpp b/Examples/LagrangeStarpuImplicit.cpp index f433e7e6..e13b567f 100644 --- a/Examples/LagrangeStarpuImplicit.cpp +++ b/Examples/LagrangeStarpuImplicit.cpp @@ -1,7 +1,5 @@ // ==== CMAKE ===== // @FUSE_BLAS -// ================ -// Keep in private GIT // @FUSE_MPI // @FUSE_STARPU // diff --git a/Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp b/Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp index b0676205..80551d43 100644 --- a/Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp +++ b/Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp @@ -210,6 +210,7 @@ public: FAssertLF(leafLevelSeparationCriteria < 3, "Separation criteria should be < 3"); FAbstractAlgorithm::setNbLevelsInTree(extendedTreeHeight()); + rootCellFromProc.setLevel(offsetRealTree); FLOG(FLog::Controller << "FFmmAlgorithmThreadProcPeriodic\n"); FLOG(FLog::Controller << "Max threads = " << MaxThreads << ", Procs = " << nbProcess << ", I am " << idProcess << ".\n"); @@ -2386,7 +2387,7 @@ public: // the root level of the octree in the virtual array of cells const int rootLevel = offsetRealTree-1 ; - rootCellFromProc.setLevel(rootLevel+1); + // rootCellFromProc.setLevel(rootLevel+1); if( nbLevelsAboveRoot != -1 ){ // we will use offsetRealTree-1 cells but for simplicity allocate offsetRealTree diff --git a/Src/Utils/FCompareResults.hpp b/Src/Utils/FCompareResults.hpp index 1171889d..e6125222 100644 --- a/Src/Utils/FCompareResults.hpp +++ b/Src/Utils/FCompareResults.hpp @@ -92,6 +92,16 @@ FSize compareTwoArrays(const std::string &tag, const FSize &nbParticles, const fz.add(array1[idxPart].getForces()[2],array2[idxPart].getForces()[2]); energy1 += array1[idxPart].getPhysicalValue() *array1[idxPart].getPotential() ; energy2 += array2[idxPart].getPhysicalValue() *array2[idxPart].getPotential() ; + if(idxPart==0){ + std::cout << idxPart << " " << array1[idxPart].getPotential() + << " " << array1[idxPart].getForces()[0] + << " " << array1[idxPart].getForces()[1] + << " " << array1[idxPart].getForces()[2] < $FILEPERF-${DISTRIB[$dist]}-${ALGO[$a]}.out # One computation @@ -93,7 +101,8 @@ echo "# Core GlabalTIME P2PTIME M2LTIME MALLOC FREE MEMUse ENERGY PotentialE OUTPUT=${FILEPERF}-${DISTRIB[$dist]}-${ALGO[$a]}-${l}.out echo "ScalFMM git version: " $NUM > $OUTPUT echo "Running on " ${l} " threads with algo " ${ALGO[$a]} - $EXEC ${OPTION} -f $FILE -depth ${DEPTH[$dist]} -subdepth 4 -t $l -cmp -algo ${ALGO[$a]}>> $OUTPUT + $EXEC ${OPTION} -f $FILE -depth ${DEPTH[$dist]} -subdepth 4 -t $l -cmp -algo ${ALGO[$a]}>> $OUTPUT #1M +# $EXEC ${OPTION} -f $FILE -depth ${DEPTH[$dist]} -subdepth 4 -t $l -algo ${ALGO[$a]}>> $OUTPUT #10M # TIME=`grep "@Algorithm" $OUTPUT | awk '{print $4}'` TIMEP2P=`grep "P2P" $OUTPUT | grep "second" | awk '{print $4}'` -- 2.22.0