| 576 | |
| 577 | |
| 578 | bool Foam::UPstream::finishedRequest(const label i) |
| 579 | { |
| 580 | if (debug) |
| 581 | { |
| 582 | Pout<< "UPstream::finishedRequest : checking request:" << i |
| 583 | << endl; |
| 584 | } |
| 585 | |
| 586 | if (i >= PstreamGlobals::outstandingRequests_.size()) |
| 587 | { |
| 588 | FatalErrorInFunction |
| 589 | << "There are " << PstreamGlobals::outstandingRequests_.size() |
| 590 | << " outstanding send requests and you are asking for i=" << i |
| 591 | << nl |
| 592 | << "Maybe you are mixing blocking/non-blocking comms?" |
| 593 | << Foam::abort(FatalError); |
| 594 | } |
| 595 | |
| 596 | int flag; |
| 597 | MPI_Test |
| 598 | ( |
| 599 | &PstreamGlobals::outstandingRequests_[i], |
| 600 | &flag, |
| 601 | MPI_STATUS_IGNORE |
| 602 | ); |
| 603 | |
| 604 | if (debug) |
| 605 | { |
| 606 | Pout<< "UPstream::finishedRequest : finished request:" << i |
| 607 | << endl; |
| 608 | } |
| 609 | |
| 610 | return flag != 0; |
| 611 | } |
| 612 | |
| 613 | |
| 614 | int Foam::UPstream::allocateTag(const char* s) |
no test coverage detected