Commit 31681394 authored by Martin Khannouz's avatar Martin Khannouz Committed by Berenger Bramas

Change implicit algorithm to symetrize task so there is no error in the

dag comparing.

Still there is errors in the result of the core algorithm.
parent 155192b0
...@@ -29,12 +29,12 @@ struct Task ...@@ -29,12 +29,12 @@ struct Task
{ {
if(type != other.type || id.size() != other.id.size()) if(type != other.type || id.size() != other.id.size())
return false; return false;
if(type == P2P_OUT) //Symétrisation //if(type == P2P_OUT) //Symétrisation
if(id[0] == other.id[2] && id[1] == other.id[3] && id[2] == other.id[0] && id[3] == other.id[1]) //if(id[0] == other.id[2] && id[1] == other.id[3] && id[2] == other.id[0] && id[3] == other.id[1])
return true; //return true;
if(type == M2L_OUT) //Symétrisation //if(type == M2L_OUT) //Symétrisation
if(id[1] == other.id[3] && id[2] == other.id[4] && id[3] == other.id[1] && id[4] == other.id[2]) //if(id[1] == other.id[3] && id[2] == other.id[4] && id[3] == other.id[1] && id[4] == other.id[2])
return true; //return true;
for(size_t i = 0; i < id.size(); ++i) for(size_t i = 0; i < id.size(); ++i)
if(id[i] != other.id[i]) if(id[i] != other.id[i])
...@@ -414,7 +414,7 @@ int main(int argc, char* argv[]) ...@@ -414,7 +414,7 @@ int main(int argc, char* argv[])
{ {
cout << explicitData.allTask.size() << " tasks in explicit." << endl; cout << explicitData.allTask.size() << " tasks in explicit." << endl;
cout << implicitData.allTask.size() << " tasks in implicit." << endl; cout << implicitData.allTask.size() << " tasks in implicit." << endl;
compareDag(implicitData, explicitData, treeHeight); compareDag(explicitData, implicitData, treeHeight);
} }
return 0; return 0;
} }
...@@ -7,7 +7,7 @@ using namespace std; ...@@ -7,7 +7,7 @@ using namespace std;
#include "../../Src/Utils/FGlobal.hpp" #include "../../Src/Utils/FGlobal.hpp"
#include "../../Src/GroupTree/Core/FGroupTreeBerenger.hpp" #include "../../Src/GroupTree/Core/FGroupTree.hpp"
#include "../../Src/Components/FSimpleLeaf.hpp" #include "../../Src/Components/FSimpleLeaf.hpp"
#include "../../Src/Containers/FVector.hpp" #include "../../Src/Containers/FVector.hpp"
...@@ -67,7 +67,7 @@ int main(int argc, char* argv[]){ ...@@ -67,7 +67,7 @@ int main(int argc, char* argv[]){
typedef FGroupTestParticleContainer<FReal> GroupContainerClass; typedef FGroupTestParticleContainer<FReal> GroupContainerClass;
typedef FGroupTreeBerenger< FReal, GroupCellClass, GroupCellSymbClass, GroupCellUpClass, GroupCellDownClass, typedef FGroupTree< FReal, GroupCellClass, GroupCellSymbClass, GroupCellUpClass, GroupCellDownClass,
GroupContainerClass, 0, 1, long long int> GroupOctreeClass; GroupContainerClass, 0, 1, long long int> GroupOctreeClass;
typedef FStarPUAllCpuCapacities<FTestKernels< GroupCellClass, GroupContainerClass >> GroupKernelClass; typedef FStarPUAllCpuCapacities<FTestKernels< GroupCellClass, GroupContainerClass >> GroupKernelClass;
typedef FStarPUCpuWrapper<typename GroupOctreeClass::CellGroupClass, GroupCellClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass> GroupCpuWrapper; typedef FStarPUCpuWrapper<typename GroupOctreeClass::CellGroupClass, GroupCellClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass> GroupCpuWrapper;
...@@ -112,9 +112,10 @@ int main(int argc, char* argv[]){ ...@@ -112,9 +112,10 @@ int main(int argc, char* argv[]){
allParticles.push(particlePosition); allParticles.push(particlePosition);
tree.insert(particlePosition); tree.insert(particlePosition);
} }
// Put the data into the tree // Put the data into the tree
//GroupOctreeClass groupedTree(NbLevels, groupSize, &tree); //GroupOctreeClass groupedTree(NbLevels, groupSize, &tree);
GroupOctreeClass groupedTree(NbLevels, loader.getBoxWidth(), loader.getCenterOfBox(), groupSize, &allParticles, false, distributedMortonIndex); GroupOctreeClass groupedTree(NbLevels, loader.getBoxWidth(), loader.getCenterOfBox(), groupSize, &allParticles, false);
// Check tree structure at leaf level // Check tree structure at leaf level
groupedTree.forEachCellLeaf<GroupContainerClass>([&](GroupCellClass gcell, GroupContainerClass* gleaf){ groupedTree.forEachCellLeaf<GroupContainerClass>([&](GroupCellClass gcell, GroupContainerClass* gleaf){
......
#!/bin/sh #!/bin/sh
export SCALFMM_SIMGRIDOUT='scalfmm.out' export SCALFMM_SIMGRIDOUT='scalfmm.out'
export STARPU_STATS=1 export STARPU_STATS=1
export GROUP_SIZE=32 export GROUP_SIZE=8
export TREE_HEIGHT=6 export TREE_HEIGHT=3
export NB_NODE=8 export NB_NODE=8
export NB_PARTICLE_PER_NODE=$((`awk "BEGIN{print 8 ** ($TREE_HEIGHT-1)}"` / $NB_NODE)) export NB_PARTICLE_PER_NODE=$((`awk "BEGIN{print 8 ** ($TREE_HEIGHT-1)}"` / $NB_NODE))
echo "GROUP_SIZE=$GROUP_SIZE" echo "GROUP_SIZE=$GROUP_SIZE"
...@@ -63,6 +63,6 @@ a=`ls $STARPU_FXT_PREFIX/../installprof*` ...@@ -63,6 +63,6 @@ a=`ls $STARPU_FXT_PREFIX/../installprof*`
#rm -f $STARPU_FXT_PREFIX/../installprof* #rm -f $STARPU_FXT_PREFIX/../installprof*
#Compare DAGs #Compare DAGs
./Tests/Release/compareDAGmapping -e scalfmm_explicit.out -i scalfmm_implicit.out -h $TREE_HEIGHT > output ./Tests/Release/compareDAGmapping -e scalfmm_explicit.out -i scalfmm_implicit.out -h $TREE_HEIGHT
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