| 537 | |
| 538 | |
| 539 | void Foam::UPstream::waitRequest(const label i) |
| 540 | { |
| 541 | if (debug) |
| 542 | { |
| 543 | Pout<< "UPstream::waitRequest : starting wait for request:" << i |
| 544 | << endl; |
| 545 | } |
| 546 | |
| 547 | if (i >= PstreamGlobals::outstandingRequests_.size()) |
| 548 | { |
| 549 | FatalErrorInFunction |
| 550 | << "There are " << PstreamGlobals::outstandingRequests_.size() |
| 551 | << " outstanding send requests and you are asking for i=" << i |
| 552 | << nl |
| 553 | << "Maybe you are mixing blocking/non-blocking comms?" |
| 554 | << Foam::abort(FatalError); |
| 555 | } |
| 556 | |
| 557 | if |
| 558 | ( |
| 559 | MPI_Wait |
| 560 | ( |
| 561 | &PstreamGlobals::outstandingRequests_[i], |
| 562 | MPI_STATUS_IGNORE |
| 563 | ) |
| 564 | ) |
| 565 | { |
| 566 | FatalErrorInFunction |
| 567 | << "MPI_Wait returned with error" << Foam::endl; |
| 568 | } |
| 569 | |
| 570 | if (debug) |
| 571 | { |
| 572 | Pout<< "UPstream::waitRequest : finished wait for request:" << i |
| 573 | << endl; |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | |
| 578 | bool Foam::UPstream::finishedRequest(const label i) |