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

Function finishedRequest

src/Pstream/mpi/UPstream.C:578–611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

576
577
578bool 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
614int Foam::UPstream::allocateTag(const char* s)

Callers 2

writeBlocksFunction · 0.50

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected