UPstream Class Reference

Inter-processor communications stream. More...

Inheritance diagram for UPstream:
Collaboration diagram for UPstream:

Classes

class  commsStruct
 Structure for communicating between processors. More...
 
class  Communicator
 An opaque wrapper for MPI_Comm with a vendor-independent representation without any <mpi.h> header. More...
 
class  communicator
 Wrapper class for allocating/freeing communicators. Always invokes allocateCommunicatorComponents() and freeCommunicatorComponents() More...
 
class  Request
 An opaque wrapper for MPI_Request with a vendor-independent representation without any <mpi.h> header. More...
 

Public Types

enum  commsTypes : char { buffered, scheduled, nonBlocking, blocking = buffered }
 Communications types. More...
 
enum  sendModes : char { normal, sync }
 Different MPI-send modes (ignored for commsTypes::buffered) More...
 
typedef IntRange< int > rangeType
 Int ranges are used for MPI ranks (processes) More...
 

Public Member Functions

 ClassName ("UPstream")
 Declare name of the class and its debug switch. More...
 
 UPstream (const commsTypes commsType) noexcept
 Construct for given communication type. More...
 
commsTypes commsType () const noexcept
 Get the communications type of the stream. More...
 
commsTypes commsType (const commsTypes ct) noexcept
 Set the communications type of the stream. More...
 
template<class T >
Foam::List< TallGatherValues (const T &localValue, const label comm)
 
template<class T >
Foam::List< TlistGatherValues (const T &localValue, const label comm)
 

Static Public Member Functions

static constexpr label commGlobal () noexcept
 Communicator for all ranks, irrespective of any local worlds. More...
 
static constexpr label commSelf () noexcept
 Communicator within the current rank only. More...
 
static label commWorld () noexcept
 Communicator for all ranks (respecting any local worlds) More...
 
static label commWorld (const label communicator) noexcept
 Set world communicator. Negative values are a no-op. More...
 
static label commWarn (const label communicator) noexcept
 Alter communicator debugging setting. Warns for use of any communicator differing from specified. More...
 
static label nComms () noexcept
 Number of currently defined communicators. More...
 
static void printCommTree (const label communicator)
 Debugging: print the communication tree. More...
 
static label commIntraHost ()
 Demand-driven: Intra-host communicator (respects any local worlds) More...
 
static label commInterHost ()
 Demand-driven: Inter-host communicator (respects any local worlds) More...
 
static bool hasHostComms ()
 Test for presence of any intra or inter host communicators. More...
 
static void clearHostComms ()
 Remove any existing intra and inter host communicators. More...
 
static label allocateCommunicator (const label parent, const labelRange &subRanks, const bool withComponents=true)
 Allocate new communicator with contiguous sub-ranks on the parent communicator. More...
 
static label allocateCommunicator (const label parent, const labelUList &subRanks, const bool withComponents=true)
 Allocate new communicator with sub-ranks on the parent communicator. More...
 
static void freeCommunicator (const label communicator, const bool withComponents=true)
 Free a previously allocated communicator. More...
 
static label allocateInterHostCommunicator (const label parentCommunicator=worldComm)
 Allocate an inter-host communicator. More...
 
static label allocateIntraHostCommunicator (const label parentCommunicator=worldComm)
 Allocate an intra-host communicator. More...
 
static int baseProcNo (label comm, int procID)
 Return physical processor number (i.e. processor number in worldComm) given communicator and processor. More...
 
static label procNo (const label comm, const int baseProcID)
 Return processor number in communicator (given physical processor number) (= reverse of baseProcNo) More...
 
static label procNo (const label comm, const label currentComm, const int currentProcID)
 Return processor number in communicator (given processor number and communicator) More...
 
static void addValidParOptions (HashTable< string > &validParOptions)
 Add the valid option this type of communications library adds/requires on the command line. More...
 
static bool init (int &argc, char **&argv, const bool needsThread)
 Initialisation function called from main. More...
 
static bool initNull ()
 Special purpose initialisation function. More...
 
static void barrier (const label communicator, UPstream::Request *req=nullptr)
 Impose a synchronisation barrier (optionally non-blocking) More...
 
static std::pair< int, int64_t > probeMessage (const UPstream::commsTypes commsType, const int fromProcNo, const int tag=UPstream::msgType(), const label communicator=worldComm)
 Probe for an incoming message. More...
 
static label nRequests () noexcept
 Number of outstanding requests (on the internal list of requests) More...
 
static void resetRequests (const label n)
 Truncate outstanding requests to given length, which is expected to be in the range [0 to nRequests()]. More...
 
static void addRequest (UPstream::Request &req)
 Transfer the (wrapped) MPI request to the internal global list. More...
 
static void cancelRequest (const label i)
 Non-blocking comms: cancel and free outstanding request. Corresponds to MPI_Cancel() + MPI_Request_free() More...
 
static void cancelRequest (UPstream::Request &req)
 Non-blocking comms: cancel and free outstanding request. Corresponds to MPI_Cancel() + MPI_Request_free() More...
 
static void cancelRequests (UList< UPstream::Request > &requests)
 Non-blocking comms: cancel and free outstanding requests. Corresponds to MPI_Cancel() + MPI_Request_free() More...
 
static void removeRequests (const label pos, label len=-1)
 Non-blocking comms: cancel/free outstanding requests (from position onwards) and remove from internal list of requests. Corresponds to MPI_Cancel() + MPI_Request_free() More...
 
static void freeRequest (UPstream::Request &req)
 Non-blocking comms: free outstanding request. Corresponds to MPI_Request_free() More...
 
static void freeRequests (UList< UPstream::Request > &requests)
 Non-blocking comms: free outstanding requests. Corresponds to MPI_Request_free() More...
 
static void waitRequests (const label pos, label len=-1)
 Wait until all requests (from position onwards) have finished. Corresponds to MPI_Waitall() More...
 
static void waitRequests (UList< UPstream::Request > &requests)
 Wait until all requests have finished. Corresponds to MPI_Waitall() More...
 
static bool waitAnyRequest (const label pos, label len=-1)
 Wait until any request (from position onwards) has finished. Corresponds to MPI_Waitany() More...
 
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() More...
 
static bool waitSomeRequests (UList< UPstream::Request > &requests, DynamicList< int > *indices=nullptr)
 Wait until some requests have finished. Corresponds to MPI_Waitsome() More...
 
static label waitAnyRequest (UList< UPstream::Request > &requests)
 Wait until any request has finished and return its index. Corresponds to MPI_Waitany() More...
 
static void waitRequest (const label i)
 Wait until request i has finished. Corresponds to MPI_Wait() More...
 
static void waitRequest (UPstream::Request &req)
 Wait until specified request has finished. Corresponds to MPI_Wait() More...
 
static bool finishedRequest (const label i)
 Non-blocking comms: has request i finished? Corresponds to MPI_Test() More...
 
static bool finishedRequest (UPstream::Request &req)
 Non-blocking comms: has request finished? Corresponds to MPI_Test() More...
 
static bool finishedRequests (const label pos, label len=-1)
 Non-blocking comms: have all requests (from position onwards) finished? Corresponds to MPI_Testall() More...
 
static bool finishedRequests (UList< UPstream::Request > &requests)
 Non-blocking comms: have all requests finished? Corresponds to MPI_Testall() More...
 
static bool finishedRequestPair (label &req0, label &req1)
 Non-blocking comms: have both requests finished? Corresponds to pair of MPI_Test() More...
 
static void waitRequestPair (label &req0, label &req1)
 Non-blocking comms: wait for both requests to finish. Corresponds to pair of MPI_Wait() More...
 
static bool parRun (const bool on) noexcept
 Set as parallel run on/off. More...
 
static bool & parRun () noexcept
 Test if this a parallel run. More...
 
static bool haveThreads () noexcept
 Have support for threads. More...
 
static constexpr int masterNo () noexcept
 Relative rank for the master process - is always 0. More...
 
static label nProcs (const label communicator=worldComm)
 Number of ranks in parallel run (for given communicator). It is 1 for serial run. More...
 
static int myProcNo (const label communicator=worldComm)
 Rank of this process in the communicator (starting from masterNo()). Can be negative if the process is not a rank in the communicator. More...
 
static bool master (const label communicator=worldComm)
 True if process corresponds to the master rank in the communicator. More...
 
static bool is_rank (const label communicator=worldComm)
 True if process corresponds to any rank (master or sub-rank) in the given communicator. More...
 
static bool is_subrank (const label communicator=worldComm)
 True if process corresponds to a sub-rank in the given communicator. More...
 
static bool is_parallel (const label communicator=worldComm)
 True if parallel algorithm or exchange is required. More...
 
static label parent (const label communicator)
 The parent communicator. More...
 
static List< int > & procID (const label communicator)
 The list of ranks within a given communicator. More...
 
static const wordListallWorlds () noexcept
 All worlds. More...
 
static const labelListworldIDs () noexcept
 The indices into allWorlds for all processes. More...
 
static label myWorldID ()
 My worldID. More...
 
static const wordmyWorld ()
 My world. More...
 
static rangeType allProcs (const label communicator=worldComm)
 Range of process indices for all processes. More...
 
static rangeType subProcs (const label communicator=worldComm)
 Range of process indices for sub-processes. More...
 
static const List< commsStruct > & linearCommunication (const label communicator=worldComm)
 Communication schedule for linear all-to-master (proc 0) More...
 
static const List< commsStruct > & treeCommunication (const label communicator=worldComm)
 Communication schedule for tree all-to-master (proc 0) More...
 
static const List< commsStruct > & whichCommunication (const label communicator=worldComm)
 Communication schedule for all-to-master (proc 0) as linear/tree/none with switching based on UPstream::nProcsSimpleSum and the is_parallel() state. More...
 
static int & msgType () noexcept
 Message tag of standard messages. More...
 
static int msgType (int val) noexcept
 Set the message tag for standard messages. More...
 
static int incrMsgType (int val=1) noexcept
 Increment the message tag for standard messages. More...
 
static void shutdown (int errNo=0)
 Shutdown (finalize) MPI as required. More...
 
static void abort ()
 Call MPI_Abort with no other checks or cleanup. More...
 
static void exit (int errNo=1)
 Shutdown (finalize) MPI as required and exit program with errNo. More...
 
static void allToAll (const UList< int32_t > &sendData, UList< int32_t > &recvData, const label communicator=worldComm)
 Exchange int32_t data with all ranks in communicator. More...
 
static void allToAllConsensus (const UList< int32_t > &sendData, UList< int32_t > &recvData, const int tag, const label communicator=worldComm)
 Exchange non-zero int32_t data between ranks [NBX]. More...
 
static void allToAllConsensus (const Map< int32_t > &sendData, Map< int32_t > &recvData, const int tag, const label communicator=worldComm)
 Exchange int32_t data between ranks [NBX]. More...
 
static Map< int32_t > allToAllConsensus (const Map< int32_t > &sendData, const int tag, const label communicator=worldComm)
 Exchange int32_t data between ranks [NBX]. More...
 
static void allToAll (const UList< int64_t > &sendData, UList< int64_t > &recvData, const label communicator=worldComm)
 Exchange int64_t data with all ranks in communicator. More...
 
static void allToAllConsensus (const UList< int64_t > &sendData, UList< int64_t > &recvData, const int tag, const label communicator=worldComm)
 Exchange non-zero int64_t data between ranks [NBX]. More...
 
static void allToAllConsensus (const Map< int64_t > &sendData, Map< int64_t > &recvData, const int tag, const label communicator=worldComm)
 Exchange int64_t data between ranks [NBX]. More...
 
static Map< int64_t > allToAllConsensus (const Map< int64_t > &sendData, const int tag, const label communicator=worldComm)
 Exchange int64_t data between ranks [NBX]. More...
 
static void mpiGather (const char *sendData, char *recvData, int count, const label communicator=worldComm)
 Receive identically-sized char data from all ranks. More...
 
static void mpiScatter (const char *sendData, char *recvData, int count, const label communicator=worldComm)
 Send identically-sized char data to all ranks. More...
 
static void mpiAllGather (char *allData, int count, const label communicator=worldComm)
 Gather/scatter identically-sized char data. More...
 
static void gather (const char *sendData, int sendCount, char *recvData, const UList< int > &recvCounts, const UList< int > &recvOffsets, const label communicator=worldComm)
 Receive variable length char data from all ranks. More...
 
static void scatter (const char *sendData, const UList< int > &sendCounts, const UList< int > &sendOffsets, char *recvData, int recvCount, const label communicator=worldComm)
 Send variable length char data to all ranks. More...
 
static void mpiGather (const int32_t *sendData, int32_t *recvData, int count, const label communicator=worldComm)
 Receive identically-sized int32_t data from all ranks. More...
 
