One is allowed to call MPI_WAIT with a null or inactive request argument. In this case the operation returns immediately with empty status.
Status::empty(status);
*flag = 1;
Status::empty(status);
*flag = 1;
- if (((*request)->flags_ & MPI_REQ_PREPARED) == 0) {
+ if (((*request)->flags_ & (MPI_REQ_PREPARED | MPI_REQ_FINISHED)) == 0) {
if ((*request)->action_ != nullptr && (*request)->cancelled_ != 1){
try{
*flag = simcall_comm_test((*request)->action_.get());
if ((*request)->action_ != nullptr && (*request)->cancelled_ != 1){
try{
*flag = simcall_comm_test((*request)->action_.get());
}
(*request)->print_request("Waiting");
}
(*request)->print_request("Waiting");
- if ((*request)->flags_ & MPI_REQ_PREPARED) {
+ if ((*request)->flags_ & (MPI_REQ_PREPARED | MPI_REQ_FINISHED)) {
Status::empty(status);
return ret;
}
Status::empty(status);
return ret;
}