Commit b46785a7 authored by BRAMAS Berenger's avatar BRAMAS Berenger

Add nb threads in starpu mpi - but it seems that starpu use 2 everytime

parent ce2fdf42
......@@ -573,7 +573,7 @@ protected:
void postRecvAllocatedBlocks(){
std::vector<MpiDependency> toRecv;
FAssertLF(tree->getHeight() == int(remoteCellGroups[idxLevel].size()));
FAssertLF(tree->getHeight() == int(remoteCellGroups.size()));
for(int idxLevel = 0 ; idxLevel < tree->getHeight() ; ++idxLevel){
for(int idxHandle = 0 ; idxHandle < int(remoteCellGroups[idxLevel].size()) ; ++idxHandle){
if(remoteCellGroups[idxLevel][idxHandle].ptr){
......
......@@ -68,7 +68,8 @@ int main(int argc, char* argv[]){
};
FHelpDescribeAndExit(argc, argv, "Test the blocked tree by counting the particles.",
FParameterDefinitions::OctreeHeight, FParameterDefinitions::NbThreads,
FParameterDefinitions::NbParticles, LocalOptionBlocSize);
FParameterDefinitions::NbParticles, FParameterDefinitions::NbThreads,
LocalOptionBlocSize);
// Initialize the types
typedef FTestCell GroupCellClass;
typedef FGroupTestParticleContainer GroupContainerClass;
......@@ -78,6 +79,7 @@ int main(int argc, char* argv[]){
FMpi mpiComm(argc, argv);
// Get params
const int maxThreads = FParameters::getValue(argc,argv,FParameterDefinitions::NbThreads.options, -1);
const int NbLevels = FParameters::getValue(argc,argv,FParameterDefinitions::OctreeHeight.options, 5);
const int NbParticles = FParameters::getValue(argc,argv,FParameterDefinitions::NbParticles.options, 20);
const int groupSize = FParameters::getValue(argc,argv,LocalOptionBlocSize.options, 250);
......@@ -146,7 +148,7 @@ int main(int argc, char* argv[]){
// Run the algorithm
GroupKernelClass groupkernel;
GroupAlgorithm groupalgo(mpiComm.global(), &groupedTree,&groupkernel);
GroupAlgorithm groupalgo(mpiComm.global(), &groupedTree,&groupkernel,maxThreads);
groupalgo.execute();
groupedTree.forEachCellLeaf<FGroupTestParticleContainer>([&](GroupCellClass* cell, FGroupTestParticleContainer* leaf){
......
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