Commit 2be79693 authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

add a method to test if there are some pending messages

parent 15d36f33
......@@ -250,6 +250,13 @@ public:
void barrier() const {
FMpi::Assert(MPI_Barrier(getComm()), __LINE__);
}
bool hasPendingMessage() const {
MPI_Status status;
int flag = 0;
MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, getComm(), &flag, &status);
return (flag != 0);
}
};
////////////////////////////////////////////////////////
......
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