mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
COMP: replace selfComm/globalComm variables with functions instead (#2799)
- with C++11, static constexpr variables apparently also require definition in a translation unit and not just as inlined quantities. Mostly not an issue, however gcc with -O0 does not do the inlining and thus actually requires them to be defined in a translation unit as well. These variables were provided for symmetry with worldComm, but only used in low-level internal code. Changing to inlined functions solves the linkage issue and also aligns with the commWorld() function naming. Mnemonics: MPI_COMM_SELF => UPstream::commSelf() overall MPI_COMM_WORLD => UPstream::commGlobal(), sometimes commWorld() local COMM_WORLD => UPstream::commWorld()
This commit is contained in:
@ -220,7 +220,7 @@ Foam::UIPstreamBase::UIPstreamBase
|
||||
Istream(fmt),
|
||||
fromProcNo_(UPstream::masterNo()), // placeholder
|
||||
tag_(UPstream::msgType()), // placeholder
|
||||
comm_(UPstream::selfComm), // placeholder
|
||||
comm_(UPstream::commSelf()), // placeholder
|
||||
messageSize_(receiveBuf.size()), // Message == buffer
|
||||
storedRecvBufPos_(0),
|
||||
clearAtEnd_(false), // Do not clear recvBuf if at end!!
|
||||
|
||||
Reference in New Issue
Block a user