40 #ifndef Foam_UPstream_H 41 #define Foam_UPstream_H 57 namespace PstreamDetail {}
60 namespace PstreamUtils {}
332 static const commsStructList& null();
338 bool good() const
noexcept {
return (comm_ >= 0); }
341 int comm() const
noexcept {
return comm_; }
344 bool linear() const
noexcept {
return flat_; }
348 void linear(
bool on);
360 void init(
int communicator);
364 void init(
int communicator,
bool flat);
367 void reset(
int communicator);
371 void reset(
int communicator,
bool flat);
383 void printGraph(
Ostream&
os,
int proci = 0)
const;
401 return rhs.writeList(
os);
420 static bool haveThreads_;
423 static bool noInitialCommDup_;
431 static int constWorldComm_;
435 static int commInterNode_;
439 static int commLocalNode_;
442 static int numNodes_;
482 static label getAvailableCommIndex(
const label parentIndex);
486 static bool setHostCommunicators(
const int numPerNode = 0);
490 static bool setSharedMemoryCommunicators();
497 static void allocateCommunicatorComponents
499 const label parentIndex,
506 static void dupCommunicatorComponents
508 const label parentIndex,
519 static void splitCommunicatorComponents
521 const label parentIndex,
525 const bool two_step =
true 530 static void freeCommunicatorComponents(
const label index);
550 std::streamsize
count,
599 std::streamsize
count,
622 std::streamsize
count,
624 const int fromProcNo,
639 const void* sendData,
658 const void* sendData,
688 const void* sendData,
701 const void* sendData,
798 if (communicator >= 0)
worldComm = communicator;
817 static void printCommTree(
int communicator,
bool linear =
false);
825 return (parRun_ ? commInterNode_ : constWorldComm_);
831 return (parRun_ ? commLocalNode_ : constWorldComm_);
839 (commInterNode_ > constWorldComm_)
840 && (commLocalNode_ > constWorldComm_)
869 const labelRange& subRanks,
872 const bool withComponents =
true 885 const bool withComponents =
true 910 const bool two_step =
true 918 const bool withComponents =
true 927 static label
procNo(
const label comm,
const int baseProcID);
934 const label currentComm,
935 const int currentProcID
944 static bool init(
int& argc,
char**& argv,
const bool needsThread);
982 const int fromProcNo,
1001 const int fromProcNo,
1234 return procIDs_[communicator].
size();
1241 return myProcNo_[communicator];
1247 return myProcNo_[communicator] ==
masterNo();
1254 return myProcNo_[communicator] >=
masterNo();
1260 return myProcNo_[communicator] >
masterNo();
1271 parRun_ &&
is_rank(communicator) &&
nProcs(communicator) > 1
1279 static label
parent(
int communicator)
1281 return parentComm_(communicator);
1285 static List<int>&
procID(
int communicator)
1287 return procIDs_[communicator];
1352 const int communicator,
1359 parRun_ &&
is_rank(communicator)
1417 static void shutdown(
int errNo = 0);
1420 static void abort(
int errNo = 1);
1423 static void exit(
int errNo = 1);
1426 #undef Pstream_CommonRoutines 1427 #define Pstream_CommonRoutines(Type) \ 1431 static void allToAll \ 1434 const UList<Type>& sendData, \ 1436 UList<Type>& recvData, \ 1437 const int communicator = UPstream::worldComm \ 1448 static void allToAllConsensus \ 1451 const UList<Type>& sendData, \ 1453 UList<Type>& recvData, \ 1456 const int communicator = UPstream::worldComm \ 1464 static void allToAllConsensus \ 1467 const Map<Type>& sendData, \ 1469 Map<Type>& recvData, \ 1472 const int communicator = UPstream::worldComm \ 1477 static Map<Type> allToAllConsensus \ 1480 const Map<Type>& sendData, \ 1483 const int communicator = UPstream::worldComm \ 1486 Map<Type> recvData; \ 1487 allToAllConsensus(sendData, recvData, tag, communicator); \ 1494 #undef Pstream_CommonRoutines 1500 template<
class Type>
1504 const Type* sendData,
1514 template<
class Type>
1519 const Type* sendData,
1529 template<
class Type>
1540 template<
class Type>
1543 const Type* sendData,
1546 const UList<int>& recvCounts,
1547 const UList<int>& recvOffsets,
1552 template<
class Type>
1555 const Type* sendData,
1556 const UList<int>& sendCounts,
1557 const UList<int>& sendOffsets,
1571 const T& localValue,
1583 const T& localValue,
1606 template<
class Type>
1610 std::streamsize
count,
1679 const bool withComponents =
true 1691 const bool withComponents =
true 1712 template<
class Type>
1719 const
UList<
int>& counts,
1720 const
UList<
int>& offsets,
1728 template<
class Type>
1733 const
UList<
int>& counts,
1734 const
UList<
int>& offsets,
1751 class UPstream::communicator
1775 communicator(communicator&&
c) : comm_(
c.comm_) {
c.comm_ = -1; }
1781 const label parentComm,
1783 const labelRange& subRanks
1793 const label parentComm,
1823 const label parentComm,
1828 const bool two_step =
true 1840 bool good() const
noexcept {
return (comm_ >= 0); }
1843 label comm() const
noexcept {
return comm_; }
1846 communicator& constCast() const
noexcept 1848 return const_cast<communicator&
>(*this);
1853 label release()
noexcept { label
c(comm_); comm_ = -1;
return c; }
1859 void reset(label
parent,
const labelRange& subRanks)
1873 void reset(communicator&&
c)
1875 if (
this == &
c)
return;
1882 void swap(communicator&
c) { std::swap(comm_,
c.comm_); }
1888 operator label() const
noexcept {
return comm_; }
1891 void operator=(communicator&&
c) {
reset(std::move(
c)); }
1896 return (comm_ ==
c.comm_);
1902 return (comm_ !=
c.comm_);
1915 class UPstream::Communicator
1922 typedef std::intptr_t value_type;
1954 return (value_ == rhs.value_);
1960 return (value_ != rhs.value_);
1970 explicit Communicator(const
void*
p)
noexcept 1972 value_(reinterpret_cast<value_type>(
p))
1976 explicit Communicator(value_type val)
noexcept 1992 static Communicator lookup(
const int comm);
1998 value_type value() const
noexcept {
return value_; }
2001 const void* pointer() const
noexcept 2003 return reinterpret_cast<const void*
>(value_);
2032 typedef std::intptr_t value_type;
2047 Request(
const Request&)
noexcept =
default;
2050 Request(Request&&)
noexcept = default;
2053 Request& operator=(const Request&)
noexcept = default;
2056 Request& operator=(Request&&)
noexcept = default;
2062 bool operator==(const Request& rhs) const
noexcept 2064 return (value_ == rhs.value_);
2070 return (value_ != rhs.value_);
2080 explicit Request(const
void*
p)
noexcept 2082 value_(reinterpret_cast<value_type>(
p))
2086 explicit Request(value_type val)
noexcept 2095 value_type value() const
noexcept {
return value_; }
2098 const void* pointer() const
noexcept 2100 return reinterpret_cast<const void*
>(value_);
2125 Ostream&
operator<<(Ostream&,
const UPstream::commsStruct&);
2141 #include "UPstream.txx" static bool floatTransfer
Should compact transfer be used in which floats replace doubles reducing the bandwidth requirement at...
static bool mpi_send(const UPstream::commsTypes commsType, const void *buf, std::streamsize count, const UPstream::dataTypes dataTypeId, const int toProcNo, const int tag, const int communicator, UPstream::Request *req=nullptr, const UPstream::sendModes sendMode=UPstream::sendModes::normal)
Send buffer contents of specified data type to given processor.
static const word & myWorld()
My world.
commsStruct() noexcept
Default construct with above == -1.
6*float (eg, floatSymmTensor, complex vector)
(internal use) begin marker [user types]
void size(const label n)
Older name for setAddressableSize.
int above() const noexcept
The procID of the processor directly above.
9*double (eg, doubleTensor)
sendModes
Different MPI-send modes (ignored for commsTypes::buffered)
compatibility name for buffered
(internal use) begin marker [basic/all types]
static void removeRequests(const label pos, label len=-1)
Non-blocking comms: cancel/free outstanding requests (from position onwards) and remove from internal...
static bool usingNodeComms(const int communicator)
True if node topology-aware routines have been enabled, it is running in parallel, the starting point is the world-communicator and it is not an odd corner case (ie, all processes on one node, all processes on different nodes)
static const Enum< commsTypes > commsTypeNames
Enumerated names for the communication types.
static const labelList & worldIDs() noexcept
The indices into allWorlds for all processes.
static int incrMsgType(int val=1) noexcept
Increment the message tag for standard messages.
static void printCommTree(int communicator, bool linear=false)
Debugging: print the communication tree.
static void mpi_scatterv(const void *sendData, const UList< int > &sendCounts, const UList< int > &sendOffsets, void *recvData, int recvCount, const UPstream::dataTypes dataTypeId, const int communicator)
Send variable length data from rank 0 to all ranks. (caution: known to scale poorly) ...
An opaque wrapper for MPI_Comm with a vendor-independent representation without any <mpi...
commsTypes
Communications types.
static T listScatterValues(const UList< T > &allValues, const int communicator=UPstream::worldComm)
Scatter individual values from list locations.
Bit-wise xor for (unsigned) integral types.
const List< int > & allBelow() const noexcept
The procIDs of all processors below (so not just directly below)
An opaque wrapper for MPI_Win with a vendor-independent representation and without any <mpi...
static void printNodeCommsControl(Ostream &os)
Report the node-communication settings.
static void mpi_reduce(void *values, int count, const UPstream::dataTypes dataTypeId, const UPstream::opCodes opCodeId, const int communicator, UPstream::Request *req=nullptr)
In-place reduction of values with result on rank 0.
static void freeCommunicator(const label communicator, const bool withComponents=true)
Free a previously allocated communicator.
static label nRequests() noexcept
Number of outstanding requests (on the internal list of requests)
3*float (eg, floatVector)
An interval of (signed) integers defined by a start and a size.
static rangeType allProcs(const label communicator=worldComm)
Range of process indices for all processes.
A range or interval of labels defined by a start and a size.
static const commsStructList & linearCommunication(int communicator)
Linear communication schedule (special case) for given communicator.
IntRange< int > rangeType
Int ranges are used for MPI ranks (processes)
static int maxCommsSize
Optional maximum message size (bytes)
bool empty() const noexcept
True if List is empty (ie, size() is zero)
static label allocateCommunicator(const label parent, const labelRange &subRanks, const bool withComponents=true)
Create new communicator with sub-ranks on the parent communicator.
static int nProcsSimpleSum
Number of processors to change from linear to tree communication.
static void mpi_gather(const void *sendData, void *recvData, int count, const UPstream::dataTypes dataTypeId, const int communicator, UPstream::Request *req=nullptr)
Receive identically-sized (contiguous) data from all ranks, placing the result on rank 0...
static void mpiScatter(const Type *sendData, Type *recvData, int count, const int communicator=UPstream::worldComm)
Send identically-sized (contiguous) data to all ranks.
static label newCommunicator(const label parent, const labelRange &subRanks, const bool withComponents=true)
Create new communicator with sub-ranks on the parent communicator.
static bool initNull()
Special purpose initialisation function.
9*float (eg, floatTensor)
static bool & parRun() noexcept
Test if this a parallel run.
static void cancelRequest(const label i)
Non-blocking comms: cancel and free outstanding request. Corresponds to MPI_Cancel() + MPI_Request_fr...
#define Pstream_CommonRoutines(Type)
static int nodeCommsMin_
Minimum number of nodes before topology-aware routines are enabled.
static List< T > allGatherValues(const T &localValue, const int communicator=UPstream::worldComm)
Allgather individual values into list locations.
static bool finishedRequest(const label i)
Non-blocking comms: has request i finished? Corresponds to MPI_Test()
static label procNo(const label comm, const int baseProcID)
Return processor number in communicator (given physical processor number) (= reverse of baseProcNo) ...
static constexpr int commGlobal() noexcept
Communicator for all ranks, irrespective of any local worlds.
static int & msgType() noexcept
Message tag of standard messages.
static int topologyControl_
Selection of topology-aware routines as a bitmask combination of the topoControls enumerations...
static void freeRequest(UPstream::Request &req)
Non-blocking comms: free outstanding request. Corresponds to MPI_Request_free()
void reset()
Reset to default constructed state.
(internal use) begin marker [reduce/window types]
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Negative if the process is not a...
static label worldComm
Communicator for all ranks. May differ from commGlobal() if local worlds are in use.
static void freeRequests(UList< UPstream::Request > &requests)
Non-blocking comms: free outstanding requests. Corresponds to MPI_Request_free()
(internal use) end marker [all types]
mapGather (reduction) [manual algorithm]
static const commsStructList & treeCommunication(int communicator)
Tree communication schedule (standard case) for given communicator.
static void waitRequests()
Wait for all requests to finish.
static void mpiGather(const Type *sendData, Type *recvData, int count, const int communicator=UPstream::worldComm)
Receive identically-sized (contiguous) data from all ranks.
static int tuning_NBX_
Tuning parameters for non-blocking exchange (NBX)
static void shutdown(int errNo=0)
Shutdown (finalize) MPI as required.
UList< label > labelUList
A UList of labels.
static label parent(int communicator)
The parent communicator.
ClassName("UPstream")
Declare name of the class and its debug switch.
Various functions to operate on Lists.
opCodes
Mapping of some MPI op codes.
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
static void gather(const Type *send, int count, Type *recv, const UList< int > &counts, const UList< int > &offsets, const int comm=UPstream::worldComm)
static List< T > listGatherValues(const T &localValue, const int communicator=UPstream::worldComm)
Gather individual values into list locations.
static bool finishedRequestPair(label &req0, label &req1)
Non-blocking comms: have both requests finished? Corresponds to pair of MPI_Test() ...
static int nProcsNonblockingExchange
Number of processors to change to nonBlocking consensual exchange (NBX). Ignored for zero or negative...
byte, char, unsigned char, ...
static label commWarn(const label communicator) noexcept
Alter communicator debugging setting. Warns for use of any communicator differing from specified...
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
6*double (eg, doubleSymmTensor, complex vector)
dimensionedScalar pos(const dimensionedScalar &ds)
Ostream & writeList(Ostream &os, const label shortLen=0) const
Write List, with line-breaks in ASCII when length exceeds shortLen.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
static void send_done(const int toProcNo, const int communicator, const int tag=UPstream::msgType()+1970)
Impose a point-to-point synchronisation barrier by sending a zero-byte "done" message to given rank...
static void barrier(const int communicator, UPstream::Request *req=nullptr)
Impose a synchronisation barrier (optionally non-blocking)
static int nPollProcInterfaces
Number of polling cycles in processor updates.
static int commInterNode() noexcept
Communicator between nodes/hosts (respects any local worlds)
static void exit(int errNo=1)
Shutdown (finalize) MPI as required and exit program with errNo.
static const commsStructList & whichCommunication(const int communicator, bool linear=false)
Communication schedule for all-to-master (proc 0) as linear/tree/none with switching based on UPstrea...
static bool is_rank(const label communicator=worldComm)
True if process corresponds to any rank (master or sub-rank) in the given communicator.
"scheduled" (MPI standard) : (MPI_Send, MPI_Recv)
static void printTopoControl(Ostream &os)
Report the topology routines settings.
static bool init(int &argc, char **&argv, const bool needsThread)
Initialisation function called from main.
(internal use) end marker [window types]
void clear()
Clear the list, i.e. set size to zero.
An opaque wrapper for MPI_Request with a vendor-independent representation without any <mpi...
static void mpi_scatter(const void *sendData, void *recvData, int count, const UPstream::dataTypes dataTypeId, const int communicator, UPstream::Request *req=nullptr)
Send identically-sized (contiguous) data from rank 0 to all other ranks.
static void mpiGatherv(const Type *sendData, int sendCount, Type *recvData, const UList< int > &recvCounts, const UList< int > &recvOffsets, const int communicator=UPstream::worldComm)
Receive variable length data from all ranks.
static int commConstWorld() noexcept
Communicator for all ranks (respecting any local worlds).
static constexpr int masterNo() noexcept
Relative rank for the master process - is always 0.
static constexpr int commSelf() noexcept
Communicator within the current rank only.
static const commsStructList & null()
An empty structure. Used for placeholders etc.
static label commInterHost() noexcept
Communicator between nodes (respects any local worlds)
(internal use) end marker [all types]
static bool is_parallel(const label communicator=worldComm)
True if parallel algorithm or exchange is required.
A HashTable similar to std::unordered_map.
static std::streamsize mpi_receive(const UPstream::commsTypes commsType, void *buf, std::streamsize count, const UPstream::dataTypes dataTypeId, const int fromProcNo, const int tag, const int communicator, UPstream::Request *req=nullptr)
Receive buffer contents of specified data type from given processor.
static label warnComm
Debugging: warn for use of any communicator differing from warnComm.
Structure for communicating between processors.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
static void reduceAnd(bool &value, const int communicator=worldComm)
Logical (and) reduction (MPI_AllReduce)
static bool waitAnyRequest(const label pos, label len=-1)
Wait until any request (from position onwards) has finished. Corresponds to MPI_Waitany() ...
commsTypes commsType() const noexcept
Get the communications type of the stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
static std::pair< int, int64_t > probeMessage(const UPstream::commsTypes commsType, const int fromProcNo, const int tag=UPstream::msgType(), const int communicator=worldComm)
Probe for an incoming message.
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
static void mpiAllGather(Type *allData, int count, const int communicator=UPstream::worldComm)
Gather/scatter identically-sized data.
A set of traits associated with UPstream communication.
static void resetRequests(const label n)
Truncate outstanding requests to given length, which is expected to be in the range [0 to nRequests()...
UPstream(const commsTypes commsType) noexcept
Construct for given communication type.
static int commLocalNode() noexcept
Communicator within the node/host (respects any local worlds)
const List< int > & below() const noexcept
The procIDs of the processors directly below.
static bool is_subrank(const label communicator=worldComm)
True if process corresponds to a sub-rank in the given communicator.
OBJstream os(runTime.globalPath()/outputName)
Collection of communication structures.
topoControls
Some bit masks corresponding to topology controls.
static const List< int > & interNode_offsets()
Processor offsets corresponding to the inter-node communicator.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
static void waitRequestPair(label &req0, label &req1)
Non-blocking comms: wait for both requests to finish. Corresponds to pair of MPI_Wait() ...
dataTypes
Mapping of some fundamental and aggregate types to MPI data types.
static void addRequest(UPstream::Request &req)
Transfer the (wrapped) MPI request to the internal global list and invalidate the parameter (ignores ...
static label commWorld() noexcept
Communicator for all ranks (respecting any local worlds)
void reset_linear(const int myProci, const int numProcs)
Reset to linear (flat) communication.
Wrapper for internally indexed communicator label. Always invokes UPstream::allocateCommunicatorCompo...
static bool split(const std::string &line, std::string &key, std::string &val)
static void mpiScatterv(const Type *sendData, const UList< int > &sendCounts, const UList< int > &sendOffsets, Type *recvData, int recvCount, const int communicator=UPstream::worldComm)
Send variable length data to all ranks.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
List< word > wordList
List of word.
static label commIntraHost() noexcept
Communicator within the node (respects any local worlds)
(internal use) begin marker [window types]
static int wait_done(const int fromProcNo, const int communicator, const int tag=UPstream::msgType()+1970)
Impose a point-to-point synchronisation barrier by receiving a zero-byte "done" message from given ra...
static commsTypes defaultCommsType
Default commsType.
static void cancelRequests(UList< UPstream::Request > &requests)
Non-blocking comms: cancel and free outstanding requests. Corresponds to MPI_Cancel() + MPI_Request_f...
static void mpi_allgather(void *allData, int count, const UPstream::dataTypes dataTypeId, const int communicator, UPstream::Request *req=nullptr)
Gather/scatter identically-sized data.
static void mpi_gatherv(const void *sendData, int sendCount, void *recvData, const UList< int > &recvCounts, const UList< int > &recvOffsets, const UPstream::dataTypes dataTypeId, const int communicator)
Receive variable length data from all ranks, placing the result on rank 0. (caution: known to scale p...
static label dupCommunicator(const label parent)
Duplicate the parent communicator.
static const rangeType & localNode_parentProcs()
The range (start/size) of the commLocalNode ranks in terms of the (const) world communicator processo...
static label nComms() noexcept
Number of currently defined communicators.
limits reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL))
const dimensionedScalar c
Speed of light in a vacuum.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
Bit-wise or for (unsigned) integral types.
static void mpi_allreduce(void *values, int count, const UPstream::dataTypes dataTypeId, const UPstream::opCodes opCodeId, const int communicator, UPstream::Request *req=nullptr)
In-place reduction of values with same result on all ranks.
"nonBlocking" (immediate) : (MPI_Isend, MPI_Irecv)
static int numNodes() noexcept
The number of shared/host nodes in the (const) world communicator.
static List< int > & procID(int communicator)
The list of ranks within a given communicator.
(internal use) end marker [reduce types]
bool operator!=(const eddy &a, const eddy &b)
static bool haveThreads() noexcept
Have support for threads.
static label splitCommunicator(const label parent, const int colour, const bool two_step=true)
Allocate a new communicator by splitting the parent communicator on the given colour.
static void abort(int errNo=1)
Call MPI_Abort with no other checks or cleanup.
static rangeType subProcs(const label communicator=worldComm)
Range of process indices for sub-processes.
List< label > labelList
A List of labels.
int nProcs() const noexcept
The number of processors addressed by the structure.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
"buffered" : (MPI_Bsend, MPI_Recv)
static const int mpiBufferSize
MPI buffer-size (bytes)
static const wordList & allWorlds() noexcept
All worlds.
static bool mpi_broadcast(void *buf, std::streamsize count, const UPstream::dataTypes dataTypeId, const int communicator)
Broadcast buffer contents from rank=0 to all ranks. The sizes must match on all processes.
const List< int > & allNotBelow() const noexcept
The procIDs of all processors not below myProcNo. The inverse set of allBelow without myProcNo...
static void reduceOr(bool &value, const int communicator=worldComm)
Logical (or) reduction (MPI_AllReduce)
static void waitRequest(const label i)
Wait until request i has finished. Corresponds to MPI_Wait()
static void mpiReduce(T values[], int count, const UPstream::opCodes opCodeId, const int communicator)
MPI_Reduce (blocking) for known operators.
static bool usingTopoControl(UPstream::topoControls ctrl) noexcept
Test for selection of given topology-aware routine.
Inter-processor communications stream.
static bool hasNodeCommunicators() noexcept
Both inter-node and local-node communicators have been created.
(internal use) end marker [basic types]
static int baseProcNo(label comm, int procID)
Return physical processor number (i.e. processor number in worldComm) given communicator and processo...
gatherList [manual algorithm]
static bool broadcast(Type *buffer, std::streamsize count, const int communicator)
Broadcast buffer contents (contiguous types), from rank=0 to all ranks. The sizes must match on all p...
static void addValidParOptions(HashTable< string > &validParOptions)
Add the valid option this type of communications library adds/requires on the command line...
3*double (eg, doubleVector)
(internal use) end marker [user types]
static int nodeCommsControl_
Use of host/node topology-aware routines.
static label myWorldID()
My worldID.
static void scatter(const Type *send, const UList< int > &counts, const UList< int > &offsets, Type *recv, int count, const int comm=UPstream::worldComm)
static bool waitSomeRequests(const label pos, label len=-1, DynamicList< int > *indices=nullptr)
Wait until some requests (from position onwards) have finished. Corresponds to MPI_Waitsome() ...
static bool finishedRequests(const label pos, label len=-1)
Non-blocking comms: have all requests (from position onwards) finished? Corresponds to MPI_Testall() ...
Bit-wise and for (unsigned) integral types.
static void mpiAllReduce(T values[], int count, const UPstream::opCodes opCodeId, const int communicator)
MPI_Allreduce (blocking) for known operators.