Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

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