Commit ee0dd347 authored by berenger-bramas's avatar berenger-bramas
Browse files

Debug the Parallel loading, seems to work.

Need more test, and need to remove debug print.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@178 2616d619-271b-44dc-8df4-d4a8f33a7222
parent b9105ae4
This diff is collapsed.
......@@ -257,19 +257,16 @@ int main(int argc, char ** argv){
std::cout << "\tHeight : " << NbLevels << " \t sub-height : " << SizeSubLevels << std::endl;
counter.tic();
{
// Buffer data
OctreeClass treeInterval(NbLevels, SizeSubLevels,loader.getBoxWidth(),loader.getCenterOfBox());
int myNbParticlesCounter = 0;
if( app.processCount() != 1){
//////////////////////////////////////////////////////////////////////////////////
// We sort our particles
//////////////////////////////////////////////////////////////////////////////////
std::cout << "Create intervals ..." << std::endl;
counter.tic();
FMpiTreeBuilder<ContainerClass, ParticleClass>::SplitAndSortFile(treeInterval,myNbParticlesCounter,loader);
//FMpiTreeBuilder<ContainerClass, ParticleClass>::SplitAndSortFileWithoutQS(treeInterval,myNbParticlesCounter,loader);
FMpiTreeBuilder<ParticleClass> builder;
builder.splitAndSortFile(loader, NbLevels);
counter.tac();
std::cout << "Done " << "(" << counter.elapsed() << "s)." << std::endl;
......@@ -280,16 +277,20 @@ int main(int argc, char ** argv){
std::cout << "Create real tree ..." << std::endl;
counter.tic();
FMpiTreeBuilder<ContainerClass, ParticleClass>::IntervalsToTree(tree,treeInterval,myNbParticlesCounter);
builder.intervalsToTree(tree);
counter.tac();
std::cout << "Done " << "(" << counter.elapsed() << "s)." << std::endl;
//////////////////////////////////////////////////////////////////////////////////
app.processBarrier();
//////////////////////////////////////////////////////////////////////////////////
}
else{
FFmaBinLoader<ParticleClass> loaderSeq(filename);
ParticleClass partToInsert;
for(int idxPart = 0 ; idxPart < loaderSeq.getNumberOfParticles() ; ++idxPart){
loaderSeq.fillParticle(partToInsert);
tree.insert(partToInsert);
}
}
counter.tac();
......
......@@ -340,19 +340,16 @@ int main(int argc, char ** argv){
// The real tree to work on
OctreeClass realTree(NbLevels, SizeSubLevels,loader.getBoxWidth(),loader.getCenterOfBox());
{
// Buffer data
OctreeClass treeInterval(NbLevels, SizeSubLevels,loader.getBoxWidth(),loader.getCenterOfBox());
int myNbParticlesCounter = 0;
if( app.processCount() != 1){
//////////////////////////////////////////////////////////////////////////////////
// We sort our particles
//////////////////////////////////////////////////////////////////////////////////
std::cout << "Create intervals ..." << std::endl;
counter.tic();
FMpiTreeBuilder<ContainerClass, ParticleClass>::SplitAndSortFile(treeInterval,myNbParticlesCounter,loader);
//FMpiTreeBuilder<ContainerClass, ParticleClass>::SplitAndSortFileWithoutQS(treeInterval,myNbParticlesCounter,loader);
FMpiTreeBuilder<ParticleClass> builder;
builder.splitAndSortFile(loader, NbLevels);
counter.tac();
std::cout << "Done " << "(" << counter.elapsed() << "s)." << std::endl;
......@@ -363,16 +360,20 @@ int main(int argc, char ** argv){
std::cout << "Create real tree ..." << std::endl;
counter.tic();
FMpiTreeBuilder<ContainerClass, ParticleClass>::IntervalsToTree(realTree,treeInterval,myNbParticlesCounter);
builder.intervalsToTree(realTree);
counter.tac();
std::cout << "Done " << "(" << counter.elapsed() << "s)." << std::endl;
//////////////////////////////////////////////////////////////////////////////////
app.processBarrier();
//////////////////////////////////////////////////////////////////////////////////
}
else{
FFmaBinLoader<ParticleClass> loaderSeq(filename);
ParticleClass partToInsert;
for(int idxPart = 0 ; idxPart < loaderSeq.getNumberOfParticles() ; ++idxPart){
loaderSeq.fillParticle(partToInsert);
realTree.insert(partToInsert);
}
}
//////////////////////////////////////////////////////////////////////////////////
......
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