Commit c728d98f authored by COULAUD Olivier's avatar COULAUD Olivier

Bug in the nearField is closed. But there is a problem in the farfield git statusgit status

parent 89e17b15
......@@ -223,7 +223,7 @@ int main(int argc, char* argv[])
// -----------------------------------------------------
std::vector<MortonIndex> mortonLeafDistribution(2*app.global().processCount());
FAbstractAlgorithm * algorithm = nullptr;
//FAlgorithmTimers * timer = nullptr;
FAlgorithmTimers * timer = nullptr;
{ // -----------------------------------------------------
std::cout << "\n"<<interpolationType<<" FMM Proc (ORDER="<< ORDER << ") ... " << std::endl;
......@@ -245,26 +245,18 @@ int main(int argc, char* argv[])
///////////////////////////////////////////////////////////////////////////////////////////////////
if(! periodicCondition) {// Non periodic case
algorithm = &algoNoPer ;
//timer = &algoNoPer ;
timer = &algoNoPer ;
}
else { // Periodic case
algorithm = &algoPer ;
//timer = &algoPer ;
timer = &algoPer ;
}
//
// FMM exectution FFmmFarField FFmmNearField
algorithm->execute(FFmmNearField);
algorithm->execute(FFmmFarField);
//
algorithm->getMortonLeafDistribution(mortonLeafDistribution);
// auto nbProcess = app.global().processCount() ;
// auto level = tree.getHeight()- 1;
// for (int i =0; i < nbProcess ; ++i){
// auto I = algoPer.getWorkingInterval(level, i);
// mortonLeafDistribution[2*i] = I.leftIndex;
// mortonLeafDistribution[2*i+1] = I.rightIndex;
// }
// if(app.global().processId() == 0)
{
std::cout << app.global().processId() <<" Morton distribution "<< std::endl ;
......@@ -283,6 +275,14 @@ int main(int argc, char* argv[])
std::cout << "exec-time-min:" << minTime
<< " exec-time-max:" << maxTime
<< std::endl;
std::cout << "Timers Far Field \n"
<< "P2M " << timer->getTime(FAlgorithmTimers::P2MTimer) << " seconds\n"
<< "M2M " << timer->getTime(FAlgorithmTimers::M2MTimer) << " seconds\n"
<< "M2L " << timer->getTime(FAlgorithmTimers::M2LTimer) << " seconds\n"
<< "L2L " << timer->getTime(FAlgorithmTimers::L2LTimer) << " seconds\n"
<< "P2P and L2P " << timer->getTime(FAlgorithmTimers::NearTimer) << " seconds\n"
<< std::endl;
}
}
......@@ -332,10 +332,13 @@ int main(int argc, char* argv[])
FReal gloEnergy = app.global().reduceSum(energy);
FReal TotalPhysicalValue = app.global().reduceSum(locTotalPhysicalValue);
if(0 == app.global().processId()){
std::cout <<std::endl<<"aboveRoot: " << aboveTree << " Energy: "<< energy<<" TotalPhysicalValue: " << TotalPhysicalValue<< std::endl; std::cout <<std::endl << "Proc "<< app.global().processId() << " Energy: "<< gloEnergy <<std::endl;
std::cout <<std::endl<<"aboveRoot: " << aboveTree << " Energy: "<< gloEnergy <<" TotalPhysicalValue: " << TotalPhysicalValue<< std::endl;
std::cout <<std::endl <<" &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& "<<std::endl<<std::endl;
}
}
// -----------------------------------------------------
if(FParameters::existParameter(argc, argv, FParameterDefinitions::OutputFile.options)){
std::string name(FParameters::getStr(argc,argv,FParameterDefinitions::OutputFile.options, "output.fma"));
......
......@@ -104,7 +104,7 @@ int main(int argc, char* argv[])
if(FParameters::existParameter(argc, argv, FParameterDefinitions::PeriodicityNbLevels.options)){
periodicCondition = true;
}
const unsigned int aboveTree = FParameters::getValue(argc, argv, FParameterDefinitions::PeriodicityNbLevels.options, -2);
const unsigned int aboveTree = FParameters::getValue(argc, argv, FParameterDefinitions::PeriodicityNbLevels.options, -1);
#ifdef _OPENMP
const unsigned int NbThreads = periodicCondition ? 1 : FParameters::getValue(argc, argv, FParameterDefinitions::NbThreads.options, omp_get_max_threads());
......@@ -199,7 +199,7 @@ int main(int argc, char* argv[])
}
//
algorithm->execute(); // Here the call of the FMM algorithm
algorithm->execute(FFmmFarField); // Here the call of the FMM algorithm
//
time.tac();
std::cout << "Timers Far Field \n"
......
......@@ -1970,7 +1970,6 @@ protected:
for(int idxNeig = 0 ; idxNeig < counter ; ++idxNeig){
if( !offsets[idxNeig].equals(0,0,0) ){ // We need to move the cell
//
/// NEW NEW NEW NEW NEW NEW
// Put periodic cell into another cell (copy data)
periodicNeighbors[periodicNeighborsCounter] = new ContainerClass(*(neighbors[idxNeig])) ;
// newPos = pos + ofsset
......@@ -2057,8 +2056,7 @@ protected:
FAssertLF(leafsNeedOtherData.getSize() < std::numeric_limits<int>::max());
const int nbLeafToProceed = int(leafsNeedOtherData.getSize());
// std::cout << "Treat communications " << nbLeafToProceed <<std::endl;
//#pragma omp for schedule(dynamic, userChunkSize)
#pragma omp single
#pragma omp for schedule(dynamic, userChunkSize)
for(int idxLeafs = 0 ; idxLeafs < nbLeafToProceed ; ++idxLeafs){
LeafData currentIter = leafsNeedOtherData[idxLeafs];
......
This diff is collapsed.
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