46 const std::streamsize bufSize,
49 const Foam::label communicator,
59 Pout<<
"UIPstream::read : starting read from:" << fromProcNo
60 <<
" tag:" << tag <<
" comm:" << communicator
61 <<
" wanted size:" << label(bufSize)
67 Pout<<
"UIPstream::read : starting read from:" << fromProcNo
68 <<
" tag:" << tag <<
" comm:" << communicator
69 <<
" wanted size:" << label(bufSize)
100 if (returnCode != MPI_SUCCESS)
103 <<
"MPI_Recv cannot receive incoming message" 113 MPI_Get_count(&status, MPI_BYTE, &messageSize);
117 Pout<<
"UIPstream::read : finished read from:" << fromProcNo
118 <<
" tag:" << tag <<
" read size:" << label(bufSize)
123 if (messageSize > bufSize)
126 <<
"buffer (" << label(bufSize)
127 <<
") not large enough for incoming message (" 128 << messageSize <<
')' 140 returnCode = MPI_Irecv
152 if (returnCode != MPI_SUCCESS)
155 <<
"MPI_Irecv cannot start non-blocking receive" 163 Pout<<
"UIPstream::read : started read from:" << fromProcNo
164 <<
" tag:" << tag <<
" read size:" << label(bufSize)
179 <<
"Unsupported communications type " << int(commsType)
188 void Foam::UIPstream::bufferIPCrecv()
193 Pout<<
"UIPstream IPC read buffer :" 223 Pout<<
"UIPstream::UIPstream : probed size:" 254 const int fromProcNo,
256 const std::streamsize bufSize,
258 const label communicator,
static void addProbeTime()
Add time increment to probe time.
"blocking" : (MPI_Bsend, MPI_Recv)
DynamicList< MPI_Request > outstandingRequests_
Outstanding non-blocking operations.
static const Enum< commsTypes > commsTypeNames
Enumerated names for the communication types.
static label read(const UPstream::commsTypes commsType, const int fromProcNo, char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, UPstream::Request *req=nullptr)
Read buffer contents from given processor.
commsTypes
Communications types.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
T * data() noexcept
Return pointer to the underlying array serving as data storage.
void resize(const label len)
Alter addressable list size, allocating new space if required while recovering old content...
DynamicList< MPI_Comm > MPICommunicators_
Ostream & endl(Ostream &os)
Add newline and flush stream.
const int fromProcNo_
Source rank for the data.
int messageSize_
The message size, read on bufferIPCrecv or set directly.
void reset_request(UPstream::Request *requestPtr, label *requestIdx=nullptr)
Reset UPstream::Request to null and/or the index of the outstanding request to -1.
label capacity() const noexcept
Size of the underlying storage.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
"scheduled" : (MPI_Send, MPI_Recv)
An opaque wrapper for MPI_Request with a vendor-independent representation independent of any <mpi...
static label warnComm
Debugging: warn for use of any communicator differing from warnComm.
errorManip< error > abort(error &err)
commsTypes commsType() const noexcept
Get the communications type of the stream.
static void beginTiming()
Update timer prior to measurement.
int debug
Static debugging option.
static void addRequestTime()
Add time increment to request time.
void push_request(MPI_Request request, UPstream::Request *requestPtr=nullptr, label *requestIdx=nullptr)
Transcribe MPI_Request to UPstream::Request (does not affect the stack of outstanding requests) or el...
static Foam::label UPstream_mpi_receive(const Foam::UPstream::commsTypes commsType, char *buf, const std::streamsize bufSize, const int fromProcNo, const int tag, const Foam::label communicator, Foam::UPstream::Request *req)
DynamicList< char > & recvBuf_
Reference to the receive buffer data.
const int tag_
Message tag for communication.
static void addGatherTime()
Add time increment to gather time.
"nonBlocking" : (MPI_Isend, MPI_Irecv)
static void printStack(Ostream &os, int size=-1)
Helper function to print a stack, with optional upper limit.
void setEof() noexcept
Set stream state as reached 'eof'.
const int comm_
The communicator index.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.