39 #ifndef Foam_PstreamGlobals_H 40 #define Foam_PstreamGlobals_H 51 namespace PstreamGlobals
99 <<
"rank:" <<
rank <<
" : illegal communicator " 101 <<
"Communicator should be within range [0," 140 <<
"Invalid data type" 178 <<
"Invalid operation code" 190 if (req) *req = UPstream::Request(MPI_REQUEST_NULL);
200 UPstream::Request* req =
nullptr 208 else if (MPI_REQUEST_NULL != request)
DynamicList< MPI_Request > outstandingRequests_
Outstanding non-blocking operations.
Foam::FixedList< MPI_Datatype, 17 > DataTypeLookupTable
void deinitOpCodes()
Free any user-defined op codes.
A 1D vector of objects of type <T> with a fixed length <N>.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
void checkCommunicator(int comm, int rank)
Fatal if communicator is outside the allocated range.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr char nl
The newline '\n' character (0x0a)
DynamicList< MPI_Comm > MPICommunicators_
void initDataTypes()
Create mapping into MPIdataTypes_ and define user data types.
bool checkOpCodes()
Debugging only: check if op code mappings are non-null.
opCodes
Mapping of some MPI op codes.
DynamicList< bool > pendingMPIFree_
void reset_request(UPstream::Request *req) noexcept
Reset UPstream::Request to MPI_REQUEST_NULL.
void checkDataType(UPstream::dataTypes id)
Fatal if data type is not valid.
void initOpCodes()
Create mapping into MPIopCodes_.
An opaque wrapper for MPI_Request with a vendor-independent representation without any <mpi...
Foam::FixedList< MPI_Op, 13 > OpCodesLookupTable
#define FOAM_UNLIKELY(cond)
MPI_Op getOpCode(UPstream::opCodes id)
Lookup of opCodes enumeration as an MPI_Op.
static label warnComm
Debugging: warn for use of any communicator differing from warnComm.
errorManip< error > abort(error &err)
void initCommunicator(const label index)
Initialize bookkeeping for MPI communicator index.
Header for low-level interfaces between MPI and OpenFOAM. The detail interfaces are subject to change...
void printDataTypes(bool all=false)
Debugging only: print data type names (all or just user-defined)
bool warnCommunicator(int comm) noexcept
True if warn communicator is active and not equal to given communicator.
dataTypes
Mapping of some fundamental and aggregate types to MPI data types.
void deinitDataTypes()
Free any user data types.
DataTypeCountLookupTable dataTypesCount_
Fundamental count for each valid UPstream::dataTypes entry Indexed by UPstream::dataTypes enum...
MPI_Datatype getDataType(UPstream::dataTypes id)
Lookup of dataTypes enumeration as an MPI_Datatype.
bool checkDataTypes()
Debugging only: check if data type mappings are non-null.
bool all(const UList< bool > &bools)
True if all entries are 'true' or if the set is empty.
::Foam::direction rank(const expressions::valueTypeCode) noexcept
The vector-space rank associated with given valueTypeCode.
void push_request(MPI_Request request, UPstream::Request *req=nullptr)
Transcribe MPI_Request to UPstream::Request (does not affect the stack of outstanding requests) or el...
void checkOpCode(UPstream::opCodes id)
Fatal if opcode is not valid.
OpCodesLookupTable MPIopCodes_
MPI operation types, indexed by UPstream::opCodes enum.
bool broadcast_int64(int64_t &value, int comm)
Broadcast a single int64 value.
DataTypeLookupTable MPIdataTypes_
MPI data types corresponding to fundamental and OpenFOAM types. Indexed by UPstream::dataTypes enum...
std::string dataType_name(MPI_Datatype datatype)
Return MPI internal name for specified MPI_Datatype.
Foam::FixedList< int, 17 > DataTypeCountLookupTable