Attention une mise à jour du service Gitlab va être effectuée le mardi 18 janvier (et non lundi 17 comme annoncé précédemment) entre 18h00 et 18h30. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit 80a0057b authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

Change MPI from waitsome to waitall in P2P

parent 67885622
......@@ -1185,21 +1185,12 @@ private:
// Waitsend receive
//////////////////////////////////////////////////////////
int complete = 0;
int*const indexMessage = new int[nbProcess * 2];
while( complete != iterRequest){
memset(indexMessage, 0, sizeof(int) * nbProcess * 2);
int countMessages = 0;
// Wait data
FLOG(waitCounter.tic());
MPI_Waitsome(iterRequest, requests, &countMessages, indexMessage, status);
MPI_Waitall(iterRequest, requests, status);
FLOG(waitCounter.tac());
complete += countMessages;
for(int idxRcv = 0 ; idxRcv < countMessages ; ++idxRcv){
if( indexMessage[idxRcv] < nbMessagesToRecv ){
for(int idxRcv = 0 ; idxRcv < nbMessagesToRecv ; ++idxRcv){
const int idxProc = status[idxRcv].MPI_SOURCE;
int nbLeaves;
(*recvBuffer[idxProc]) >> nbLeaves;
......@@ -1212,9 +1203,6 @@ private:
recvBuffer[idxProc] = nullptr;
}
}
}
delete[] indexMessage;
}
///////////////////////////////////////////////////
// Prepare data for thread P2P
......
......@@ -1259,21 +1259,11 @@ private:
// Waitsend receive
//////////////////////////////////////////////////////////
int complete = 0;
int*const indexMessage = new int[nbProcess * 2];
while( complete != iterRequest){
memset(indexMessage, 0, sizeof(int) * nbProcess * 2);
int countMessages = 0;
// Wait data
FLOG(waitCounter.tic());
MPI_Waitsome(iterRequest, requests, &countMessages, indexMessage, status);
MPI_Waitall(iterRequest, requests, status);
FLOG(waitCounter.tac());
complete += countMessages;
for(int idxRcv = 0 ; idxRcv < countMessages ; ++idxRcv){
if( indexMessage[idxRcv] < nbMessagesToRecv ){
for(int idxRcv = 0 ; idxRcv < nbMessagesToRecv ; ++idxRcv){
const int idxProc = status[idxRcv].MPI_SOURCE;
int nbLeaves;
(*recvBuffer[idxProc]) >> nbLeaves;
......@@ -1286,9 +1276,6 @@ private:
recvBuffer[idxProc] = nullptr;
}
}
}
delete[] indexMessage;
}
///////////////////////////////////////////////////
// Prepare data for thread P2P
......
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