MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / waitRequest

Function waitRequest

src/Pstream/mpi/UPstream.C:539–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537
538
539void 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
578bool Foam::UPstream::finishedRequest(const label i)

Callers 4

mainFunction · 0.50
updateInterfaceMatrixFunction · 0.50
updateInterfaceMatrixFunction · 0.50

Calls 1

sizeMethod · 0.45

Tested by 1

mainFunction · 0.40