Commit 1f979860 authored by berenger-bramas's avatar berenger-bramas
Browse files

Add enum to tag MPI communication.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@198 2616d619-271b-44dc-8df4-d4a8f33a7222
parent 12ca9512
......@@ -130,9 +130,6 @@ class FFmmAlgorithmThreadProc : protected FAssertable {
}
}
enum MpiTags{
TAG_P2P_PART = 99,
};
public:
/** The constructor need the octree and the kernels used for computation
......@@ -364,7 +361,7 @@ public:
--sendToProc;
}
MPI_Isend(sendBuffer, idxBuff, MPI_BYTE, sendToProc, 0, MPI_COMM_WORLD, &requests[iterRequests++]);
MPI_Isend(sendBuffer, idxBuff, MPI_BYTE, sendToProc, TagFmmM2M, MPI_COMM_WORLD, &requests[iterRequests++]);
}
// We may need to receive something
......@@ -386,7 +383,7 @@ public:
hasToReceive = true;
for(int idxProc = firstProcThatSend ; idxProc < endProcThatSend ; ++idxProc ){
MPI_Irecv(&recvBuffer[idxProc * recvBufferOffset], recvBufferOffset, MPI_BYTE, idxProc, 0, MPI_COMM_WORLD, &requests[iterRequests++]);
MPI_Irecv(&recvBuffer[idxProc * recvBufferOffset], recvBufferOffset, MPI_BYTE, idxProc, TagFmmM2M, MPI_COMM_WORLD, &requests[iterRequests++]);
}
}
}
......@@ -618,7 +615,7 @@ public:
}
mpiassert( MPI_Isend( sendBuffer[idxLevel * nbProcess + idxProc], toSendAtProcAtLevel * sizeof(CellToSend) , MPI_BYTE ,
idxProc, idxLevel, MPI_COMM_WORLD, &requests[iterRequest++]) , __LINE__ );
idxProc, TagLast + idxLevel, MPI_COMM_WORLD, &requests[iterRequest++]) , __LINE__ );
}
const int toReceiveFromProcAtLevel = globalReceiveMap[(idxProc * nbProcess * OctreeHeight) + idxLevel * nbProcess + idProcess];
......@@ -626,7 +623,7 @@ public:
recvBuffer[idxLevel * nbProcess + idxProc] = new CellToSend[toReceiveFromProcAtLevel];
mpiassert( MPI_Irecv(recvBuffer[idxLevel * nbProcess + idxProc], toReceiveFromProcAtLevel * sizeof(CellToSend), MPI_BYTE,
idxProc, idxLevel, MPI_COMM_WORLD, &requests[iterRequest++]) , __LINE__ );
idxProc, TagLast + idxLevel, MPI_COMM_WORLD, &requests[iterRequest++]) , __LINE__ );
}
}
}
......@@ -811,7 +808,7 @@ public:
if(idProcess != 0
&& realIntervalsPerLevel[idxLevel * nbProcess + idProcess].min != workingIntervalsPerLevel[idxLevel * nbProcess + idProcess].min){
needToRecv = true;
MPI_Irecv( recvBuffer, CellClass::SerializedSizeDown, MPI_BYTE, MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &requests[iterRequests++]);
MPI_Irecv( recvBuffer, CellClass::SerializedSizeDown, MPI_BYTE, MPI_ANY_SOURCE, TagFmmL2L, MPI_COMM_WORLD, &requests[iterRequests++]);
}
......@@ -831,7 +828,7 @@ public:
if(endProcThatRecv != idProcess + 1){
iterArray[numberOfCells - 1].getCurrentCell()->serializeDown(sendBuffer);
for(int idxProc = firstProcThatRecv ; idxProc < endProcThatRecv ; ++idxProc ){
MPI_Isend(sendBuffer, CellClass::SerializedSizeDown, MPI_BYTE, idxProc, 0, MPI_COMM_WORLD, &requests[iterRequests++]);
MPI_Isend(sendBuffer, CellClass::SerializedSizeDown, MPI_BYTE, idxProc, TagFmmL2L, MPI_COMM_WORLD, &requests[iterRequests++]);
}
}
}
......@@ -1001,14 +998,14 @@ public:
}
mpiassert( MPI_Isend( sendBuffer[idxProc], sizeof(ParticleClass) * partsToSend[idxProc] , MPI_BYTE ,
idxProc, TAG_P2P_PART, MPI_COMM_WORLD, &requests[iterRequest++]) , __LINE__ );
idxProc, TagFmmP2P, MPI_COMM_WORLD, &requests[iterRequest++]) , __LINE__ );
}
if(globalReceiveMap[idxProc * nbProcess + idProcess]){
recvBuffer[idxProc] = reinterpret_cast<ParticleClass*>(new char[sizeof(ParticleClass) * globalReceiveMap[idxProc * nbProcess + idProcess]]);
mpiassert( MPI_Irecv(recvBuffer[idxProc], globalReceiveMap[idxProc * nbProcess + idProcess]*sizeof(ParticleClass), MPI_BYTE,
idxProc, TAG_P2P_PART, MPI_COMM_WORLD, &requests[iterRequest++]) , __LINE__ );
idxProc, TagFmmP2P, MPI_COMM_WORLD, &requests[iterRequest++]) , __LINE__ );
}
}
......
#ifndef FMPITREEBUILDER_H
#define FMPITREEBUILDER_H
#include "../Utils/FMpi.hpp"
#include "../Utils/FQuickSort.hpp"
#include "../Utils/FMemUtils.hpp"
......@@ -156,10 +156,10 @@ public:
int reqiter = 0;
// can I send my first index? == I am not rank 0 & I have data
if( 0 < rank && outputSize){
MPI_Isend( &outputArray[0].index, 1, MPI_LONG_LONG, rank - 1, 0, MPI_COMM_WORLD, &req[reqiter++]);
MPI_Isend( &outputArray[0].index, 1, MPI_LONG_LONG, rank - 1, TagExchangeIndexs, MPI_COMM_WORLD, &req[reqiter++]);
}
if( rank != nbProcs - 1){
MPI_Irecv(&otherFirstIndex, 1, MPI_LONG_LONG, rank + 1, 0, MPI_COMM_WORLD, &req[reqiter++]);
MPI_Irecv(&otherFirstIndex, 1, MPI_LONG_LONG, rank + 1, TagExchangeIndexs, MPI_COMM_WORLD, &req[reqiter++]);
}
MPI_Waitall(reqiter,req,MPI_STATUSES_IGNORE);
......@@ -167,11 +167,10 @@ public:
// I could not send because I do not have data, so I transmit the data coming
// from my right neigbors
if( 0 < rank && !outputSize){
MPI_Send( &otherFirstIndex, 1, MPI_LONG_LONG, rank - 1, 0, MPI_COMM_WORLD);
MPI_Send( &otherFirstIndex, 1, MPI_LONG_LONG, rank - 1, TagExchangeIndexs, MPI_COMM_WORLD);
}
}
MPI_Request req[2];
int reqiter = 0;
......@@ -186,7 +185,7 @@ public:
int sendByOther = 0;
MPI_Status probStatus;
MPI_Probe(rank - 1, 0, MPI_COMM_WORLD, &probStatus);
MPI_Probe(rank - 1, TagSplittedLeaf, MPI_COMM_WORLD, &probStatus);
MPI_Get_count( &probStatus, MPI_BYTE, &sendByOther);
if(sendByOther){
......@@ -199,10 +198,10 @@ public:
FMemUtils::memcpy(&outputArray[sendByOther], reallocOutputArray, reallocOutputSize * sizeof(IndexedParticle));
delete[] reallocOutputArray;
MPI_Recv(outputArray, sizeof(IndexedParticle) * sendByOther, MPI_BYTE, rank - 1, 0, MPI_COMM_WORLD, &probStatus);
MPI_Recv(outputArray, sizeof(IndexedParticle) * sendByOther, MPI_BYTE, rank - 1, TagSplittedLeaf, MPI_COMM_WORLD, &probStatus);
}
else{
MPI_Irecv(0, 0, MPI_BYTE, rank - 1, 0, MPI_COMM_WORLD, &req[reqiter++]);
MPI_Irecv(0, 0, MPI_BYTE, rank - 1, TagSplittedLeaf, MPI_COMM_WORLD, &req[reqiter++]);
}
}
......@@ -213,20 +212,20 @@ public:
--idxPart;
}
const int toSend = int(outputSize - 1 - idxPart);
MPI_Isend( &outputArray[idxPart + 1], toSend * sizeof(IndexedParticle), MPI_BYTE, rank + 1, 0, MPI_COMM_WORLD, &req[reqiter++]);
MPI_Isend( &outputArray[idxPart + 1], toSend * sizeof(IndexedParticle), MPI_BYTE, rank + 1, TagSplittedLeaf, MPI_COMM_WORLD, &req[reqiter++]);
if( rank != 0 && !needToRecvBeforeSend && (rank != nbProcs - 1)){
int sendByOther = 0;
MPI_Status probStatus;
MPI_Probe(rank - 1, 0, MPI_COMM_WORLD, &probStatus);
MPI_Probe(rank - 1, TagSplittedLeaf, MPI_COMM_WORLD, &probStatus);
MPI_Get_count( &probStatus, MPI_BYTE, &sendByOther);
if(sendByOther){
sendByOther /= sizeof(IndexedParticle);
char* const tempBuffer = new char[sizeof(IndexedParticle) * sendByOther];
MPI_Irecv(tempBuffer, sizeof(IndexedParticle) * sendByOther, MPI_BYTE, rank - 1, 0, MPI_COMM_WORLD, &req[reqiter++]);
MPI_Irecv(tempBuffer, sizeof(IndexedParticle) * sendByOther, MPI_BYTE, rank - 1, TagSplittedLeaf, MPI_COMM_WORLD, &req[reqiter++]);
MPI_Waitall(reqiter,req, MPI_STATUSES_IGNORE);
reqiter = 0;
......@@ -242,10 +241,11 @@ public:
delete[] tempBuffer;
}
else{
MPI_Irecv( 0, 0, MPI_BYTE, rank - 1, 0, MPI_COMM_WORLD, &req[reqiter++]);
MPI_Irecv( 0, 0, MPI_BYTE, rank - 1, TagSplittedLeaf, MPI_COMM_WORLD, &req[reqiter++]);
}
}
}
MPI_Waitall(reqiter,req,MPI_STATUSES_IGNORE);
}
......@@ -294,43 +294,39 @@ public:
//////////////////////////////////////////////////////////////////////////////////
FSize nbLeafs = nbLeavesInIntervals;
FSize leftLeafs = 0;
FSize rightLeafs = 0;
// receive from left and right
if((rank == 0)){
MPI_Send(&nbLeafs, sizeof(FSize), MPI_BYTE , 1, 0, MPI_COMM_WORLD);
MPI_Request requests[2];
MPI_Isend(&nbLeafs, sizeof(FSize), MPI_BYTE , 1, TagExchangeNbLeafs, MPI_COMM_WORLD, &requests[0]);
MPI_Irecv(&rightLeafs, sizeof(FSize), MPI_BYTE, 1 , TagExchangeNbLeafs , MPI_COMM_WORLD, &requests[1]);
MPI_Waitall(2, requests, MPI_STATUSES_IGNORE);
}
else if(rank == nbProcs - 1){
MPI_Send(&nbLeafs, sizeof(FSize), MPI_BYTE , rank - 1, 0, MPI_COMM_WORLD);
MPI_Request requests[2];
MPI_Isend(&nbLeafs, sizeof(FSize), MPI_BYTE , rank - 1, TagExchangeNbLeafs, MPI_COMM_WORLD, &requests[0]);
MPI_Irecv(&leftLeafs, sizeof(FSize), MPI_BYTE, rank - 1 , TagExchangeNbLeafs , MPI_COMM_WORLD, &requests[1]);
MPI_Waitall(2, requests, MPI_STATUSES_IGNORE);
}
// receive
FSize leftLeafs = 0;
FSize rightLeafs = 0;
if(!(rank == 0) && rank != nbProcs - 1){
else { //rank != 0) && rank != nbProcs - 1
for(int idxToReceive = 0 ; idxToReceive < 2 ; ++idxToReceive){
int source(0);
FSize temp = 0;
receiveDataFromTag(sizeof(FSize), 0, &temp, &source);
receiveDataFromTag(sizeof(FSize), TagExchangeNbLeafs, &temp, &source);
if(source < rank){ // come from left
leftLeafs = temp;
temp += nbLeafs;
MPI_Send(&temp, sizeof(FSize), MPI_BYTE , rank + 1, 0, MPI_COMM_WORLD);
MPI_Send(&temp, sizeof(FSize), MPI_BYTE , rank + 1, TagExchangeNbLeafs, MPI_COMM_WORLD);
}
else { // come from right
rightLeafs = temp;
temp += nbLeafs;
MPI_Send(&temp, sizeof(FSize), MPI_BYTE , rank - 1, 0, MPI_COMM_WORLD);
MPI_Send(&temp, sizeof(FSize), MPI_BYTE , rank - 1, TagExchangeNbLeafs, MPI_COMM_WORLD);
}
}
}
else {
if((rank == 0)){ // come from right
receiveDataFromTag(sizeof(FSize), 0, &rightLeafs);
}
else { // come from left
receiveDataFromTag(sizeof(FSize), 0, &leftLeafs);
}
}
//////////////////////////////////////////////////////////////////////////////////
// We balance the data
......@@ -385,7 +381,7 @@ public:
currentLeafPosition += ((*(int*)&particlesToSend[currentLeafPosition]) * sizeof(ParticleClass)) + sizeof(int);
}
hasBeenSentToLeft = FMath::Min(iNeedToSendLeftCount, iCanSendToLeft);
MPI_Isend(particlesToSend, int(currentLeafPosition), MPI_BYTE , rank - 1, 0, MPI_COMM_WORLD, &requests[iterRequest++]);
MPI_Isend(particlesToSend, int(currentLeafPosition), MPI_BYTE , rank - 1, TagSandSettling, MPI_COMM_WORLD, &requests[iterRequest++]);
printf("I send to left %lld bytes %lld leaves\n", currentLeafPosition, hasBeenSentToLeft);
}
printf("Elapsed %lf\n", counter.tacAndElapsed());
......@@ -417,7 +413,8 @@ public:
}
hasBeenSentToRight = FMath::Min(iNeedToSendRightCount, iCanSendToRight);
MPI_Isend( &particlesToSend[beginWriteIndex], int(currentLeafPosition - beginWriteIndex), MPI_BYTE , rank + 1, 0, MPI_COMM_WORLD, &requests[iterRequest++]);
MPI_Isend( &particlesToSend[beginWriteIndex], int(currentLeafPosition - beginWriteIndex), MPI_BYTE , rank + 1, TagSandSettling,
MPI_COMM_WORLD, &requests[iterRequest++]);
printf("I send to right %d bytes %lld leaves\n", int(currentLeafPosition - beginWriteIndex), hasBeenSentToRight);
}
printf("Elapsed %lf\n", counter.tacAndElapsed());
......@@ -439,13 +436,13 @@ public:
// Now prepare to receive data
while(countReceive--){
MPI_Status recvStatus;
MPI_Probe(sourceToWhileRecv, 0, MPI_COMM_WORLD, &recvStatus);
MPI_Probe(sourceToWhileRecv, TagSandSettling, MPI_COMM_WORLD, &recvStatus);
// receive from left
if(recvStatus.MPI_SOURCE == rank - 1){
MPI_Get_count( &recvStatus, MPI_BYTE, &sizeOfLeftBuffer);
toRecvFromLeft = new char[sizeOfLeftBuffer];
sizeOfLeftData = sizeOfLeftBuffer;
MPI_Irecv(toRecvFromLeft, sizeOfLeftBuffer, MPI_BYTE, rank - 1 , 0 , MPI_COMM_WORLD, &requests[iterRequest++]);
MPI_Irecv(toRecvFromLeft, sizeOfLeftBuffer, MPI_BYTE, rank - 1 , TagSandSettling , MPI_COMM_WORLD, &requests[iterRequest++]);
sourceToWhileRecv = rank + 1;
printf("I will receive %d bytes from left\n", sizeOfLeftBuffer);
}
......@@ -454,7 +451,7 @@ public:
MPI_Get_count( &recvStatus, MPI_BYTE, &sizeOfRightBuffer);
toRecvFromRight = new char[sizeOfRightBuffer];
sizeOfRightData = sizeOfRightBuffer;
MPI_Irecv(toRecvFromRight, sizeOfRightBuffer, MPI_BYTE, rank + 1 , 0 , MPI_COMM_WORLD, &requests[iterRequest++]);
MPI_Irecv(toRecvFromRight, sizeOfRightBuffer, MPI_BYTE, rank + 1 , TagSandSettling , MPI_COMM_WORLD, &requests[iterRequest++]);
sourceToWhileRecv = rank - 1;
printf("I will receive %d bytes from right\n", sizeOfRightBuffer);
}
......@@ -491,10 +488,10 @@ public:
}
printf("Send %d to left, total leaves sent %lld / %lld\n", arrayIdxRight, hasBeenSentToLeft, iNeedToSendLeftCount);
printf("Elapsed %lf\n", counter.tacAndElapsed());
MPI_Send(toRecvFromRight, arrayIdxRight, MPI_BYTE , rank - 1, 0, MPI_COMM_WORLD);
MPI_Send(toRecvFromRight, arrayIdxRight, MPI_BYTE , rank - 1, TagSandSettling, MPI_COMM_WORLD);
if(hasBeenSentToLeft < iNeedToSendLeftCount){
MPI_Status probStatus;
MPI_Probe(MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &probStatus);
MPI_Probe(MPI_ANY_SOURCE, TagSandSettling, MPI_COMM_WORLD, &probStatus);
MPI_Get_count( &probStatus, MPI_BYTE, &sizeOfRightData);
if(sizeOfRightBuffer < sizeOfRightData){
sizeOfRightBuffer = sizeOfRightData;
......@@ -502,7 +499,7 @@ public:
toRecvFromRight = new char[sizeOfRightData];
}
printf("Receive %d bytes from right\n", sizeOfRightData);
MPI_Recv(toRecvFromRight, sizeOfRightData, MPI_BYTE, rank + 1 , 0 , MPI_COMM_WORLD, MPI_STATUS_IGNORE);
MPI_Recv(toRecvFromRight, sizeOfRightData, MPI_BYTE, rank + 1 , TagSandSettling , MPI_COMM_WORLD, MPI_STATUS_IGNORE);
}
} while(hasBeenSentToLeft < iNeedToSendLeftCount);
}
......@@ -519,10 +516,10 @@ public:
}
printf("Send %d to right, total leaves sent %lld / %lld\n", arrayIdxLeft, hasBeenSentToRight, iNeedToSendRightCount);
printf("Elapsed %lf\n", counter.tacAndElapsed());
MPI_Send(toRecvFromLeft, arrayIdxLeft, MPI_BYTE , rank + 1, 0, MPI_COMM_WORLD);
MPI_Send(toRecvFromLeft, arrayIdxLeft, MPI_BYTE , rank + 1, TagSandSettling, MPI_COMM_WORLD);
if(hasBeenSentToRight < iNeedToSendRightCount){
MPI_Status probStatus;
MPI_Probe(MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &probStatus);
MPI_Probe(MPI_ANY_SOURCE, TagSandSettling, MPI_COMM_WORLD, &probStatus);
MPI_Get_count( &probStatus, MPI_BYTE, &sizeOfLeftData);
if(sizeOfLeftBuffer < sizeOfLeftData){
sizeOfLeftBuffer = sizeOfLeftData;
......@@ -530,7 +527,7 @@ public:
toRecvFromLeft = new char[sizeOfLeftData];
}
printf("Receive %d bytes from left", sizeOfLeftData);
MPI_Recv(toRecvFromLeft, sizeOfLeftData, MPI_BYTE, rank - 1 , 0 , MPI_COMM_WORLD, MPI_STATUS_IGNORE);
MPI_Recv(toRecvFromLeft, sizeOfLeftData, MPI_BYTE, rank - 1 , TagSandSettling , MPI_COMM_WORLD, MPI_STATUS_IGNORE);
}
} while(hasBeenSentToRight < iNeedToSendRightCount);
}
......@@ -559,7 +556,7 @@ public:
if(hasToBeReceivedFromLeft){
MPI_Status probStatus;
MPI_Probe( rank - 1, 0, MPI_COMM_WORLD, &probStatus);
MPI_Probe( rank - 1, TagSandSettling, MPI_COMM_WORLD, &probStatus);
MPI_Get_count( &probStatus, MPI_BYTE, &sizeOfLeftData);
if(sizeOfLeftBuffer < sizeOfLeftData){
sizeOfLeftBuffer = sizeOfLeftData;
......@@ -567,7 +564,7 @@ public:
toRecvFromLeft = new char[sizeOfLeftData];
}
printf("Received %d bytes from left\n", sizeOfLeftData);
MPI_Recv(toRecvFromLeft, sizeOfLeftData, MPI_BYTE, rank - 1 , 0 , MPI_COMM_WORLD, MPI_STATUS_IGNORE);
MPI_Recv(toRecvFromLeft, sizeOfLeftData, MPI_BYTE, rank - 1 , TagSandSettling , MPI_COMM_WORLD, MPI_STATUS_IGNORE);
}
} while(hasToBeReceivedFromLeft);
}
......@@ -594,7 +591,7 @@ public:
if(hasToBeReceivedFromRight){
MPI_Status probStatus;
printf("Probe\n");
MPI_Probe( rank + 1, 0, MPI_COMM_WORLD, &probStatus);
MPI_Probe( rank + 1, TagSandSettling, MPI_COMM_WORLD, &probStatus);
MPI_Get_count( &probStatus, MPI_BYTE, &sizeOfRightData);
printf("Receive %d bytes from right\n", sizeOfRightData);
if(sizeOfRightBuffer < sizeOfRightData){
......@@ -602,7 +599,7 @@ public:
delete[] toRecvFromRight;
toRecvFromRight = new char[sizeOfRightData];
}
MPI_Recv(toRecvFromRight, sizeOfRightData, MPI_BYTE, rank + 1 , 0 , MPI_COMM_WORLD, MPI_STATUS_IGNORE);
MPI_Recv(toRecvFromRight, sizeOfRightData, MPI_BYTE, rank + 1 , TagSandSettling , MPI_COMM_WORLD, MPI_STATUS_IGNORE);
}
} while(hasToBeReceivedFromRight);
}
......
......@@ -307,6 +307,22 @@ MPI_Datatype FMpi::getType<int>(){
}
#endif
enum FMpiTag {
// FMpiTreeBuilder
TagExchangeIndexs,
TagSplittedLeaf,
TagExchangeNbLeafs,
TagSandSettling,
// FQuickSort
TagQuickSort,
// FMM
TagFmmM2M,
TagFmmL2L,
TagFmmP2P,
// Last defined tag
TagLast,
};
#endif //FMPI_HPP
// [--LICENSE--]
......@@ -407,7 +407,7 @@ public:
sendToProc = fixes[currentRank].suf - sent;
}
if( sendToProc ){
mpiassert( MPI_Isend(&outputArray[sent + fixes[currentRank].pre], int(sendToProc * sizeof(SortType)), MPI_BYTE , idxProc, 0, currentComm, &requests[iterRequest++]), __LINE__ );
mpiassert( MPI_Isend(&outputArray[sent + fixes[currentRank].pre], int(sendToProc * sizeof(SortType)), MPI_BYTE , idxProc, TagQuickSort, currentComm, &requests[iterRequest++]), __LINE__ );
}
sent += sendToProc;
}
......@@ -430,7 +430,7 @@ public:
sendToProc = fixes[currentRank].pre - sent;
}
if(sendToProc){
mpiassert( MPI_Isend(&outputArray[sent], int(sendToProc * sizeof(SortType)), MPI_BYTE , idxProc, 0, currentComm, &requests[iterRequest++]), __LINE__ );
mpiassert( MPI_Isend(&outputArray[sent], int(sendToProc * sizeof(SortType)), MPI_BYTE , idxProc, TagQuickSort, currentComm, &requests[iterRequest++]), __LINE__ );
}
sent += sendToProc;
}
......@@ -466,7 +466,7 @@ public:
const FSize firstIndex = Max(myLeft , fixesSum[idxProc].pre );
const FSize endIndex = Min(fixesSum[idxProc + 1].pre, myRightLimit);
if( (endIndex - firstIndex) ){
mpiassert( MPI_Irecv(&buffer[indexArray], int((endIndex - firstIndex) * sizeof(SortType)), MPI_BYTE, idxProc, 0, currentComm, &requests[iterRequest++]), __LINE__ );
mpiassert( MPI_Irecv(&buffer[indexArray], int((endIndex - firstIndex) * sizeof(SortType)), MPI_BYTE, idxProc, TagQuickSort, currentComm, &requests[iterRequest++]), __LINE__ );
}
indexArray += endIndex - firstIndex;
++idxProc;
......@@ -503,7 +503,7 @@ public:
const FSize firstIndex = Max(myLeft , fixesSum[idxProc].suf );
const FSize endIndex = Min(fixesSum[idxProc + 1].suf, myRightLimit);
if( (endIndex - firstIndex) ){
mpiassert( MPI_Irecv(&buffer[indexArray], int((endIndex - firstIndex) * sizeof(SortType)), MPI_BYTE, idxProc, 0, currentComm, &requests[iterRequest++]), __LINE__ );
mpiassert( MPI_Irecv(&buffer[indexArray], int((endIndex - firstIndex) * sizeof(SortType)), MPI_BYTE, idxProc, TagQuickSort, currentComm, &requests[iterRequest++]), __LINE__ );
}
indexArray += endIndex - firstIndex;
++idxProc;
......
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