diff --git a/Tests/noDist/testBlockedMpiAlgorithm.cpp b/Tests/noDist/testBlockedMpiAlgorithm.cpp index cc1e35cd9caf1af1e14fb12b9542dd35249ada05..daccf273da95cdc0053ad5c80a11dfe42878c024 100644 --- a/Tests/noDist/testBlockedMpiAlgorithm.cpp +++ b/Tests/noDist/testBlockedMpiAlgorithm.cpp @@ -81,6 +81,7 @@ int main(int argc, char* argv[]){ 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); + const int totalNbParticles = (NbParticles*mpiComm.global().processCount()); // Load the particles FRandomLoader loader(NbParticles, 1.0, FPoint(0,0,0), mpiComm.global().processId()); @@ -148,6 +149,16 @@ int main(int argc, char* argv[]){ GroupAlgorithm groupalgo(mpiComm.global(), &groupedTree,&groupkernel); groupalgo.execute(); + groupedTree.forEachCellLeaf<FGroupTestParticleContainer>([&](GroupCellClass* cell, FGroupTestParticleContainer* leaf){ + const int nbPartsInLeaf = leaf->getNbParticles(); + const long long int* dataDown = leaf->getDataDown(); + for(int idxPart = 0 ; idxPart < nbPartsInLeaf ; ++idxPart){ + if(dataDown[idxPart] != totalNbParticles-1){ + std::cout << "[Full] Error a particle has " << dataDown[idxPart] << " (it should be " << (NbParticles-1) << ") at index " << cell->getMortonIndex() << "\n"; + } + } + }); + return 0; }