static void mpiScatter (const int32_t *sendData, int32_t *recvData, int count, const label communicator=worldComm)
 Send identically-sized int32_t data to all ranks. More...
 
static void mpiAllGather (int32_t *allData, int count, const label communicator=worldComm)
 Gather/scatter identically-sized int32_t data. More...
 
static void gather (const int32_t *sendData, int sendCount, int32_t *recvData, const UList< int > &recvCounts, const UList< int > &recvOffsets, const label communicator=worldComm)
 Receive variable length int32_t data from all ranks. More...
 
static void scatter (const int32_t *sendData, const UList< int > &sendCounts, const UList< int > &sendOffsets, int32_t *recvData, int recvCount, const label communicator=worldComm)
 Send variable length int32_t data to all ranks. More...
 
static void mpiGather (const int64_t *sendData, int64_t *recvData, int count, const label communicator=worldComm)
 Receive identically-sized int64_t data from all ranks. More...
 
static void mpiScatter (const int64_t *sendData, int64_t *recvData, int count, const label communicator=worldComm)
 Send identically-sized int64_t data to all ranks. More...
 
static void mpiAllGather (int64_t *allData, int count, const label communicator=worldComm)
 Gather/scatter identically-sized int64_t data. More...
 
static void gather (const int64_t *sendData, int sendCount, int64_t *recvData, const UList< int > &recvCounts, const UList< int > &recvOffsets, const label communicator=worldComm)
 Receive variable length int64_t data from all ranks. More...
 
static void scatter (const int64_t *sendData, const UList< int > &sendCounts, const UList< int > &sendOffsets, int64_t *recvData, int recvCount, const label communicator=worldComm)
 Send variable length int64_t data to all ranks. More...
 
static void mpiGather (const uint32_t *sendData, uint32_t *recvData, int count, const label communicator=worldComm)
 Receive identically-sized uint32_t data from all ranks. More...
 
static void mpiScatter (const uint32_t *sendData, uint32_t *recvData, int count, const label communicator=worldComm)
 Send identically-sized uint32_t data to all ranks. More...
 
static void mpiAllGather (uint32_t *allData, int count, const label communicator=worldComm)
 Gather/scatter identically-sized uint32_t data. More...
 
static void gather (const uint32_t *sendData, int sendCount, uint32_t *recvData, const UList< int > &recvCounts, const UList< int > &recvOffsets, const label communicator=worldComm)
 Receive variable length uint32_t data from all ranks. More...
 
static void scatter (const uint32_t *sendData, const UList< int > &sendCounts, const UList< int > &sendOffsets, uint32_t *recvData, int recvCount, const label communicator=worldComm)
 Send variable length uint32_t data to all ranks. More...
 
static void mpiGather (const uint64_t *sendData, uint64_t *recvData, int count, const label communicator=worldComm)
 Receive identically-sized uint64_t data from all ranks. More...
 
static void mpiScatter (const uint64_t *sendData, uint64_t *recvData, int count, const label communicator=worldComm)
 Send identically-sized uint64_t data to all ranks. More...
 
static void mpiAllGather (uint64_t *allData, int count, const label communicator=worldComm)
 Gather/scatter identically-sized uint64_t data. More...
 
static void gather (const uint64_t *sendData, int sendCount, uint64_t *recvData, const UList< int > &recvCounts, const UList< int > &recvOffsets, const label communicator=worldComm)
 Receive variable length uint64_t data from all ranks. More...
 
static void scatter (const uint64_t *sendData, const UList< int > &sendCounts, const UList< int > &sendOffsets, uint64_t *recvData, int recvCount, const label communicator=worldComm)
 Send variable length uint64_t data to all ranks. More...
 
static void mpiGather (const float *sendData, float *recvData, int count, const label communicator=worldComm)
 Receive identically-sized float data from all ranks. More...
 
static void mpiScatter (const float *sendData, float *recvData, int count, const label communicator=worldComm)
 Send identically-sized float data to all ranks. More...
 
static void mpiAllGather (float *allData, int count, const label communicator=worldComm)
 Gather/scatter identically-sized float data. More...
 
static void gather (const float *sendData, int sendCount, float *recvData, const UList< int > &recvCounts, const UList< int > &recvOffsets, const label communicator=worldComm)
 Receive variable length float data from all ranks. More...
 
static void scatter (const float *sendData, const UList< int > &sendCounts, const UList< int > &sendOffsets, float *recvData, int recvCount, const label communicator=worldComm)
 Send variable length float data to all ranks. More...
 
static void mpiGather (const double *sendData, double *recvData, int count, const label communicator=worldComm)
 Receive identically-sized double data from all ranks. More...
 
static void mpiScatter (const double *sendData, double *recvData, int count, const label communicator=worldComm)
 Send identically-sized double data to all ranks. More...
 
static void mpiAllGather (double *allData, int count, const label communicator=worldComm)
 Gather/scatter identically-sized double data. More...
 
static void gather (const double *sendData, int sendCount, double *recvData, const UList< int > &recvCounts, const UList< int > &recvOffsets, const label communicator=worldComm)
 Receive variable length double data from all ranks. More...
 
static void scatter (const double *sendData, const UList< int > &sendCounts, const UList< int > &sendOffsets, double *recvData, int recvCount, const label communicator=worldComm)
 Send variable length double data to all ranks. More...
 
template<class T >
static List< TallGatherValues (const T &localValue, const label communicator=worldComm)
 Allgather individual values into list locations. More...
 
template<class T >
static List< TlistGatherValues (const T &localValue, const label communicator=worldComm)
 Gather individual values into list locations. More...
 
template<class T >
static T listScatterValues (const UList< T > &allValues, const label communicator=worldComm)
 Scatter individual values from list locations. More...
 
static bool broadcast (char *buf, const std::streamsize bufSize, const label communicator, const int rootProcNo=masterNo())
 Broadcast buffer contents to all processes in given communicator. The sizes must match on all processes. More...
 
static void reduceAnd (bool &value, const label communicator=worldComm)
 Logical (and) reduction (MPI_AllReduce) More...
 
static void reduceOr (bool &value, const label communicator=worldComm)
 Logical (or) reduction (MPI_AllReduce) More...
 
static void waitRequests ()
 Wait for all requests to finish. More...
 
static constexpr int firstSlave () noexcept
 Process index of first sub-process. More...
 

Static Public Attributes

static const Enum< commsTypescommsTypeNames
 Enumerated names for the communication types. More...
 
static bool floatTransfer
 Should compact transfer be used in which floats replace doubles reducing the bandwidth requirement at the expense of some loss in accuracy. More...
 
static int nProcsSimpleSum
 Number of processors to change from linear to tree communication. More...
 
static int nProcsNonblockingExchange
 Number of processors to change to nonBlocking consensual exchange (NBX). Ignored for zero or negative values. More...
 
static int nPollProcInterfaces
 Number of polling cycles in processor updates. More...
 
static commsTypes defaultCommsType
 Default commsType. More...
 
static int maxCommsSize
 Optional maximum message size (bytes) More...
 
static int tuning_NBX_
 Tuning parameters for non-blocking exchange (NBX) More...
 
static const int mpiBufferSize
 MPI buffer-size (bytes) More...
 
static label worldComm
 Communicator for all ranks. May differ from commGlobal() if local worlds are in use. More...
 
static label warnComm
 Debugging: warn for use of any communicator differing from warnComm. More...
 

Detailed Description

Inter-processor communications stream.

Source files

Definition at line 65 of file UPstream.H.

Member Typedef Documentation

◆ rangeType

typedef IntRange<int> rangeType

Int ranges are used for MPI ranks (processes)

Definition at line 72 of file UPstream.H.

Member Enumeration Documentation

◆ commsTypes

enum commsTypes : char
strong

Communications types.

Enumerator
buffered 

"buffered" : (MPI_Bsend, MPI_Recv)

scheduled 

"scheduled" (MPI standard) : (MPI_Send, MPI_Recv)

nonBlocking 

"nonBlocking" (immediate) : (MPI_Isend, MPI_Irecv)

blocking 

compatibility name for buffered

Definition at line 77 of file UPstream.H.

◆ sendModes

enum sendModes : char
strong

Different MPI-send modes (ignored for commsTypes::buffered)

Enumerator
normal 

(MPI_Send, MPI_Isend)

sync 

(MPI_Ssend, MPI_Issend)

Definition at line 94 of file UPstream.H.

Constructor & Destructor Documentation

◆ UPstream()

UPstream ( const commsTypes  commsType)
inlineexplicitnoexcept

Construct for given communication type.

Definition at line 507 of file UPstream.H.

Member Function Documentation

◆ ClassName()

ClassName ( "UPstream"  )

Declare name of the class and its debug switch.

◆ commGlobal()

static constexpr label commGlobal ( )
inlinestaticnoexcept

Communicator for all ranks, irrespective of any local worlds.

Definition at line 431 of file UPstream.H.

Referenced by multiWorldConnections::createComms(), fileOperation::getManagedComm(), UPstream::myWorld(), UPstream::myWorldID(), and syncObjects::sync().

Here is the caller graph for this function:

◆ commSelf()

static constexpr label commSelf ( )
inlinestaticnoexcept

Communicator within the current rank only.

Definition at line 436 of file UPstream.H.

Referenced by Foam::getCommPattern(), and fileOperation::getManagedComm().

Here is the caller graph for this function:

◆ commWorld() [1/2]

static label commWorld ( )
inlinestaticnoexcept

◆ commWorld() [2/2]

static label commWorld ( const label  communicator)
inlinestaticnoexcept

Set world communicator. Negative values are a no-op.

Returns
old world communicator index

Definition at line 448 of file UPstream.H.

References UPstream::worldComm.

◆ commWarn()

static label commWarn ( const label  communicator)
inlinestaticnoexcept

Alter communicator debugging setting. Warns for use of any communicator differing from specified.

Returns
the previous warn index

Definition at line 461 of file UPstream.H.

References UPstream::warnComm.

Referenced by mappedPatchBase::calcAMI(), mappedPatchBase::collectSamples(), multiWorldConnections::createComms(), mappedPatchBase::distribute(), mappedPatchBase::findSamples(), cyclicAMIGAMGInterfaceField::initInterfaceMatrixUpdate(), cyclicACMIGAMGInterfaceField::initInterfaceMatrixUpdate(), mappedPatchBase::reverseDistribute(), syncObjects::sync(), and globalMeshData::updateMesh().

Here is the caller graph for this function:

◆ nComms()

static label nComms ( )
inlinestaticnoexcept

Number of currently defined communicators.

Definition at line 471 of file UPstream.H.

References UList< T >::size().

Here is the call graph for this function:

◆ printCommTree()

void printCommTree ( const label  communicator)
static

Debugging: print the communication tree.

Definition at line 673 of file UPstream.C.

References Foam::Info, UPstream::master(), and UPstream::whichCommunication().

Here is the call graph for this function:

◆ commIntraHost()

Foam::label commIntraHost ( )
static

Demand-driven: Intra-host communicator (respects any local worlds)

Definition at line 684 of file UPstream.C.

◆ commInterHost()

Foam::label commInterHost ( )
static

Demand-driven: Inter-host communicator (respects any local worlds)

Definition at line 698 of file UPstream.C.

◆ hasHostComms()

bool hasHostComms ( )
static

Test for presence of any intra or inter host communicators.

Definition at line 712 of file UPstream.C.

◆ clearHostComms()

void clearHostComms ( )
static

Remove any existing intra and inter host communicators.

Definition at line 718 of file UPstream.C.

◆ allocateCommunicator() [1/2]

Foam::label allocateCommunicator ( const label  parent,
const labelRange subRanks,
const bool  withComponents = true 
)
static

Allocate new communicator with contiguous sub-ranks on the parent communicator.

