Commit c2ed1a64 authored by BRAMAS Berenger's avatar BRAMAS Berenger
parents d94437e7 c02034c7
......@@ -190,15 +190,18 @@ class FQuickSortMpi : public FQuickSort< SortType, IndexType> {
const FSize nbBytesInMessage = int(FMath::Min(IndexType(FQS_MAX_MPI_BYTES), totalByteToRecv-idxSize));
FAssertLF(nbBytesInMessage < std::numeric_limits<int>::max());
FMpi::Assert( MPI_Irecv(&ptrDataToRecv[idxSize], int(nbBytesInMessage), MPI_BYTE, pack.idProc,
int(FMpi::TagQuickSort + idxSize), currentComm.getComm(), &currentRequest) , __LINE__);
int(FMpi::TagQuickSort + idxSize/FQS_MAX_MPI_BYTES), currentComm.getComm(), &currentRequest) , __LINE__);
requests.push_back(currentRequest);
}
}
FAssertLF(whatToRecvFromWho.size() <= requests.size());
FLOG( FLog::Controller << "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__ );
FLOG( FLog::Controller << currentComm.processId() << "] Recv Done \n"; )
FLOG( FLog::Controller.flush());
// Copy to ouput variables
(*inPartRecv) = recvBuffer;
(*inNbElementsRecv) = totalToRecv;
......@@ -230,15 +233,18 @@ class FQuickSortMpi : public FQuickSort< SortType, IndexType> {
const IndexType nbBytesInMessage = int(FMath::Min(IndexType(FQS_MAX_MPI_BYTES), totalByteToSend-idxSize));
FAssertLF(nbBytesInMessage < std::numeric_limits<int>::max());
FMpi::Assert( MPI_Isend((SortType*)&ptrDataToSend[idxSize], int(nbBytesInMessage), MPI_BYTE , pack.idProc,
int(FMpi::TagQuickSort + idxSize), currentComm.getComm(), &currentRequest) , __LINE__);
int(FMpi::TagQuickSort + idxSize/FQS_MAX_MPI_BYTES), currentComm.getComm(), &currentRequest) , __LINE__);
requests.push_back(currentRequest);
}
}
FAssertLF(whatToSendToWho.size() <= requests.size());
FLOG( FLog::Controller << "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__ );
FLOG( FLog::Controller << currentComm.processId() << "] Send Done \n"; )
FLOG( FLog::Controller.flush());
}
static CompareType SelectPivot(const SortType workingArray[], const IndexType currentSize, const FMpi::FComm& currentComm, bool* shouldStop){
......
......@@ -523,6 +523,7 @@ struct RunContainer{
std::cout << "Done " << "(@Algorithm = " << time.elapsed() << "s)." << std::endl;
}
} // -----------------------------------------------------
std::cout.flush();
if(FParameters::existParameter(argc, argv, LocalOptionNoValidate.options) == false){
......
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