Commit 12dd385c authored by COULAUD Olivier's avatar COULAUD Olivier

Fix bug with optidis. The level in rootcell should be set in the construcor...

Fix bug with optidis. The level in rootcell should be set in the construcor (needed in M2M operator)
parent b126bba0
// ==== CMAKE ===== // ==== CMAKE =====
// @FUSE_BLAS // @FUSE_BLAS
// ================
// Keep in private GIT
// @FUSE_MPI // @FUSE_MPI
// @FUSE_STARPU // @FUSE_STARPU
// //
......
// ==== CMAKE ===== // ==== CMAKE =====
// @FUSE_BLAS // @FUSE_BLAS
// ================
// Keep in private GIT
// @FUSE_MPI // @FUSE_MPI
// @FUSE_STARPU // @FUSE_STARPU
// //
......
...@@ -210,6 +210,7 @@ public: ...@@ -210,6 +210,7 @@ public:
FAssertLF(leafLevelSeparationCriteria < 3, "Separation criteria should be < 3"); FAssertLF(leafLevelSeparationCriteria < 3, "Separation criteria should be < 3");
FAbstractAlgorithm::setNbLevelsInTree(extendedTreeHeight()); FAbstractAlgorithm::setNbLevelsInTree(extendedTreeHeight());
rootCellFromProc.setLevel(offsetRealTree);
FLOG(FLog::Controller << "FFmmAlgorithmThreadProcPeriodic\n"); FLOG(FLog::Controller << "FFmmAlgorithmThreadProcPeriodic\n");
FLOG(FLog::Controller << "Max threads = " << MaxThreads << ", Procs = " << nbProcess << ", I am " << idProcess << ".\n"); FLOG(FLog::Controller << "Max threads = " << MaxThreads << ", Procs = " << nbProcess << ", I am " << idProcess << ".\n");
...@@ -2386,7 +2387,7 @@ public: ...@@ -2386,7 +2387,7 @@ public:
// the root level of the octree in the virtual array of cells // the root level of the octree in the virtual array of cells
const int rootLevel = offsetRealTree-1 ; const int rootLevel = offsetRealTree-1 ;
rootCellFromProc.setLevel(rootLevel+1); // rootCellFromProc.setLevel(rootLevel+1);
if( nbLevelsAboveRoot != -1 ){ if( nbLevelsAboveRoot != -1 ){
// we will use offsetRealTree-1 cells but for simplicity allocate offsetRealTree // we will use offsetRealTree-1 cells but for simplicity allocate offsetRealTree
......
...@@ -92,6 +92,16 @@ FSize compareTwoArrays(const std::string &tag, const FSize &nbParticles, const ...@@ -92,6 +92,16 @@ FSize compareTwoArrays(const std::string &tag, const FSize &nbParticles, const
fz.add(array1[idxPart].getForces()[2],array2[idxPart].getForces()[2]); fz.add(array1[idxPart].getForces()[2],array2[idxPart].getForces()[2]);
energy1 += array1[idxPart].getPhysicalValue() *array1[idxPart].getPotential() ; energy1 += array1[idxPart].getPhysicalValue() *array1[idxPart].getPotential() ;
energy2 += array2[idxPart].getPhysicalValue() *array2[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] <<std::endl ;
std::cout << idxPart << " " << array2[idxPart].getPotential()
<< " " << array2[idxPart].getForces()[0]
<< " " << array2[idxPart].getForces()[1]
<< " " << array2[idxPart].getForces()[2] <<std::endl ;
}
} }
// Print for information // Print for information
std::cout << tag<< " Energy " << FMath::Abs(energy1-energy2) << " " std::cout << tag<< " Energy " << FMath::Abs(energy1-energy2) << " "
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#SBATCH -m a #SBATCH -m a
# #
#SBATCH -p court #SBATCH -p court
#SBATCH --time=20:00 #SBATCH --time=60:00
#SBATCH --nodes=1 #SBATCH --nodes=1
#SBATCH --ntasks-per-node=24 #SBATCH --ntasks-per-node=24
# #
...@@ -66,25 +66,33 @@ PER_SIZE="4 8 12 16 20 24" ...@@ -66,25 +66,33 @@ PER_SIZE="4 8 12 16 20 24"
HOST=`hostname` HOST=`hostname`
NBTEST=3 # 0..NBTEST NBTEST=3 # 0..NBTEST
DISTRIB=(unitcube unitsphere prolate plummer) DISTRIB=(unitcube unitsphere prolate plummer)
DEPTH=(6 7 9 8) DEPTH=(6 7 9 8) # 1M
ALGO=(task newtask sectiontask) #DEPTH=(7 8 10 9) # 10M
if test ${#DISTRIB[*]} -ne ${#DEPTH[*]}
then
echo " DEPTH and DISTRIB arrays don't have se same size"
exit
fi
ALGO=(task newtask sectiontask omp4)
# #
pwd pwd
export OMP_PROC_BIND=true export OMP_PROC_BIND=true
#export KMP_AFFINITY=scatter
NUM=`git rev-list HEAD --count` NUM=`git rev-list HEAD --count`
echo $DISTRIB echo $DISTRIB
mkdir ${DATE} mkdir ${DATE}
for dist in `seq 0 $NBTEST`; for dist in ${!DISTRIB[*]} ;
do do
echo "Distribution: " $dist ${DISTRIB[$dist]} " depth octree " ${DEPTH[$dist]} echo "Distribution: " $dist ${DISTRIB[$dist]} " depth octree " ${DEPTH[$dist]}
FILE=${data_dir}/${DISTRIB[$dist]}-1M-ref.bfma FILE=${data_dir}/${DISTRIB[$dist]}-1M-ref.bfma #1M
# FILE=${data_dir}/${DISTRIB[$dist]}-10M.bfma #10M
FILEGNU=${DISTRIB[$dist]}-${Interp}.txt FILEGNU=${DISTRIB[$dist]}-${Interp}.txt
mkdir ${DATE}/${DISTRIB[$dist]} mkdir ${DATE}/${DISTRIB[$dist]}
touch $FILEGNU touch $FILEGNU
# #
# Loop on algorithm # Loop on algorithm
for a in `seq 0 2`; for a in ${!ALGO[*]} ;
do do
echo "# Core GlabalTIME P2PTIME M2LTIME MALLOC FREE MEMUse ENERGY PotentialError ForceError"> $FILEPERF-${DISTRIB[$dist]}-${ALGO[$a]}.out echo "# Core GlabalTIME P2PTIME M2LTIME MALLOC FREE MEMUse ENERGY PotentialError ForceError"> $FILEPERF-${DISTRIB[$dist]}-${ALGO[$a]}.out
# One computation # One computation
...@@ -93,7 +101,8 @@ echo "# Core GlabalTIME P2PTIME M2LTIME MALLOC FREE MEMUse ENERGY PotentialE ...@@ -93,7 +101,8 @@ echo "# Core GlabalTIME P2PTIME M2LTIME MALLOC FREE MEMUse ENERGY PotentialE
OUTPUT=${FILEPERF}-${DISTRIB[$dist]}-${ALGO[$a]}-${l}.out OUTPUT=${FILEPERF}-${DISTRIB[$dist]}-${ALGO[$a]}-${l}.out
echo "ScalFMM git version: " $NUM > $OUTPUT echo "ScalFMM git version: " $NUM > $OUTPUT
echo "Running on " ${l} " threads with algo " ${ALGO[$a]} 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}'` TIME=`grep "@Algorithm" $OUTPUT | awk '{print $4}'`
TIMEP2P=`grep "P2P" $OUTPUT | grep "second" | awk '{print $4}'` TIMEP2P=`grep "P2P" $OUTPUT | grep "second" | awk '{print $4}'`
......
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