Commit 0c1ed390 authored by BRAMAS Berenger's avatar BRAMAS Berenger

update rotation mpi

parent c440a8f4
......@@ -96,15 +96,18 @@ class FQuickSortMpi : public FQuickSort< SortType, IndexType> {
const IndexType nbElementsAlreadyOwned = (inFromRightToLeft ? globalElementBalance[idxProc].lowerPart : globalElementBalance[idxProc].greaterPart);
const IndexType averageNbElementForRemainingProc = (totalRemainingElements)/(lastProcToRecv-idxProc);
totalRemainingElements -= nbElementsAlreadyOwned;
FAssertLF(totalRemainingElements >= 0);
if(nbElementsAlreadyOwned < averageNbElementForRemainingProc){
nbElementsToRecvPerProc[idxProc - firstProcToRecv] = (averageNbElementForRemainingProc - nbElementsAlreadyOwned);
totalRemainingElements -= nbElementsToRecvPerProc[idxProc - firstProcToRecv];
}
else{
FAssert((averageNbElementForRemainingProc - nbElementsAlreadyOwned) == 0);
nbElementsToRecvPerProc[idxProc - firstProcToRecv] = 0;
}
FLOG( FLog::Controller << "SCALFMM-DEBUG [" << currentRank << "] nbElementsToRecvPerProc[" << idxProc << "] = " << nbElementsToRecvPerProc[idxProc - firstProcToRecv] << "\n"; )
}
FAssertLF(totalRemainingElements == 0);
}
// Store in an array the number of element to send
......@@ -243,7 +246,7 @@ class FQuickSortMpi : public FQuickSort< SortType, IndexType> {
}
}
FAssertLF(whatToSendToWho.size() <= requests.size());
FLOG( FLog::Controller << "SCALFMM-DEBUG [" << "Wait for " << requests.size() << " request \n" );
FLOG( FLog::Controller << "SCALFMM-DEBUG [" << currentComm.processId() << "] Wait for " << requests.size() << " request \n" );
FLOG( FLog::Controller.flush());
// Wait to complete
FMpi::Assert( MPI_Waitall(int(requests.size()), requests.data(), MPI_STATUSES_IGNORE), __LINE__ );
......
......@@ -115,7 +115,7 @@ int main(int argc, char* argv[])
tree.getBoxWidth(),tree.getHeight(),
&finalParticles, &balancer);
{ // -----------------------------------------------------
std::cout << "Creating & Inserting " << loader.getNumberOfParticles() << " particles ..." << std::endl;
std::cout << "Creating & Inserting " << finalParticles.getSize() << " particles ..." << std::endl;
std::cout << "For a total of " << loader.getNumberOfParticles() * app.global().processCount() << " particles ..." << std::endl;
std::cout << "\tHeight : " << TreeHeight << " \t sub-height : " << SubTreeHeight << std::endl;
time.tic();
......
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