Commit 611a6934 authored by BRAMAS Berenger's avatar BRAMAS Berenger

Make it work for starpu mpi

parent 0293bd79
......@@ -431,7 +431,8 @@ public:
ParticleContainerClass interParticles = containersOther->template getLeaf<ParticleContainerClass>(leafPos);
FAssertLF(containersOther->getLeafMortonIndex(leafPos) == (*outsideInteractions)[outInterIdx].outIndex);
ParticleContainerClass particles = containers->template getLeaf<ParticleContainerClass>((*outsideInteractions)[outInterIdx].insideIdxInBlock);
FAssertLF(containers->getLeafMortonIndex(leafPos) == (*outsideInteractions)[outInterIdx].insideIndex);
FAssertLF(containers->getLeafMortonIndex((*outsideInteractions)[outInterIdx].insideIdxInBlock) == (*outsideInteractions)[outInterIdx].insideIndex,
containers->getLeafMortonIndex((*outsideInteractions)[outInterIdx].insideIdxInBlock), " != ", (*outsideInteractions)[outInterIdx].insideIndex);
ParticleContainerClass* ptrLeaf = &interParticles;
kernel->P2PRemote( FTreeCoordinate((*outsideInteractions)[outInterIdx].insideIndex, treeHeight-1), &particles, &particles ,
&ptrLeaf, &(*outsideInteractions)[outInterIdx].relativeOutPosition, 1);
......
......@@ -246,6 +246,10 @@ public:
reset();
delete[] procsIdArray ;
}
void barrier() const {
FMpi::Assert(MPI_Barrier(getComm()), __LINE__);
}
};
////////////////////////////////////////////////////////
......
......@@ -142,6 +142,9 @@ int main(int argc, char* argv[]){
GroupAlgorithm groupalgo(mpiComm.global(), &groupedTree,&groupkernel);
groupalgo.execute();
std::cout << "Wait Others... " << std::endl;
mpiComm.global().barrier();
groupedTree.forEachCellLeaf<GroupContainerClass>([&](GroupCellClass cell, GroupContainerClass* leaf){
const FSize nbPartsInLeaf = leaf->getNbParticles();
const long long int* dataDown = leaf->getDataDown();
......@@ -153,6 +156,7 @@ int main(int argc, char* argv[]){
});
typedef FTestCell CellClass;
typedef FTestParticleContainer<FReal> ContainerClass;
typedef FSimpleLeaf<FReal, ContainerClass > LeafClass;
......
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