Commit d9a0a706 authored by berenger-bramas's avatar berenger-bramas

Working MPI version

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@63 2616d619-271b-44dc-8df4-d4a8f33a7222
parent 6107e4cf
This diff is collapsed.
......@@ -37,7 +37,7 @@
// Threads
///////////////////////////////////////////////////////
static const int FThreadNumbers = 2;
static const int FThreadNumbers = 1;
///////////////////////////////////////////////////////
// Types
......
......@@ -49,6 +49,11 @@ struct FMath{
return floor(inValue);
}
/** To get ceil of a FReal */
static FReal Ceil(const FReal inValue){
return ceil(inValue);
}
/** To get pow */
template <class NumType>
static NumType pow(const NumType inValue, long power){
......
......@@ -21,6 +21,8 @@
#include "../Src/Extenssions/FExtendPhysicalValue.hpp"
#include "../Src/Core/FFmmAlgorithmThreadProc.hpp"
#include "../Src/Core/FFmmAlgorithmThread.hpp"
#include "../Src/Files/FFmaLoader.hpp"
......@@ -44,7 +46,7 @@ public:
class FTestCellPar : public FTestCell{
public :
void addCell(const FTestCellPar& other){
setDataUp(this->getDataUp() + other.getDataUp());
//setDataUp(this->getDataUp() + other.getDataUp());
setDataDown(this->getDataDown() + other.getDataDown());
}
};
......@@ -78,7 +80,6 @@ int main(int argc, char ** argv){
return 1;
}
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
......@@ -99,6 +100,8 @@ int main(int argc, char ** argv){
FOctree<TestParticle, FTestCellPar, FSimpleLeaf, NbLevels, SizeSubLevels> tree(loader.getBoxWidth(),loader.getCenterOfBox());
FOctree<TestParticle, FTestCellPar, FSimpleLeaf, NbLevels, SizeSubLevels> treeValide(loader.getBoxWidth(),loader.getCenterOfBox());
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
......@@ -106,6 +109,7 @@ int main(int argc, char ** argv){
counter.tic();
for(long idxPart = 0 ; idxPart < loader.getNumberOfParticles() ; ++idxPart){
tree.insert(&particles[idxPart]);
treeValide.insert(&particles[idxPart]);
}
counter.tac();
std::cout << "Done " << "(" << counter.elapsed() << "s)." << std::endl;
......@@ -116,19 +120,21 @@ int main(int argc, char ** argv){
std::cout << "Working on particles ..." << std::endl;
counter.tic();
// FTestKernels FBasicKernels
FTestKernels<TestParticle, FTestCellPar, NbLevels> kernels;
//FFmmAlgorithm FFmmAlgorithmThreaded FFmmAlgorithmThreadProc
FFmmAlgorithmThreadProc<FTestKernels, TestParticle, FTestCellPar, FSimpleLeaf, NbLevels, SizeSubLevels> algo(&tree,&kernels,argc,argv);
algo.execute();
FFmmAlgorithmThread<FTestKernels, TestParticle, FTestCellPar, FSimpleLeaf, NbLevels, SizeSubLevels> algoValide(&treeValide,&kernels);
algoValide.execute();
counter.tac();
std::cout << "Done " << "(" << counter.elapsed() << "s)." << std::endl;
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
algo.ValidateFMMAlgoProc();
algo.ValidateFMMAlgoProc(&treeValide);
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
......
......@@ -24,7 +24,7 @@ int main(int argc, char ** argv){
//////////////////////////////////////////////////////////////
// Nb of particles
const long NbParticles = 200000;
const long NbParticles = 20;
// Center of the box
const FReal XCenter = 0.5;
......
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