if (myProcNo_[index] < 0 && parentIndex >= 0) { // As global rank myProcNo_[index] = -(myProcNo_[worldComm]+1);

OR: // As parent rank number if (myProcNo_[parentIndex] >= 0) { myProcNo_[index] = -(myProcNo_[parentIndex]+1); } }

Parameters
parentThe parent communicator
subRanksThe contiguous sub-ranks of parent to use
withComponentsCall allocateCommunicatorComponents()

Definition at line 260 of file UPstream.C.

References Foam::ensightOutput::debug, Foam::endl(), UPstream::masterNo(), Foam::nl, Foam::Perr, and IntRange< IntType >::size().

Referenced by eagerGAMGProcAgglomeration::agglomerate(), manualGAMGProcAgglomeration::agglomerate(), procFacesGAMGProcAgglomeration::agglomerate(), masterCoarsestGAMGProcAgglomeration::agglomerate(), Foam::getCommPattern(), and UPstream::communicator::reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocateCommunicator() [2/2]

Foam::label allocateCommunicator ( const label  parent,
const labelUList subRanks,
const bool  withComponents = true 
)
static

Allocate new communicator with sub-ranks on the parent communicator.

if (myProcNo_[index] < 0 && parentIndex >= 0) { // As global rank myProcNo_[index] = -(myProcNo_[worldComm]+1);

OR: // As parent rank number if (myProcNo_[parentIndex] >= 0) { myProcNo_[index] = -(myProcNo_[parentIndex]+1); } }

Parameters
parentThe parent communicator
subRanksThe sub-ranks of parent to use (ignore negative values)
withComponentsCall allocateCommunicatorComponents()

Definition at line 321 of file UPstream.C.

References Foam::ensightOutput::debug, Foam::endl(), Foam::flatOutput(), UPstream::masterNo(), Foam::nl, Foam::Perr, UList< T >::size(), and Foam::sort().

Here is the call graph for this function:

◆ freeCommunicator()

void freeCommunicator ( const label  communicator,
const bool  withComponents = true 
)
static

◆ allocateInterHostCommunicator()

Foam::label allocateInterHostCommunicator ( const label  parentCommunicator = worldComm)
static

Allocate an inter-host communicator.

Definition at line 403 of file UPstream.C.

References forAll, Foam::getHostGroupIds(), and UList< T >::size().

Here is the call graph for this function:

◆ allocateIntraHostCommunicator()

Foam::label allocateIntraHostCommunicator ( const label  parentCommunicator = worldComm)
static

Allocate an intra-host communicator.

Definition at line 426 of file UPstream.C.

References forAll, Foam::getHostGroupIds(), UPstream::myProcNo(), and UList< T >::size().

Here is the call graph for this function:

◆ baseProcNo()

int baseProcNo ( label  comm,
int  procID 
)
static

Return physical processor number (i.e. processor number in worldComm) given communicator and processor.

Definition at line 606 of file UPstream.C.

References UPstream::parent(), and UPstream::procID().

Referenced by UPstream::procNo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ procNo() [1/2]

Foam::label procNo ( const label  comm,
const int  baseProcID 
)
static

Return processor number in communicator (given physical processor number) (= reverse of baseProcNo)

Definition at line 619 of file UPstream.C.

References UPstream::parent(), and UPstream::procID().

Referenced by UPstream::procNo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ procNo() [2/2]

Foam::label procNo ( const label  comm,
const label  currentComm,
const int  currentProcID 
)
static

Return processor number in communicator (given processor number and communicator)

Definition at line 636 of file UPstream.C.

References UPstream::baseProcNo(), and UPstream::procNo().

Here is the call graph for this function:

◆ addValidParOptions()

void addValidParOptions ( HashTable< string > &  validParOptions)
static

Add the valid option this type of communications library adds/requires on the command line.

Definition at line 26 of file UPstream.C.

◆ init()

bool init ( int &  argc,
char **&  argv,
const bool  needsThread 
)
static

Initialisation function called from main.

Spawns sub-processes and initialises inter-communication

Definition at line 40 of file UPstream.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, and FatalErrorInFunction.

Referenced by ParRunControl::runPar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initNull()

bool initNull ( )
static

Special purpose initialisation function.

Performs a basic MPI_Init without any other setup. Only used for applications that need MPI communication when OpenFOAM is running in a non-parallel mode.

Note
Behaves as a no-op if MPI has already been initialized. Fatal if MPI has already been finalized.

Definition at line 30 of file UPstream.C.

References Foam::endl(), and WarningInFunction.

Referenced by zoltanRenumber::renumber().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ barrier()

void barrier ( const label  communicator,
UPstream::Request req = nullptr 
)
static

Impose a synchronisation barrier (optionally non-blocking)

Definition at line 83 of file UPstream.C.

Referenced by Foam::PstreamDetail::exchangeConsensus().

Here is the caller graph for this function:

◆ probeMessage()

std::pair< int, int64_t > probeMessage ( const UPstream::commsTypes  commsType,
const int  fromProcNo,
const int  tag = UPstream::msgType(),
const label  communicator = worldComm 
)
static

Probe for an incoming message.

Parameters
commsTypeNon-blocking or not
fromProcNoThe source rank (negative == ANY_SOURCE)
tagThe source message tag
communicatorThe communicator index
Returns
source rank and message size (bytes) and (-1, 0) on failure

Definition at line 89 of file UPstream.C.

Referenced by Foam::PstreamDetail::exchangeConsensus().

Here is the caller graph for this function:

◆ nRequests()

◆ resetRequests()

void resetRequests ( const label  n)
static

Truncate outstanding requests to given length, which is expected to be in the range [0 to nRequests()].

A no-op for out-of-range values.

Definition at line 56 of file UPstreamRequest.C.

◆ addRequest()

void addRequest ( UPstream::Request req)
static

Transfer the (wrapped) MPI request to the internal global list.

A no-op for non-parallel. No special treatment for null requests.

Definition at line 58 of file UPstreamRequest.C.

◆ cancelRequest() [1/2]

void cancelRequest ( const label  i)
static

Non-blocking comms: cancel and free outstanding request. Corresponds to MPI_Cancel() + MPI_Request_free()

A no-op if parRun() == false if there are no pending requests, or if the index is out-of-range (0 to nRequests)

Definition at line 60 of file UPstreamRequest.C.

Referenced by UPstream::Request::cancel().

Here is the caller graph for this function:

◆ cancelRequest() [2/2]

void cancelRequest ( UPstream::Request req)
static

Non-blocking comms: cancel and free outstanding request. Corresponds to MPI_Cancel() + MPI_Request_free()

A no-op if parRun() == false

Definition at line 61 of file UPstreamRequest.C.

◆ cancelRequests()

void cancelRequests ( UList< UPstream::Request > &  requests)
static

Non-blocking comms: cancel and free outstanding requests. Corresponds to MPI_Cancel() + MPI_Request_free()

A no-op if parRun() == false or list is empty

Definition at line 62 of file UPstreamRequest.C.

◆ removeRequests()

void removeRequests ( const label  pos,
label  len = -1 
)
static

Non-blocking comms: cancel/free outstanding requests (from position onwards) and remove from internal list of requests. Corresponds to MPI_Cancel() + MPI_Request_free()

A no-op if parRun() == false, if the position is out-of-range [0 to nRequests()], or the internal list of requests is empty.

Parameters
posstarting position within the internal list of requests
lenlength of slice to remove (negative = until the end)

Definition at line 64 of file UPstreamRequest.C.

◆ freeRequest()

void freeRequest ( UPstream::Request req)
static

Non-blocking comms: free outstanding request. Corresponds to MPI_Request_free()

A no-op if parRun() == false

Definition at line 66 of file UPstreamRequest.C.

Referenced by UPstream::Request::free().

Here is the caller graph for this function:

◆ freeRequests()

void freeRequests ( UList< UPstream::Request > &  requests)
static

Non-blocking comms: free outstanding requests. Corresponds to MPI_Request_free()

A no-op if parRun() == false or list is empty

Definition at line 67 of file UPstreamRequest.C.

◆ waitRequests() [1/3]

void waitRequests ( const label  pos,
label  len = -1 
)
static

Wait until all requests (from position onwards) have finished. Corresponds to MPI_Waitall()

A no-op if parRun() == false, if the position is out-of-range [0 to nRequests()], or the internal list of requests is empty.

If checking a trailing portion of the list, it will also trim the list of outstanding requests as a side-effect. This is a feature (not a bug) to conveniently manange the list.

Parameters
posstarting position within the internal list of requests
lenlength of slice to check (negative = until the end)

Definition at line 69 of file UPstreamRequest.C.

◆ waitRequests() [2/3]

void waitRequests ( UList< UPstream::Request > &  requests)
static

Wait until all requests have finished. Corresponds to MPI_Waitall()

A no-op if parRun() == false, or the list is empty.

Definition at line 70 of file UPstreamRequest.C.

◆ waitAnyRequest() [1/2]

bool waitAnyRequest ( const label  pos,
label  len = -1 
)
static

Wait until any request (from position onwards) has finished. Corresponds to MPI_Waitany()

A no-op and returns false if parRun() == false, if the position is out-of-range [0 to nRequests()], or the internal list of requests is empty.

Returns
true if any pending request completed.
false if all requests have already been handled.
Parameters
posstarting position within the internal list of requests
lenlength of slice to check (negative = until the end)

Definition at line 72 of file UPstreamRequest.C.

◆ waitSomeRequests() [1/2]

bool waitSomeRequests ( const label  pos,
label  len = -1,
DynamicList< int > *  indices = nullptr 
)
static

Wait until some requests (from position onwards) have finished. Corresponds to MPI_Waitsome()

A no-op and returns false if parRun() == false, if the position is out-of-range [0 to nRequests], or the internal list of requests is empty.

Returns
true if some pending requests completed.
false if all requests have already been handled
Parameters
posstarting position within the internal list of requests
lenlength of slice to check (negative = until the end)
[out]indicesthe completed request indices relative to the starting position. This is an optional parameter that can be used to recover the indices or simply to avoid reallocations when calling within a loop.

Definition at line 78 of file UPstreamRequest.C.

References DynamicList< T, SizeMin >::clear().

Here is the call graph for this function:

◆ waitSomeRequests() [2/2]

bool waitSomeRequests ( UList< UPstream::Request > &  requests,
DynamicList< int > *  indices = nullptr 
)
static

Wait until some requests have finished. Corresponds to MPI_Waitsome()

A no-op and returns false if parRun() == false, the list is empty, or if all the requests have already been handled.

Parameters
requeststhe requests
[out]indicesthe completed request indices relative to the starting position. This is an optional parameter that can be used to recover the indices or simply to avoid reallocations when calling within a loop.

Definition at line 89 of file UPstreamRequest.C.

References DynamicList< T, SizeMin >::clear().

Here is the call graph for this function:

◆ waitAnyRequest() [2/2]

Foam::label waitAnyRequest ( UList< UPstream::Request > &  requests)
static

Wait until any request has finished and return its index. Corresponds to MPI_Waitany()

Returns -1 if parRun() == false, or the list is empty, or if all the requests have already been handled

Definition at line 98 of file UPstreamRequest.C.

◆ waitRequest() [1/2]

void waitRequest ( const label  i)
static

Wait until request i has finished. Corresponds to MPI_Wait()

A no-op if parRun() == false, if there are no pending requests, or if the index is out-of-range (0 to nRequests)

void Foam::UPstream::waitRequests ( UPstream::Request& req0, UPstream::Request& req1 ) { // No-op for non-parallel if (!UPstream::parRun()) { return; }

int count = 0; MPI_Request waitRequests[2];

waitRequests[count] = PstreamUtils::Cast::to_mpi(req0); if (MPI_REQUEST_NULL != waitRequests[count]) { ++count; }

waitRequests[count] = PstreamUtils::Cast::to_mpi(req1); if (MPI_REQUEST_NULL != waitRequests[count]) { ++count; }

// Flag in advance as being handled req0 = UPstream::Request(MPI_REQUEST_NULL); req1 = UPstream::Request(MPI_REQUEST_NULL);

if (!count) { return; }

profilingPstream::beginTiming();

// On success: sets each request to MPI_REQUEST_NULL if (MPI_Waitall(count, waitRequests, MPI_STATUSES_IGNORE)) { FatalErrorInFunction << "MPI_Waitall returned with error" << Foam::abort(FatalError); }

profilingPstream::addWaitTime(); }

Definition at line 103 of file UPstreamRequest.C.

Referenced by processorGAMGInterfaceField::updateInterfaceMatrix(), and UPstream::Request::wait().

Here is the caller graph for this function:

◆ waitRequest() [2/2]

void waitRequest ( UPstream::Request req)
static

Wait until specified request has finished. Corresponds to MPI_Wait()

A no-op if parRun() == false or for a null-request

Definition at line 104 of file UPstreamRequest.C.

◆ finishedRequest() [1/2]

bool finishedRequest ( const label  i)
static

Non-blocking comms: has request i finished? Corresponds to MPI_Test()

A no-op and returns true if parRun() == false, if there are no pending requests, or if the index is out-of-range (0 to nRequests)

Definition at line 106 of file UPstreamRequest.C.

Referenced by Foam::PstreamDetail::exchangeConsensus(), UPstream::Request::finished(), processorGAMGInterfaceField::ready(), and processorGAMGInterfaceField::updateInterfaceMatrix().

Here is the caller graph for this function:

◆ finishedRequest() [2/2]

bool finishedRequest ( UPstream::Request req)
static

Non-blocking comms: has request finished? Corresponds to MPI_Test()

A no-op and returns true if parRun() == false or for a null-request

Definition at line 107 of file UPstreamRequest.C.

◆ finishedRequests() [1/2]

bool finishedRequests ( const label  pos,
label  len = -1 
)
static

Non-blocking comms: have all requests (from position onwards) finished? Corresponds to MPI_Testall()

A no-op and returns true if parRun() == false, if there are no pending requests, or if the index is out-of-range (0 to nRequests) or the addressed range is empty etc.

Parameters
posstarting position within the internal list of requests
lenlength of slice to check (negative = until the end)

Definition at line 109 of file UPstreamRequest.C.

Referenced by Foam::PstreamDetail::exchangeConsensus(), cyclicAMIGAMGInterfaceField::ready(), and cyclicACMIGAMGInterfaceField::ready().

Here is the caller graph for this function:

◆ finishedRequests() [2/2]

bool finishedRequests ( UList< UPstream::Request > &  requests)
static

Non-blocking comms: have all requests finished? Corresponds to MPI_Testall()

A no-op and returns true if parRun() == false or list is empty

Definition at line 115 of file UPstreamRequest.C.

◆ finishedRequestPair()

bool finishedRequestPair ( label &  req0,
label &  req1 
)
static

Non-blocking comms: have both requests finished? Corresponds to pair of MPI_Test()

A no-op and returns true if parRun() == false, if there are no pending requests, or if the indices are out-of-range (0 to nRequests) Each finished request parameter is set to -1 (ie, done).

Definition at line 121 of file UPstreamRequest.C.

◆ waitRequestPair()

void waitRequestPair ( label &  req0,
label &  req1 
)
static

Non-blocking comms: wait for both requests to finish. Corresponds to pair of MPI_Wait()

A no-op if parRun() == false, if there are no pending requests, or if the indices are out-of-range (0 to nRequests) Each finished request parameter is set to -1 (ie, done).

Definition at line 129 of file UPstreamRequest.C.

◆ parRun() [1/2]

static bool parRun ( const bool  on)
inlinestaticnoexcept

Set as parallel run on/off.

Returns
the previous value

Definition at line 1049 of file UPstream.H.

◆ parRun() [2/2]

static bool& parRun ( )
inlinestaticnoexcept

Test if this a parallel run.

Modify access is deprecated

Definition at line 1061 of file UPstream.H.

Referenced by snappyLayerDriver::addLayers(), unwatchedIOdictionary::addWatch(), regIOobject::addWatch(), masterUncollatedFileOperation::addWatch(), masterUncollatedFileOperation::addWatches(), meshRefinement::balance(), addPatchCellLayer::calcExtrudeInfo(), processorCyclicPolyPatch::calcGeometry(), processorPolyPatch::calcGeometry(), processorFaPatch::calcGeometry(), surfaceNoise::calculate(), cyclicAMIPolyPatch::canResetAMI(), designVariablesUpdate::checkConvergence(), faBoundaryMesh::checkParallelSync(), polyBoundaryMesh::checkParallelSync(), AMIInterpolation::checkSymmetricWeights(), fieldValue::combineFields(), limitTurbulenceViscosity::correct(), meshRefinement::countEdgeFaces(), processorFvPatch::coupled(), cyclicAMIPointPatch::coupled(), processorPointPatchField< Type >::coupled(), processorCyclicPointPatchField< Type >::coupled(), processorFaePatchField< Type >::coupled(), processorCyclicFvsPatchField< Type >::coupled(), processorFvsPatchField< Type >::coupled(), calculatedProcessorFvPatchField< Type >::coupled(), processorFaPatchField< Type >::coupled(), processorFvPatchField< Type >::coupled(), cyclicACMIFvPatch::coupled(), processorFaPatch::coupled(), cyclicAMIFvPatch::coupled(), processorPolyPatch::coupled(), simpleGeomDecomp::decompose(), decompositionMethod::decompose(), conformalVoronoiMesh::decomposition(), processorFvPatch::delta(), processorFaPatch::delta(), masterUncollatedFileOperation::dirPath(), refinementHistory::distribute(), fvMeshDistribute::distribute(), distributedTriSurfaceMesh::distribute(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), snappyLayerDriver::doLayers(), snappyRefineDriver::doRefine(), ensightSurfaceReader::ensightSurfaceReader(), Foam::exitNow(), faMeshReconstructor::faMeshReconstructor(), masterUncollatedFileOperation::filePath(), polyMesh::findCell(), masterUncollatedFileOperation::findInstance(), distributedTriSurfaceMesh::findLine(), distributedTriSurfaceMesh::findLineAll(), distributedTriSurfaceMesh::findLineAny(), distributedTriSurfaceMesh::findNearest(), masterUncollatedFileOperation::findTimes(), masterUncollatedFileOperation::findWatch(), ensightSurfaceReader::geometry(), Foam::getCommPattern(), zoneDistribute::getDatafromOtherProc(), distributedTriSurfaceMesh::getField(), masterUncollatedFileOperation::getFile(), distributedTriSurfaceMesh::getNormal(), distributedTriSurfaceMesh::getRegion(), masterUncollatedFileOperation::getState(), distributedTriSurfaceMesh::getVolumeType(), faMeshBoundaryHalo::haloSize(), InflationInjection< CloudType >::InflationInjection(), faMesh::init(), processorPolyPatch::initGeometry(), processorFaPatch::initGeometry(), InjectedParticleInjection< CloudType >::initialise(), InjectedParticleDistributionInjection< CloudType >::initialise(), extractEulerianParticles::initialiseBins(), processorPolyPatch::initOrder(), processorPolyPatch::initUpdateMesh(), processorFaPatch::initUpdateMesh(), fileOperation::isIOrank(), fileOperation::lookupAndCacheProcessorsPath(), LUscalarMatrix::LUscalarMatrix(), processorFaPatch::makeDeltaCoeffs(), processorFaPatch::makeNonGlobalPatchPoints(), processorFvPatch::makeWeights(), processorFaPatch::makeWeights(), error::master(), mergedSurf::merge(), surfaceWriter::merge(), surfaceWriter::mergeFieldTemplate(), polyBoundaryMesh::neighbourEdges(), masterUncollatedFileOperation::NewIFstream(), faMeshTools::newMesh(), fvMeshTools::newMesh(), fileWriter::open(), processorPolyPatch::order(), InflationInjection< CloudType >::parcelsToInject(), argList::parse(), meshRefinement::printMeshInfo(), processorTopology::procAdjacency(), collatedFileOperation::processorsDir(), triangulatedPatch::randomGlobalPoint(), surfaceNoise::read(), uncollatedFileOperation::read(), masterUncollatedFileOperation::read(), lumpedPointState::readData(), Time::readModifiedObjects(), masterUncollatedFileOperation::readObjects(), masterUncollatedFileOperation::readStream(), surfaceNoise::readSurfaceData(), masterUncollatedFileOperation::removeWatch(), parProfiling::report(), profilingPstream::report(), AMIWeights::reportPatch(), faMeshBoundaryHalo::reset(), fvMeshSubset::reset(), globalIndex::reset(), mapDistributeBase::schedule(), Time::setControls(), surfaceWriter::setSurface(), masterUncollatedFileOperation::setUnmodified(), zoneDistribute::setUpCommforZone(), globalMeshData::sharedPoints(), shortestPathSet::shortestPathSet(), error::simpleExit(), messageStream::stream(), surfaceWriter::surface(), surfaceNoise::surfaceAverage(), syncObjects::sync(), masterUncollatedFileOperation::sync(), syncTools::syncBoundaryFaceList(), syncTools::syncEdgeMap(), syncTools::syncFaceList(), faMesh::syncGeom(), syncTools::syncPointMap(), triSurfaceMesh::triSurfaceMesh(), fileOperation::uniformFile(), turbulentDFSEMInletFvPatchVectorField::updateCoeffs(), processorPolyPatch::updateMesh(), processorFaPatch::updateMesh(), faMesh::updateMesh(), masterUncollatedFileOperation::updateStates(), fileOperation::updateStates(), dynamicCode::waitForFile(), viewFactorHeatFlux::write(), energySpectrum::write(), ensightCells::write(), vtkWrite::write(), meshToMeshMethod::writeConnectivity(), AMIWeights::writeFileHeader(), fieldMinMax::writeFileHeader(), isoAdvection::writeIsoFaces(), faMeshReconstructor::writeMesh(), patchMeshWriter::writeNeighIDs(), collatedFileOperation::writeObject(), fileWriter::writeProcIDs(), surfaceNoise::writeSurfaceData(), and streamLineBase::writeToFile().

◆ haveThreads()

static bool haveThreads ( )
inlinestaticnoexcept

Have support for threads.

Definition at line 1066 of file UPstream.H.

Referenced by OFstreamCollator::write().

Here is the caller graph for this function:

◆ masterNo()

◆ nProcs()

static label nProcs ( const label  communicator = worldComm)
inlinestatic

Number of ranks in parallel run (for given communicator). It is 1 for serial run.

Definition at line 1077 of file UPstream.H.

References UList< T >::size().

Referenced by surfaceZonesInfo::addCellZonesToMesh(), surfaceZonesInfo::addFaceZonesToMesh(), eagerGAMGProcAgglomeration::agglomerate(), manualGAMGProcAgglomeration::agglomerate(), procFacesGAMGProcAgglomeration::agglomerate(), masterCoarsestGAMGProcAgglomeration::agglomerate(), UPstream::allProcs(), meshRefinement::balance(), faPatch::boundaryProcs(), faMesh::boundaryProcs(), faPatch::boundaryProcSizes(), faMesh::boundaryProcSizes(), mapDistributeBase::calcCompactAddressing(), decomposedBlockData::calcNumProcs(), surfaceNoise::calculate(), meshRefinement::checkCoupledFaceZones(), mappedPatchBase::collectSamples(), fieldValue::combineFields(), sizeDistribution::combineFields(), GAMGAgglomeration::continueAgglomerating(), fvMeshDistribute::countCells(), Foam::createReconstructMap(), meshRefinement::directionalRefineCandidates(), fvMeshDistribute::distribute(), distributedTriSurfaceMesh::distribute(), snappyLayerDriver::doLayers(), mapDistributeBase::exchangeAddressing(), Foam::PstreamDetail::exchangeConsensus(), extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil(), distributedTriSurfaceMesh::findNearest(), mappedPatchBase::findSamples(), lduPrimitiveMesh::gather(), decomposedBlockData::gather(), decomposedBlockData::gatherSlaveData(), fileOperation::getGlobalHostIORanks(), Foam::getHostGroupIds(), Foam::getSelectedProcs(), distributedTriSurfaceMesh::getVolumeType(), InjectedParticleInjection< CloudType >::initialise(), InjectedParticleDistributionInjection< CloudType >::initialise(), viewFactor::initialise(), UPstream::is_parallel(), UPstream::linearCommunication(), distributedTriSurfaceMesh::localQueries(), fileOperation::lookupAndCacheProcessorsPath(), LUscalarMatrix::LUscalarMatrix(), mapDistributeBase::mapDistributeBase(), masterUncollatedFileOperation::masterUncollatedFileOperation(), masterUncollatedFileOperation::NewIFstream(), InflationInjection< CloudType >::parcelsToInject(), argList::parse(), pointHistory::pointHistory(), mapDistributeBase::printLayout(), meshRefinement::printMeshInfo(), fileOperation::printRanks(), processorTopology::procAdjacency(), masterUncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readStream(), meshRefinement::refineCandidates(), Foam::regionSum(), meshRefinement::removeGapCells(), parProfiling::report(), profilingPstream::report(), faMeshBoundaryHalo::reset(), fvMeshSubset::reset(), globalIndex::reset(), mapDistributeBase::schedule(), Time::setControls(), zoneDistribute::setUpCommforZone(), ParSortableList< Type >::sort(), UPstream::subProcs(), fileOperation::subRanks(), UPstream::treeCommunication(), trackingInverseDistance::update(), inverseDistance::update(), oversetFvMeshBase::updateAddressing(), turbulentDFSEMInletFvPatchVectorField::updateCoeffs(), patchInjectionBase::updateMesh(), globalMeshData::updateMesh(), UPstream::whichCommunication(), decomposedBlockData::writeBlocks(), externalCoupled::writeGeometry(), isoAdvection::writeIsoFaces(), caseInfo::writeMeta(), and streamLineBase::writeToFile().

Here is the call graph for this function:

◆ myProcNo()

static int myProcNo ( const label  communicator = worldComm)
inlinestatic

Rank of this process in the communicator (starting from masterNo()). Can be negative if the process is not a rank in the communicator.

Definition at line 1086 of file UPstream.H.

Referenced by surfaceZonesInfo::addCellZonesToMesh(), surfaceZonesInfo::addFaceZonesToMesh(), eagerGAMGProcAgglomeration::agglomerate(), manualGAMGProcAgglomeration::agglomerate(), masterCoarsestGAMGProcAgglomeration::agglomerate(), UPstream::allocateIntraHostCommunicator(), faPatch::boundaryProcs(), faMesh::boundaryProcs(), faPatch::boundaryProcSizes(), faMesh::boundaryProcSizes(), Foam::calcCellCellsImpl(), mapDistributeBase::calcCompactAddressing(), globalIndex::calcOffset(), globalIndex::calcRange(), faceAreaWeightAMI::calculate(), viewFactor::calculate(), AMIInterpolation::calculate(), GAMGAgglomeration::calculateRegionMaster(), meshRefinement::checkCoupledFaceZones(), mappedPatchBase::collectSamples(), fieldValue::combineFields(), sizeDistribution::combineFields(), wallDistAddressing::correct(), Foam::createReconstructMap(), noDecomp::decompose(), fvMeshDistribute::distribute(), distributedTriSurfaceMesh::distribute(), mapDistributeBase::exchangeAddressing(), Foam::PstreamDetail::exchangeBuffers(), Foam::PstreamDetail::exchangeConsensus(), Foam::PstreamDetail::exchangeContainer(), processorField::execute(), InjectionModel< CloudType >::findCellAtPosition(), patchProbes::findElements(), probes::findElements(), mappedPatchBase::findLocalSamples(), distributedTriSurfaceMesh::findNearest(), mappedPatchBase::findSamples(), globalIndex::gather(), decomposedBlockData::gatherSlaveData(), get_edge_list(), get_vertex_list(), zoneDistribute::getDatafromOtherProc(), meshRefinement::getMasterEdges(), meshRefinement::getMasterPoints(), Foam::getSelectedProcs(), InjectedParticleInjection< CloudType >::initialise(), InjectedParticleDistributionInjection< CloudType >::initialise(), viewFactor::initialise(), globalIndex::inplaceToGlobal(), globalIndex::isLocal(), lduPrimitiveMesh::lduPrimitiveMesh(), globalIndex::localEnd(), globalIndex::localSize(), globalIndex::localStart(), mapDistribute::mapDistribute(), mapDistributeBase::mapDistributeBase(), masterUncollatedFileOperation::masterUncollatedFileOperation(), PstreamBuffers::maxNonLocalRecvCount(), globalIndex::maxNonLocalSize(), processorColour::myColour(), UPstream::myWorld(), UPstream::myWorldID(), masterUncollatedFileOperation::NewIFstream(), regionSplit::nLocalRegions(), InflationInjection< CloudType >::parcelsToInject(), argList::parse(), pointHistory::pointHistory(), mapDistributeBase::printLayout(), fileOperation::printRanks(), processorTopology::procAdjacency(), backgroundMeshDecomposition::procBounds(), triangulatedPatch::randomGlobalPoint(), globalIndex::range(), masterUncollatedFileOperation::read(), masterUncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readStream(), indexedVertex< Gt, Vb >::referred(), zoltanRenumber::renumber(), mapDistributeBase::renumber(), faMeshBoundaryHalo::reset(), fvMeshSubset::reset(), globalIndex::reset(), mapDistributeBase::schedule(), cellSetOption::setCellSelection(), Time::setControls(), patchInjectionBase::setPositionAndCell(), zoneDistribute::setUpCommforZone(), ParSortableList< Type >::sort(), KinematicSurfaceFilm< CloudType >::splashInteraction(), fileOperation::subRanks(), masterUncollatedFileOperation::sync(), globalIndex::toGlobal(), globalIndex::toLocal(), trackingInverseDistance::update(), inverseDistance::update(), oversetFvMeshBase::updateAddressing(), patchInjectionBase::updateMesh(), processorField::updateMesh(), globalMeshData::updateMesh(), propellerInfo::updateSampleDiskCells(), dynamicCode::waitForFile(), globalIndex::whichProcID(), meshToMeshMethod::writeConnectivity(), AMIInterpolation::writeFaceConnectivity(), externalCoupled::writeGeometry(), isoAdvection::writeIsoFaces(), and fileWriter::writeProcIDs().

◆ master()

static bool master ( const label  communicator = worldComm)
inlinestatic

True if process corresponds to the master rank in the communicator.

Definition at line 1094 of file UPstream.H.

References UPstream::masterNo().

Referenced by abaqusMeshSet::abaqusMeshSet(), regIOobject::addWatch(), masterUncollatedFileOperation::addWatch(), masterUncollatedFileOperation::addWatches(), Pstream::broadcast(), Foam::broadcastFile_recursive(), Foam::broadcastFile_single(), Pstream::broadcastList(), Pstream::broadcasts(), mappedPatchBase::calcMapping(), decomposedBlockData::calcNumProcs(), pointNoise::calculate(), viewFactor::calculate(), surfaceNoise::calculate(), writeFile::canResetFile(), writeFile::canWriteHeader(), writeFile::canWriteToFile(), argList::check(), fileWriter::checkFormatterValidity(), argList::checkRootCase(), extractEulerianParticles::collectParticle(), sizeDistribution::combineFields(), logFiles::createFiles(), Foam::createReconstructMap(), simpleGeomDecomp::decompose(), masterUncollatedFileOperation::dirPath(), systemCall::dispatch(), distributedTriSurfaceMesh::distribute(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), snappyVoxelMeshDriver::doRefine(), abort::end(), ensightSurfaceReader::ensightSurfaceReader(), abort::execute(), wallHeatFlux::execute(), Curle::execute(), momentum::execute(), externalFileCoupler::externalFileCoupler(), masterUncollatedFileOperation::filePath(), logFiles::files(), probes::findElements(), masterUncollatedFileOperation::findInstance(), masterUncollatedFileOperation::findTimes(), masterUncollatedFileOperation::findWatch(), STDMD::fit(), lduPrimitiveMesh::gather(), decomposedBlockData::gather(), decomposedBlockData::gatherSlaveData(), coordSet::gatherSort(), ensightSurfaceReader::geometry(), masterUncollatedFileOperation::getFile(), fileOperation::getGlobalHostIORanks(), Foam::getHostGroupIds(), Foam::getSelectedProcs(), masterUncollatedFileOperation::getState(), Random::globalGaussNormal(), Random::globalPosition(), Random::globalRandomise01(), Random::globalSample01(), surfaceNoise::initialise(), viewFactor::initialise(), interfaceHeight::interfaceHeight(), fileOperation::isIOrank(), JobInfo::JobInfo(), fileOperation::lookupAndCacheProcessorsPath(), LUscalarMatrix::LUscalarMatrix(), NURBS3DVolume::makeFolders(), error::master(), messageStream::masterStream(), surfaceWriter::mergeFieldTemplate(), ensightCase::newCloud(), writeFile::newFile(), writeFile::newFileAtTime(), ensightCase::newGeometry(), masterUncollatedFileOperation::NewIFstream(), faMeshTools::newMesh(), fvMeshTools::newMesh(), fileOperation::nProcs(), objectiveManager::objectiveManager(), fileWriter::open(), InflationInjection< CloudType >::parcelsToInject(), argList::parse(), pointHistory::pointHistory(), porosityModel::porosityModel(), probes::prepare(), UPstream::printCommTree(), meshRefinement::printMeshInfo(), fileOperation::printRanks(), pointNoise::processData(), timeActivatedFileUpdate::read(), decomposedBlockData::read(), writeFile::read(), uncollatedFileOperation::read(), externalCoupled::read(), sampledSets::read(), sampledSurfaces::read(), masterUncollatedFileOperation::read(), decomposedBlockData::readBlocks(), baseIOdictionary::readData(), lumpedPointState::readData(), masterUncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readObjects(), masterUncollatedFileOperation::readStream(), surfaceNoise::readSurfaceData(), externalCoupled::removeDataMaster(), externalCoupled::removeDataSlave(), masterUncollatedFileOperation::removeWatch(), profilingPstream::report(), globalIndex::reset(), logFiles::resetNames(), mapDistributeBase::schedule(), faMatrix< Type >::setReference(), ensightCase::setTime(), masterUncollatedFileOperation::setUnmodified(), globalMeshData::sharedPoints(), shortestPathSet::shortestPathSet(), externalFileCoupler::shutdown(), snappyVoxelMeshDriver::snappyVoxelMeshDriver(), rigidBodyMeshMotionSolver::solve(), rigidBodyMeshMotion::solve(), rigidBodyMotion::solve(), ParSortableList< Type >::sort(), messageStream::stream(), surfaceNoise::surfaceAverage(), hexRef8Data::sync(), masterUncollatedFileOperation::sync(), syncTools::syncEdgeMap(), syncTools::syncPointMap(), triSurfaceMesh::triSurfaceMesh(), sixDoFRigidBodyMotion::update(), lumpedPointDisplacementPointPatchVectorField::updateCoeffs(), activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs(), electrostaticDepositionFvPatchScalarField::updateCoeffs(), fileMonitor::updateStates(), masterUncollatedFileOperation::updateStates(), solution::upgradeSolverDict(), externalFileCoupler::useMaster(), externalFileCoupler::useSlave(), OFstreamCollator::waitAll(), externalFileCoupler::waitForMaster(), externalFileCoupler::waitForSlave(), histogramModel::write(), ensightFaMesh::write(), timeInfo::write(), debugWriter::write(), proxyWriter::write(), viewFactorHeatFlux::write(), energySpectrum::write(), x3dWriter::write(), starcdWriter::write(), OFstreamCollator::write(), foamWriter::write(), rawWriter::write(), yPlus::write(), referenceTemperature::write(), wallShearStress::write(), abaqusWriter::write(), vtkWriter::write(), ensightMesh::write(), boundaryDataWriter::write(), nastranWriter::write(), caseInfo::write(), vtkCloud::write(), sizeDistribution::write(), NURBS3DCurve::write(), effectivenessTable::write(), volFieldValue::write(), vtkWrite::write(), regionSizeDistribution::write(), objective::write(), NURBS3DSurface::write(), surfaceFieldValue::write(), propellerInfo::writeAxialWake(), decomposedBlockData::writeBlocks(), volumetricBSplinesDesignVariables::writeBounds(), ensightCells::writeBox(), ensightWriter::writeCollated(), updateMethod::writeCorrection(), NURBS3DVolume::writeCps(), decomposedBlockData::writeData(), lumpedPointMovement::writeData(), lumpedPointMovement::writeForcesAndMomentsVTP(), externalCoupled::writeGeometry(), objective::writeInstantaneousSeparator(), objective::writeInstantaneousValue(), isoAdvection::writeIsoFaces(), objective::writeMeanValue(), SQPBase::writeMeritFunction(), faMeshReconstructor::writeMesh(), patchMeshWriter::writeNeighIDs(), collatedFileOperation::writeObject(), decomposedBlockData::writeObject(), patchMeshWriter::writePatchIDs(), patchMeshWriter::writePoints(), fileWriter::writeProcIDs(), surfaceNoise::writeSurfaceData(), foamWriter::writeTemplate(), starcdWriter::writeTemplate(), boundaryDataWriter::writeTemplate(), x3dWriter::writeTemplate(), debugWriter::writeTemplate(), vtkWriter::writeTemplate(), streamLineBase::writeToFile(), GCMMA::writeToFiles(), ensightWriter::writeUncollated(), NURBS3DSurface::writeVTK(), propellerInfo::writeWake(), AMIWeights::writeWeightField(), NURBS3DCurve::writeWParses(), and NURBS3DSurface::writeWParses().

Here is the call graph for this function:

◆ is_rank()

static bool is_rank ( const label  communicator = worldComm)
inlinestatic

True if process corresponds to any rank (master or sub-rank) in the given communicator.

Definition at line 1103 of file UPstream.H.

Referenced by Foam::PstreamDetail::exchangeConsensus(), UPstream::is_parallel(), and UPstream::whichCommunication().

Here is the caller graph for this function:

◆ is_subrank()

static bool is_subrank ( const label  communicator = worldComm)
inlinestatic

True if process corresponds to a sub-rank in the given communicator.

Definition at line 1111 of file UPstream.H.

References UPstream::masterNo().

Referenced by Foam::broadcastFile_recursive(), Foam::broadcastFile_single(), and Pstream::broadcastList().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_parallel()

static bool is_parallel ( const label  communicator = worldComm)
inlinestatic

True if parallel algorithm or exchange is required.

This is when parRun() == true, the process corresponds to a rank in the communicator and there is more than one rank in the communicator

Definition at line 1123 of file UPstream.H.

References UPstream::is_rank(), and UPstream::nProcs().

Referenced by Pstream::broadcast(), Pstream::broadcastList(), Pstream::broadcasts(), globalIndex::calcOffset(), globalIndex::calcRange(), IOobjectList::checkNames(), Foam::PstreamDetail::exchangeConsensus(), Foam::reduce(), exprValueFieldTag::reduce(), Foam::sumReduce(), and globalMeshData::updateMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parent()

static label parent ( const label  communicator)
inlinestatic

The parent communicator.

Definition at line 1134 of file UPstream.H.

Referenced by UPstream::baseProcNo(), UPstream::procNo(), and UPstream::communicator::reset().

Here is the caller graph for this function:

◆ procID()

static List<int>& procID ( const label  communicator)
inlinestatic

The list of ranks within a given communicator.

Definition at line 1142 of file UPstream.H.

Referenced by UPstream::baseProcNo(), Foam::operator<<(), UList< Foam::vector >::operator[](), collatedFileOperation::processorsDir(), UPstream::procNo(), and UPstream::commsStruct::reset().

Here is the caller graph for this function:

◆ allWorlds()

static const wordList& allWorlds ( )
inlinestaticnoexcept

All worlds.

Definition at line 1153 of file UPstream.H.

Referenced by mappedPatchBase::calcMapping(), mappedPatchBase::masterWorld(), argList::parse(), Foam::printDOT(), and mappedPatchBase::sameWorld().

Here is the caller graph for this function:

◆ worldIDs()

static const labelList& worldIDs ( )
inlinestaticnoexcept

The indices into allWorlds for all processes.

Definition at line 1161 of file UPstream.H.

◆ myWorldID()

static label myWorldID ( )
inlinestatic

My worldID.

Definition at line 1169 of file UPstream.H.

References UPstream::commGlobal(), and UPstream::myProcNo().

Referenced by mappedPatchBase::calcMapping(), multiWorldConnections::createComms(), and mappedPatchBase::masterWorld().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ myWorld()

static const word& myWorld ( )
inlinestatic

My world.

Definition at line 1177 of file UPstream.H.

References UPstream::commGlobal(), and UPstream::myProcNo().

Referenced by multiWorldConnections::addConnectionById(), multiWorldConnections::addConnectionByName(), mappedPatchBase::calcMapping(), argList::parse(), mappedPatchBase::sameWorld(), and mappedPatchBase::sampleMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allProcs()

static rangeType allProcs ( const label  communicator = worldComm)
inlinestatic

Range of process indices for all processes.

Definition at line 1188 of file UPstream.H.

References UPstream::nProcs().

Referenced by refinementHistory::distribute(), Foam::getSelectedProcs(), viewFactor::initialise(), ParSortableList< Type >::sort(), energySpectrum::write(), and externalCoupled::writeGeometry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ subProcs()

static rangeType subProcs ( const label  communicator = worldComm)
inlinestatic

◆ linearCommunication()

const Foam::List< Foam::UPstream::commsStruct > & linearCommunication ( const label  communicator = worldComm)
static

Communication schedule for linear all-to-master (proc 0)

Definition at line 648 of file UPstream.C.

References UPstream::nProcs().

Referenced by UPstream::whichCommunication().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ treeCommunication()

const Foam::List< Foam::UPstream::commsStruct > & treeCommunication ( const label  communicator = worldComm)
static

Communication schedule for tree all-to-master (proc 0)

Definition at line 661 of file UPstream.C.

References UPstream::nProcs().

Referenced by UPstream::whichCommunication().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ whichCommunication()

static const List<commsStruct>& whichCommunication ( const label  communicator = worldComm)
inlinestatic

Communication schedule for all-to-master (proc 0) as linear/tree/none with switching based on UPstream::nProcsSimpleSum and the is_parallel() state.

Definition at line 1227 of file UPstream.H.

References UPstream::is_rank(), UPstream::linearCommunication(), UPstream::nProcs(), UPstream::nProcsSimpleSum, and UPstream::treeCommunication().

Referenced by UPstream::printCommTree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ msgType() [1/2]

static int& msgType ( )
inlinestaticnoexcept

Message tag of standard messages.

Definition at line 1252 of file UPstream.H.

Referenced by solidAbsorption::a(), mappedPatchBase::calcMapping(), faceAreaWeightAMI::calculate(), AMIInterpolation::calculate(), advancingFrontAMI::checkPatches(), masterUncollatedFileOperation::chMod(), mappedPatchBase::collectSamples(), extendedCentredCellToFaceStencil::compact(), extendedCentredFaceToCellStencil::compact(), extendedCentredCellToCellStencil::compact(), GAMGAgglomeration::continueAgglomerating(), masterUncollatedFileOperation::cp(), masterUncollatedFileOperation::dirPath(), mappedPatchBase::distribute(), solidAbsorption::e(), masterUncollatedFileOperation::exists(), masterUncollatedFileOperation::filePath(), masterUncollatedFileOperation::fileSize(), distributedTriSurfaceMesh::findNearest(), mappedPatchBase::findSamples(), Foam::gAverage(), distributedTriSurfaceMesh::getVolumeType(), Foam::gSumCmptProd(), Foam::gSumProd(), masterUncollatedFileOperation::highResLastModified(), viewFactor::initialise(), regionModel::interRegionAMI(), masterUncollatedFileOperation::isDir(), masterUncollatedFileOperation::isFile(), masterUncollatedFileOperation::lastModified(), lduPrimitiveMesh::lduPrimitiveMesh(), masterUncollatedFileOperation::ln(), LUscalarMatrix::LUscalarMatrix(), surfaceWriter::mergeFieldTemplate(), masterUncollatedFileOperation::mkDir(), masterUncollatedFileOperation::mode(), masterUncollatedFileOperation::mv(), masterUncollatedFileOperation::mvBak(), masterUncollatedFileOperation::NewIFstream(), fileOperation::printRanks(), processorTopology::procAdjacency(), decomposedBlockData::readBlocks(), masterUncollatedFileOperation::readDir(), masterUncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readStream(), surfaceNoise::readSurfaceData(), exprValueFieldTag::reduce(), fvMatrix< Type >::relax(), faMeshBoundaryHalo::reset(), mappedPatchBase::reverseDistribute(), masterUncollatedFileOperation::rm(), masterUncollatedFileOperation::rmDir(), mapDistributeBase::schedule(), surfaceNoise::surfaceAverage(), processorFvPatch::tag(), processorFaPatch::tag(), processorCyclicPolyPatch::tag(), processorPolyPatch::tag(), masterUncollatedFileOperation::type(), oversetFvMeshBase::updateAddressing(), wideBandDiffusiveRadiationMixedFvPatchScalarField::updateCoeffs(), mappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), mappedFlowRateFvPatchVectorField::updateCoeffs(), MarshakRadiationFvPatchScalarField::updateCoeffs(), filmPyrolysisTemperatureCoupledFvPatchScalarField::updateCoeffs(), filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs(), MarshakRadiationFixedTemperatureFvPatchScalarField::updateCoeffs(), greyDiffusiveRadiationMixedFvPatchScalarField::updateCoeffs(), alphatFilmWallFunctionFvPatchScalarField::updateCoeffs(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), thermalBaffle1DFvPatchScalarField< solidType >::updateCoeffs(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs(), OFstreamCollator::write(), decomposedBlockData::writeBlocks(), and surfaceNoise::writeSurfaceData().

◆ msgType() [2/2]

static int msgType ( int  val)
inlinestaticnoexcept

Set the message tag for standard messages.

Returns
the previous value

Definition at line 1262 of file UPstream.H.

◆ incrMsgType()

◆ commsType() [1/2]

commsTypes commsType ( ) const
inlinenoexcept

Get the communications type of the stream.

Definition at line 1284 of file UPstream.H.

Referenced by UIPstream::read(), OPstream::send(), UIPstream::UIPstream(), and UOPstream::write().

Here is the caller graph for this function:

◆ commsType() [2/2]

commsTypes commsType ( const commsTypes  ct)
inlinenoexcept

Set the communications type of the stream.

Returns
the previous value

Definition at line 1294 of file UPstream.H.

◆ shutdown()

void shutdown ( int  errNo = 0)
static

Shutdown (finalize) MPI as required.

Uses MPI_Abort instead of MPI_Finalize if errNo is non-zero

Definition at line 51 of file UPstream.C.

Referenced by ParRunControl::~ParRunControl().

Here is the caller graph for this function:

◆ abort()

void abort ( )
static

Call MPI_Abort with no other checks or cleanup.

Definition at line 62 of file UPstream.C.

References Foam::abort().

Referenced by error::simpleExit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exit()

void exit ( int  errNo = 1)
static

Shutdown (finalize) MPI as required and exit program with errNo.

Definition at line 55 of file UPstream.C.

References Foam::exit().

Referenced by argList::argList(), designVariablesUpdate::checkConvergence(), Foam::exitNow(), argList::parse(), ParRunControl::runPar(), and error::simpleExit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allToAll() [1/2]

void allToAll ( const UList< int32_t > &  sendData,
UList< int32_t > &  recvData,
const label  communicator = worldComm 
)
static

Exchange int32_t data with all ranks in communicator.

non-parallel : simple copy of sendData to recvData

Parameters
[in]sendDataThe value at [proci] is sent to proci
[out]recvDataThe data received from the other ranks

Definition at line 42 of file UPstreamAllToAll.C.

Referenced by fvMeshDistribute::distribute().

Here is the caller graph for this function:

◆ allToAllConsensus() [1/6]

void allToAllConsensus ( const UList< int32_t > &  sendData,
UList< int32_t > &  recvData,
const int  tag,
const label  communicator = worldComm 
)
static

Exchange non-zero int32_t data between ranks [NBX].

recvData is always initially assigned zero and no non-zero

values are sent/received from other ranks.

non-parallel : simple copy of sendData to recvData

Note
The message tag should be chosen to be a unique value

since the implementation uses probing with ANY_SOURCE !!

An initial barrier may help to avoid synchronisation problems

caused elsewhere (See "nbx.tuning" opt switch)

Parameters
[in]sendDataThe non-zero value at [proci] is sent to proci
[out]recvDataThe non-zero value received from each rank
tagMessage tag for the communication

Definition at line 74 of file UPstreamAllToAll.C.

◆ allToAllConsensus() [2/6]

void allToAllConsensus ( const Map< int32_t > &  sendData,
Map< int32_t > &  recvData,
const int  tag,
const label  communicator = worldComm 
)
static

Exchange int32_t data between ranks [NBX].

recvData map is always cleared initially so a simple check

of its keys is sufficient to determine connectivity.

non-parallel : copy own rank (if it exists)

See notes about message tags and "nbx.tuning" opt switch

Parameters
[in]sendDataThe value at [proci] is sent to proci.
[out]recvDataThe values received from given ranks.
tagMessage tag for the communication

Definition at line 74 of file UPstreamAllToAll.C.

◆ allToAllConsensus() [3/6]

static Map< int32_t > allToAllConsensus ( const Map< int32_t > &  sendData,
const int  tag,
const label  communicator = worldComm 
)
inlinestatic

Exchange int32_t data between ranks [NBX].

Returns
any received data as a Map
Parameters
[in]sendDataThe value at [proci] is sent to proci.
tagMessage tag for the communication

Definition at line 1385 of file UPstream.H.

◆ allToAll() [2/2]

void allToAll ( const UList< int64_t > &  sendData,
UList< int64_t > &  recvData,
const label  communicator = worldComm 
)
static

Exchange int64_t data with all ranks in communicator.

non-parallel : simple copy of sendData to recvData

Parameters
[in]sendDataThe value at [proci] is sent to proci
[out]recvDataThe data received from the other ranks

Definition at line 43 of file UPstreamAllToAll.C.

◆ allToAllConsensus() [4/6]

void allToAllConsensus ( const UList< int64_t > &  sendData,
UList< int64_t > &  recvData,
const int  tag,
const label  communicator = worldComm 
)
static

Exchange non-zero int64_t data between ranks [NBX].

recvData is always initially assigned zero and no non-zero

values are sent/received from other ranks.

non-parallel : simple copy of sendData to recvData

Note
The message tag should be chosen to be a unique value

since the implementation uses probing with ANY_SOURCE !!

An initial barrier may help to avoid synchronisation problems

caused elsewhere (See "nbx.tuning" opt switch)

Parameters
[in]sendDataThe non-zero value at [proci] is sent to proci
[out]recvDataThe non-zero value received from each rank
tagMessage tag for the communication

Definition at line 75 of file UPstreamAllToAll.C.

◆ allToAllConsensus() [5/6]

void allToAllConsensus ( const Map< int64_t > &  sendData,
Map< int64_t > &  recvData,
const int  tag,
const label  communicator = worldComm 
)
static

Exchange int64_t data between ranks [NBX].

recvData map is always cleared initially so a simple check

of its keys is sufficient to determine connectivity.

non-parallel : copy own rank (if it exists)

See notes about message tags and "nbx.tuning" opt switch

Parameters
[in]sendDataThe value at [proci] is sent to proci.
[out]recvDataThe values received from given ranks.
tagMessage tag for the communication

Definition at line 75 of file UPstreamAllToAll.C.

◆ allToAllConsensus() [6/6]

static Map< int64_t > allToAllConsensus ( const Map< int64_t > &  sendData,
const int  tag,
const label  communicator = worldComm 
)
inlinestatic

Exchange int64_t data between ranks [NBX].

Returns
any received data as a Map
Parameters
[in]sendDataThe value at [proci] is sent to proci.
tagMessage tag for the communication

Definition at line 1386 of file UPstream.H.

◆ mpiGather() [1/7]

void mpiGather ( const char *  sendData,
char *  recvData,
int  count,
const label  communicator = worldComm 
)
static

Receive identically-sized char data from all ranks.

Parameters
sendDataOn rank: individual value to send
recvDataOn master: receive buffer with all values
countNumber of send/recv data per rank. Globally consistent!

Definition at line 93 of file UPstreamGatherScatter.C.

Referenced by fileOperation::getGlobalHostIORanks(), Foam::getHostGroupIds(), and profilingPstream::report().

Here is the caller graph for this function:

◆ mpiScatter() [1/7]

void mpiScatter ( const char *  sendData,
char *  recvData,
int  count,
const label  communicator = worldComm 
)
static

Send identically-sized char data to all ranks.

Parameters
sendDataOn master: send buffer with all values
recvDataOn rank: individual value to receive
countNumber of send/recv data per rank. Globally consistent!

Definition at line 93 of file UPstreamGatherScatter.C.

◆ mpiAllGather() [1/7]

void mpiAllGather ( char *  allData,
int  count,
const label  communicator = worldComm 
)
static

Gather/scatter identically-sized char data.

Send data from proc slot, receive into all slots

Parameters
allDataOn all ranks: the base of the data locations
countNumber of send/recv data per rank. Globally consistent!

Definition at line 93 of file UPstreamGatherScatter.C.

Referenced by globalMeshData::updateMesh().

Here is the caller graph for this function:

◆ gather() [1/7]

void gather ( const char *  sendData,
int  sendCount,
char *  recvData,
const UList< int > &  recvCounts,
const UList< int > &  recvOffsets,
const label  communicator = worldComm 
)
static

Receive variable length char data from all ranks.

Parameters
sendCountIgnored on master if recvCount[0] == 0
recvDataIgnored on non-root rank
recvCountsIgnored on non-root rank
recvOffsetsIgnored on non-root rank

Definition at line 93 of file UPstreamGatherScatter.C.

Referenced by decomposedBlockData::gather(), and decomposedBlockData::gatherSlaveData().

Here is the caller graph for this function:

◆ scatter() [1/7]

void scatter ( const char *  sendData,
const UList< int > &  sendCounts,
const UList< int > &  sendOffsets,
char *  recvData,
int  recvCount,
const label  communicator = worldComm 
)
static

Send variable length char data to all ranks.

Parameters
sendDataIgnored on non-root rank
sendCountsIgnored on non-root rank
sendOffsetsIgnored on non-root rank

Definition at line 93 of file UPstreamGatherScatter.C.

◆ mpiGather() [2/7]

void mpiGather ( const int32_t *  sendData,
int32_t *  recvData,
int  count,
const label  communicator = worldComm 
)
static

Receive identically-sized int32_t data from all ranks.

Parameters
sendDataOn rank: individual value to send
recvDataOn master: receive buffer with all values
countNumber of send/recv data per rank. Globally consistent!

Definition at line 94 of file UPstreamGatherScatter.C.

◆ mpiScatter() [2/7]

void mpiScatter ( const int32_t *  sendData,
int32_t *  recvData,
int  count,
const label  communicator = worldComm 
)
static

Send identically-sized int32_t data to all ranks.

Parameters
sendDataOn master: send buffer with all values
recvDataOn rank: individual value to receive
countNumber of send/recv data per rank. Globally consistent!

Definition at line 94 of file UPstreamGatherScatter.C.

◆ mpiAllGather() [2/7]

void mpiAllGather ( int32_t *  allData,
int  count,
const label  communicator = worldComm 
)
static

Gather/scatter identically-sized int32_t data.

Send data from proc slot, receive into all slots

Parameters
allDataOn all ranks: the base of the data locations
countNumber of send/recv data per rank. Globally consistent!

Definition at line 94 of file UPstreamGatherScatter.C.

◆ gather() [2/7]

void gather ( const int32_t *  sendData,
int  sendCount,
int32_t *  recvData,
const UList< int > &  recvCounts,
const UList< int > &  recvOffsets,
const label  communicator = worldComm 
)
static

Receive variable length int32_t data from all ranks.

Parameters
sendCountIgnored on master if recvCount[0] == 0
recvDataIgnored on non-root rank
recvCountsIgnored on non-root rank
recvOffsetsIgnored on non-root rank

Definition at line 94 of file UPstreamGatherScatter.C.

◆ scatter() [2/7]

void scatter ( const int32_t *  sendData,
const UList< int > &  sendCounts,
const UList< int > &  sendOffsets,
int32_t *  recvData,
int  recvCount,
const label  communicator = worldComm 
)
static

Send variable length int32_t data to all ranks.

Parameters
sendDataIgnored on non-root rank
sendCountsIgnored on non-root rank
sendOffsetsIgnored on non-root rank

Definition at line 94 of file UPstreamGatherScatter.C.

◆ mpiGather() [3/7]

void mpiGather ( const int64_t *  sendData,
int64_t *  recvData,
int  count,
const label  communicator = worldComm 
)
static

Receive identically-sized int64_t data from all ranks.

Parameters
sendDataOn rank: individual value to send
recvDataOn master: receive buffer with all values
countNumber of send/recv data per rank. Globally consistent!

Definition at line 95 of file UPstreamGatherScatter.C.

◆ mpiScatter() [3/7]

void mpiScatter ( const int64_t *  sendData,
int64_t *  recvData,
int  count,
const label  communicator = worldComm 
)
static

Send identically-sized int64_t data to all ranks.

Parameters
sendDataOn master: send buffer with all values
recvDataOn rank: individual value to receive
countNumber of send/recv data per rank. Globally consistent!

Definition at line 95 of file UPstreamGatherScatter.C.

◆ mpiAllGather() [3/7]

void mpiAllGather ( int64_t *  allData,
int  count,
const label  communicator = worldComm 
)
static

Gather/scatter identically-sized int64_t data.

Send data from proc slot, receive into all slots

Parameters
allDataOn all ranks: the base of the data locations
countNumber of send/recv data per rank. Globally consistent!

Definition at line 95 of file UPstreamGatherScatter.C.

◆ gather() [3/7]

void gather ( const int64_t *  sendData,
int  sendCount,
int64_t *  recvData,
const UList< int > &  recvCounts,
const UList< int > &  recvOffsets,
const label  communicator = worldComm 
)
static

Receive variable length int64_t data from all ranks.

Parameters
sendCountIgnored on master if recvCount[0] == 0
recvDataIgnored on non-root rank
recvCountsIgnored on non-root rank
recvOffsetsIgnored on non-root rank

Definition at line 95 of file UPstreamGatherScatter.C.

◆ scatter() [3/7]

void scatter ( const int64_t *  sendData,
const UList< int > &  sendCounts,
const UList< int > &  sendOffsets,
int64_t *  recvData,
int  recvCount,
const label  communicator = worldComm 
)
static

Send variable length int64_t data to all ranks.

Parameters
sendDataIgnored on non-root rank
sendCountsIgnored on non-root rank
sendOffsetsIgnored on non-root rank

Definition at line 95 of file UPstreamGatherScatter.C.

◆ mpiGather() [4/7]

void mpiGather ( const uint32_t *  sendData,
uint32_t *  recvData,
int  count,
const label  communicator = worldComm 
)
static

Receive identically-sized uint32_t data from all ranks.

Parameters
sendDataOn rank: individual value to send
recvDataOn master: receive buffer with all values
countNumber of send/recv data per rank. Globally consistent!

Definition at line 96 of file UPstreamGatherScatter.C.

◆ mpiScatter() [4/7]

void mpiScatter ( const uint32_t *  sendData,
uint32_t *  recvData,
int  count,
const label  communicator = worldComm 
)
static

Send identically-sized uint32_t data to all ranks.

Parameters
sendDataOn master: send buffer with all values
recvDataOn rank: individual value to receive
countNumber of send/recv data per rank. Globally consistent!

Definition at line 96 of file UPstreamGatherScatter.C.

◆ mpiAllGather() [4/7]

void mpiAllGather ( uint32_t *  allData,
int  count,
const label  communicator = worldComm 
)
static

Gather/scatter identically-sized uint32_t data.

Send data from proc slot, receive into all slots

Parameters
allDataOn all ranks: the base of the data locations
countNumber of send/recv data per rank. Globally consistent!

Definition at line 96 of file UPstreamGatherScatter.C.

◆ gather() [4/7]

void gather ( const uint32_t *  sendData,
int  sendCount,
uint32_t *  recvData,
const UList< int > &  recvCounts,
const UList< int > &  recvOffsets,
const label  communicator = worldComm 
)
static

Receive variable length uint32_t data from all ranks.

Parameters
sendCountIgnored on master if recvCount[0] == 0
recvDataIgnored on non-root rank
recvCountsIgnored on non-root rank
recvOffsetsIgnored on non-root rank

Definition at line 96 of file UPstreamGatherScatter.C.

◆ scatter() [4/7]

void scatter ( const uint32_t *  sendData,
const UList< int > &  sendCounts,
const UList< int > &  sendOffsets,
uint32_t *  recvData,
int  recvCount,
const label  communicator = worldComm 
)
static

Send variable length uint32_t data to all ranks.

Parameters
sendDataIgnored on non-root rank
sendCountsIgnored on non-root rank
sendOffsetsIgnored on non-root rank

Definition at line 96 of file UPstreamGatherScatter.C.

◆ mpiGather() [5/7]

void mpiGather ( const uint64_t *  sendData,
uint64_t *  recvData,
int  count,
const label  communicator = worldComm 
)
static

Receive identically-sized uint64_t data from all ranks.

Parameters
sendDataOn rank: individual value to send
recvDataOn master: receive buffer with all values
countNumber of send/recv data per rank. Globally consistent!

Definition at line 97 of file UPstreamGatherScatter.C.

◆ mpiScatter() [5/7]

void mpiScatter ( const uint64_t *  sendData,
uint64_t *  recvData,
int  count,
const label  communicator = worldComm 
)
static

Send identically-sized uint64_t data to all ranks.

Parameters
sendDataOn master: send buffer with all values
recvDataOn rank: individual value to receive
countNumber of send/recv data per rank. Globally consistent!

Definition at line 97 of file UPstreamGatherScatter.C.

◆ mpiAllGather() [5/7]

void mpiAllGather ( uint64_t *  allData,
int  count,
const label  communicator = worldComm 
)
static

Gather/scatter identically-sized uint64_t data.

Send data from proc slot, receive into all slots

Parameters
allDataOn all ranks: the base of the data locations
countNumber of send/recv data per rank. Globally consistent!

Definition at line 97 of file UPstreamGatherScatter.C.

◆ gather() [5/7]

void gather ( const uint64_t *  sendData,
int  sendCount,
uint64_t *  recvData,
const UList< int > &  recvCounts,
const UList< int > &  recvOffsets,
const label  communicator = worldComm 
)
static

Receive variable length uint64_t data from all ranks.

Parameters
sendCountIgnored on master if recvCount[0] == 0
recvDataIgnored on non-root rank
recvCountsIgnored on non-root rank
recvOffsetsIgnored on non-root rank

Definition at line 97 of file UPstreamGatherScatter.C.

◆ scatter() [5/7]

void scatter ( const uint64_t *  sendData,
const UList< int > &  sendCounts,
const UList< int > &  sendOffsets,
uint64_t *  recvData,
int  recvCount,
const label  communicator = worldComm 
)
static

Send variable length uint64_t data to all ranks.

Parameters
sendDataIgnored on non-root rank
sendCountsIgnored on non-root rank
sendOffsetsIgnored on non-root rank

Definition at line 97 of file UPstreamGatherScatter.C.

◆ mpiGather() [6/7]

void mpiGather ( const float *  sendData,
float *  recvData,
int  count,
const label  communicator = worldComm 
)
static

Receive identically-sized float data from all ranks.

Parameters
sendDataOn rank: individual value to send
recvDataOn master: receive buffer with all values
countNumber of send/recv data per rank. Globally consistent!

Definition at line 98 of file UPstreamGatherScatter.C.

◆ mpiScatter() [6/7]

void mpiScatter ( const float *  sendData,
float *  recvData,
int  count,
const label  communicator = worldComm 
)
static

Send identically-sized float data to all ranks.

Parameters
sendDataOn master: send buffer with all values
recvDataOn rank: individual value to receive
countNumber of send/recv data per rank. Globally consistent!

Definition at line 98 of file UPstreamGatherScatter.C.

◆ mpiAllGather() [6/7]

void mpiAllGather ( float *  allData,
int  count,
const label  communicator = worldComm 
)
static

Gather/scatter identically-sized float data.

Send data from proc slot, receive into all slots

Parameters
allDataOn all ranks: the base of the data locations
countNumber of send/recv data per rank. Globally consistent!

Definition at line 98 of file UPstreamGatherScatter.C.

◆ gather() [6/7]

void gather ( const float *  sendData,
int  sendCount,
float *  recvData,
const UList< int > &  recvCounts,
const UList< int > &  recvOffsets,
const label  communicator = worldComm 
)
static

Receive variable length float data from all ranks.

Parameters
sendCountIgnored on master if recvCount[0] == 0
recvDataIgnored on non-root rank
recvCountsIgnored on non-root rank
recvOffsetsIgnored on non-root rank

Definition at line 98 of file UPstreamGatherScatter.C.

◆ scatter() [6/7]

void scatter ( const float *  sendData,
const UList< int > &  sendCounts,
const UList< int > &  sendOffsets,
float *  recvData,
int  recvCount,
const label  communicator = worldComm 
)
static

Send variable length float data to all ranks.

Parameters
sendDataIgnored on non-root rank
sendCountsIgnored on non-root rank
sendOffsetsIgnored on non-root rank

Definition at line 98 of file UPstreamGatherScatter.C.

◆ mpiGather() [7/7]

void mpiGather ( const double *  sendData,
double *  recvData,
int  count,
const label  communicator = worldComm 
)
static

Receive identically-sized double data from all ranks.

Parameters
sendDataOn rank: individual value to send
recvDataOn master: receive buffer with all values
countNumber of send/recv data per rank. Globally consistent!

Definition at line 99 of file UPstreamGatherScatter.C.

◆ mpiScatter() [7/7]

void mpiScatter ( const double *  sendData,
double *  recvData,
int  count,
const label  communicator = worldComm 
)
static

Send identically-sized double data to all ranks.

Parameters
sendDataOn master: send buffer with all values
recvDataOn rank: individual value to receive
countNumber of send/recv data per rank. Globally consistent!

Definition at line 99 of file UPstreamGatherScatter.C.

◆ mpiAllGather() [7/7]

void mpiAllGather ( double *  allData,
int  count,
const label  communicator = worldComm 
)
static

Gather/scatter identically-sized double data.

Send data from proc slot, receive into all slots

Parameters
allDataOn all ranks: the base of the data locations
countNumber of send/recv data per rank. Globally consistent!

Definition at line 99 of file UPstreamGatherScatter.C.

◆ gather() [7/7]

void gather ( const double *  sendData,
int  sendCount,
double *  recvData,
const UList< int > &  recvCounts,
const UList< int > &  recvOffsets,
const label  communicator = worldComm 
)
static

Receive variable length double data from all ranks.

Parameters
sendCountIgnored on master if recvCount[0] == 0
recvDataIgnored on non-root rank
recvCountsIgnored on non-root rank
recvOffsetsIgnored on non-root rank

Definition at line 99 of file UPstreamGatherScatter.C.

◆ scatter() [7/7]

void scatter ( const double *  sendData,
const UList< int > &  sendCounts,
const UList< int > &  sendOffsets,
double *  recvData,
int  recvCount,
const label  communicator = worldComm 
)
static

Send variable length double data to all ranks.

Parameters
sendDataIgnored on non-root rank
sendCountsIgnored on non-root rank
sendOffsetsIgnored on non-root rank

Definition at line 99 of file UPstreamGatherScatter.C.

◆ allGatherValues() [1/2]

static List<T> allGatherValues ( const T localValue,
const label  communicator = worldComm 
)
static

Allgather individual values into list locations.

The returned list has size nProcs, identical on all ranks.

Referenced by globalIndex::calcOffset(), globalIndex::calcRange(), and globalIndex::reset().

Here is the caller graph for this function:

◆ listGatherValues() [1/2]

static List<T> listGatherValues ( const T localValue,
const label  communicator = worldComm 
)
static

Gather individual values into list locations.

On master list length == nProcs, otherwise zero length.
For non-parallel : the returned list length is 1 with localValue.

Referenced by triangulatedPatch::randomGlobalPoint(), and globalIndex::reset().

Here is the caller graph for this function:

◆ listScatterValues()

T listScatterValues ( const UList< T > &  allValues,
const label  communicator = worldComm 
)
static

Scatter individual values from list locations.

On master input list length == nProcs, ignored on other procs.
For non-parallel : returns the first list element (or default initialized).

Definition at line 109 of file UPstreamTemplates.C.

References Foam::abort(), UList< T >::cdata_bytes(), UList< T >::empty(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, UList< T >::size(), and T.

Here is the call graph for this function:

◆ broadcast()

bool broadcast ( char *  buf,
const std::streamsize  bufSize,
const label  communicator,
const int  rootProcNo = masterNo() 
)
static

Broadcast buffer contents to all processes in given communicator. The sizes must match on all processes.

For non-parallel : do nothing.

Returns
True on success

Definition at line 26 of file UPstreamBroadcast.C.

Referenced by Pstream::broadcast(), Foam::broadcastFile_recursive(), Foam::broadcastFile_single(), Pstream::broadcastList(), and Foam::getHostGroupIds().

Here is the caller graph for this function:

◆ reduceAnd()

void reduceAnd ( bool &  value,
const label  communicator = worldComm 
)
static

Logical (and) reduction (MPI_AllReduce)

For non-parallel : do nothing

Definition at line 28 of file UPstreamReduce.C.

Referenced by faMeshReconstructor::faMeshReconstructor(), Foam::returnReduceAnd(), and mappedPatchBase::upToDate().

Here is the caller graph for this function:

◆ reduceOr()

void reduceOr ( bool &  value,
const label  communicator = worldComm 
)
static

Logical (or) reduction (MPI_AllReduce)

For non-parallel : do nothing

Definition at line 31 of file UPstreamReduce.C.

Referenced by polyBoundaryMesh::checkDefinition(), snappyLayerDriver::doLayers(), PstreamBuffers::finishedSends(), masterUncollatedFileOperation::readStream(), and Foam::returnReduceOr().

Here is the caller graph for this function:

◆ waitRequests() [3/3]

static void waitRequests ( )
inlinestatic

Wait for all requests to finish.

Deprecated:
(2023-01) Probably not what you want. Should normally be restricted to a particular starting request.

Definition at line 1561 of file UPstream.H.

References UPstream::waitRequests().

Referenced by meshWaveAddressing::correct(), cellCellStencil::correctBoundaryConditions(), oversetFvMeshBase::correctCoupledBoundaryConditions(), Foam::evaluateConstraintTypes(), Foam::PstreamDetail::exchangeContainer(), syncTools::syncBoundaryFaceList(), syncTools::syncFaceList(), UPstream::waitRequests(), and OFstreamCollator::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ firstSlave()

static constexpr int firstSlave ( )
inlinestaticnoexcept

Process index of first sub-process.

Deprecated:
(2020-09) use subProcs() method instead

Definition at line 1569 of file UPstream.H.

◆ allGatherValues() [2/2]

Foam::List<T> allGatherValues ( const T localValue,
const label  comm 
)

Definition at line 25 of file UPstreamTemplates.C.

References Foam::abort(), UList< T >::data_bytes(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, List< T >::resize(), and T.

Here is the call graph for this function:

◆ listGatherValues() [2/2]

Foam::List<T> listGatherValues ( const T localValue,
const label  comm 
)

Definition at line 63 of file UPstreamTemplates.C.

References Foam::abort(), UList< T >::data_bytes(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, List< T >::resize(), and T.

Here is the call graph for this function:

Member Data Documentation

◆ commsTypeNames

◆ floatTransfer

bool floatTransfer
static

Should compact transfer be used in which floats replace doubles reducing the bandwidth requirement at the expense of some loss in accuracy.

Definition at line 376 of file UPstream.H.

Referenced by processorGAMGInterfaceField::initInterfaceMatrixUpdate(), argList::parse(), and processorGAMGInterfaceField::updateInterfaceMatrix().

◆ nProcsSimpleSum

int nProcsSimpleSum
static

Number of processors to change from linear to tree communication.

Definition at line 381 of file UPstream.H.

Referenced by argList::parse(), UPstream::commsStruct::reset(), and UPstream::whichCommunication().

◆ nProcsNonblockingExchange

int nProcsNonblockingExchange
static

Number of processors to change to nonBlocking consensual exchange (NBX). Ignored for zero or negative values.

Definition at line 387 of file UPstream.H.

Referenced by argList::parse().

◆ nPollProcInterfaces

int nPollProcInterfaces
static

Number of polling cycles in processor updates.

Definition at line 392 of file UPstream.H.

Referenced by argList::parse().

◆ defaultCommsType

◆ maxCommsSize

int maxCommsSize
static

Optional maximum message size (bytes)

Definition at line 402 of file UPstream.H.

Referenced by Foam::broadcastFile_single(), and argList::parse().

◆ tuning_NBX_

int tuning_NBX_
static

Tuning parameters for non-blocking exchange (NBX)

Definition at line 407 of file UPstream.H.

Referenced by Foam::PstreamDetail::exchangeConsensus(), and argList::parse().

◆ mpiBufferSize

const int mpiBufferSize
static

MPI buffer-size (bytes)

Definition at line 412 of file UPstream.H.

Referenced by attachOurBuffers().

◆ worldComm

Foam::label worldComm
static

Communicator for all ranks. May differ from commGlobal() if local worlds are in use.

Definition at line 421 of file UPstream.H.

Referenced by regIOobject::addWatch(), masterUncollatedFileOperation::addWatch(), Foam::calcCellCellsImpl(), surfaceNoise::calculate(), multiWorldConnections::comms(), UPstream::commWorld(), masterUncollatedFileOperation::dirPath(), ensightSurfaceReader::ensightSurfaceReader(), masterUncollatedFileOperation::filePath(), masterUncollatedFileOperation::findInstance(), masterUncollatedFileOperation::findTimes(), masterUncollatedFileOperation::findWatch(), ensightSurfaceReader::geometry(), multiWorldConnections::getCommById(), multiWorldConnections::getCommByName(), Foam::getCommPattern(), masterUncollatedFileOperation::getFile(), fileOperation::getGlobalHostIORanks(), Foam::getSelectedProcs(), masterUncollatedFileOperation::getState(), masterUncollatedFileOperation::highResLastModified(), surfaceNoise::initialise(), viewFactor::initialise(), globalIndex::inplaceToGlobal(), globalIndex::isLocal(), masterUncollatedFileOperation::lastModified(), globalIndex::localEnd(), globalIndex::localSize(), globalIndex::localStart(), fileOperation::lookupAndCacheProcessorsPath(), messageStream::masterStream(), globalIndex::maxNonLocalSize(), surfaceWriter::mergeFieldTemplate(), faMeshTools::newMesh(), fvMeshTools::newMesh(), argList::parse(), fileOperation::printRanks(), globalIndex::range(), uncollatedFileOperation::read(), masterUncollatedFileOperation::read(), decomposedBlockData::readBlocks(), lumpedPointState::readData(), masterUncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readObjects(), masterUncollatedFileOperation::readStream(), surfaceNoise::readSurfaceData(), exprValueFieldTag::reduce(), masterUncollatedFileOperation::removeWatch(), Time::setMonitoring(), masterUncollatedFileOperation::setUnmodified(), fileOperation::subRanks(), surfaceNoise::surfaceAverage(), masterUncollatedFileOperation::sync(), fileOperation::sync(), globalIndex::toGlobal(), globalIndex::toLocal(), masterUncollatedFileOperation::updateStates(), globalIndex::whichProcID(), and surfaceNoise::writeSurfaceData().

◆ warnComm

Foam::label warnComm
static

Debugging: warn for use of any communicator differing from warnComm.

Definition at line 426 of file UPstream.H.

Referenced by UPstream::commWarn(), messageStream::masterStream(), Foam::reduce(), and UPstream_mpi_receive().


The documentation for this class was generated from the following files: