Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Static Private Member Functions | Static Private Attributes
UPstream Class Reference

Inter-processor communications stream. More...

Inheritance diagram for UPstream:
Inheritance graph
[legend]
Collaboration diagram for UPstream:
Collaboration graph
[legend]

Data Structures

class  commsStruct
 Structure for communicating between processors. More...
 
class  communicator
 Helper class for allocating/freeing communicators. More...
 
class  listEq
 combineReduce operator for lists. Used for counting. More...
 

Public Types

enum  commsTypes { blocking, scheduled, nonBlocking }
 Types of communications. More...
 

Public Member Functions

 ClassName ("UPstream")
 
 UPstream (const commsTypes commsType)
 Construct given optional buffer size. More...
 
commsTypes commsType () const
 Get the communications type of the stream. More...
 
commsTypes commsType (const commsTypes ct)
 Set the communications type of the stream. More...
 

Static Public Member Functions

static label allocateCommunicator (const label parent, const labelList &subRanks, const bool doPstream=true)
 Allocate a new communicator. More...
 
static void freeCommunicator (const label communicator, const bool doPstream=true)
 Free a previously allocated communicator. More...
 
static void freeCommunicators (const bool doPstream)
 Free all communicators. More...
 
static int baseProcNo (const label myComm, const int procID)
 Return physical processor number (i.e. processor number in. More...
 
static label procNo (const label comm, const int baseProcID)
 Return processor number in communicator (given physical processor. More...
 
static label procNo (const label myComm, const label currentComm, const int currentProcID)
 Return processor number in communicator (given processor number. More...
 
static void addValidParOptions (HashTable< string > &validParOptions)
 Add the valid option this type of communications library. More...
 
static bool init (int &argc, char **&argv)
 Initialisation function called from main. More...
 
static label nRequests ()
 Get number of outstanding requests. More...
 
static void resetRequests (const label sz)
 Truncate number of outstanding requests. More...
 
static void waitRequests (const label start=0)
 Wait until all requests (from start onwards) have finished. More...
 
static void waitRequest (const label i)
 Wait until request i has finished. More...
 
static bool finishedRequest (const label i)
 Non-blocking comms: has request i finished? More...
 
static int allocateTag (const char *)
 
static int allocateTag (const word &)
 
static void freeTag (const char *, const int tag)
 
static void freeTag (const word &, const int tag)
 
static bool & parRun ()
 Is this a parallel run? More...
 
static void setParRun (const label nProcs)
 Set data for parallel running. Special case nProcs=0 to switch off. More...
 
static label nProcs (const label communicator=0)
 Number of processes in parallel run. More...
 
static int masterNo ()
 Process index of the master. More...
 
static bool master (const label communicator=0)
 Am I the master process. More...
 
static int myProcNo (const label communicator=0)
 Number of this process (starting from masterNo() = 0) More...
 
static label parent (const label communicator)
 
static List< int > & procID (label communicator)
 Process ID of given process index. More...
 
static int firstSlave ()
 Process index of first slave. More...
 
static int lastSlave (const label communicator=0)
 Process index of last slave. More...
 
static const List< commsStruct > & linearCommunication (const label communicator=0)
 Communication schedule for linear all-to-master (proc 0) More...
 
static const List< commsStruct > & treeCommunication (const label communicator=0)
 Communication schedule for tree all-to-master (proc 0) More...
 
static int & msgType ()
 Message tag of standard messages. More...
 
static void exit (int errnum=1)
 Exit program. More...
 
static void abort ()
 Abort program. More...
 

Static Public Attributes

static const NamedEnum< commsTypes, 3 > commsTypeNames
 
static bool floatTransfer
 Should compact transfer be used in which floats replace doubles. More...
 
static int nProcsSimpleSum
 Number of processors at which the sum algorithm changes from linear. More...
 
static commsTypes defaultCommsType
 Default commsType. More...
 
static int nPollProcInterfaces
 Number of polling cycles in processor updates. More...
 
static label worldComm
 Default communicator (all processors) More...
 
static label warnComm
 Debugging: warn for use of any communicator differing from warnComm. More...
 

Protected Attributes

commsTypes commsType_
 Communications type of this stream. More...
 

Static Private Member Functions

static List< commsStructcalcLinearComm (const label nProcs)
 Calculate linear communication schedule. More...
 
static List< commsStructcalcTreeComm (const label nProcs)
 Calculate tree communication schedule. More...
 
static void collectReceives (const label procID, const List< DynamicList< label > > &receives, DynamicList< label > &allReceives)
 Helper function for tree communication schedule determination. More...
 
static void allocatePstreamCommunicator (const label parentIndex, const label index)
 Allocate a communicator with index. More...
 
static void freePstreamCommunicator (const label index)
 Free a communicator. More...
 

Static Private Attributes

static bool parRun_
 
static int msgType_
 
static LIFOStack< labelfreeComms_
 
static DynamicList< int > myProcNo_
 
static DynamicList< List< int > > procIDs_
 
static DynamicList< labelparentCommunicator_
 
static DynamicList< List< commsStruct > > linearCommunication_
 
static DynamicList< List< commsStruct > > treeCommunication_
 

Detailed Description

Inter-processor communications stream.

Source files

Definition at line 58 of file UPstream.H.

Member Enumeration Documentation

◆ commsTypes

enum commsTypes

Types of communications.

Enumerator
blocking 
scheduled 
nonBlocking 

Definition at line 64 of file UPstream.H.

Constructor & Destructor Documentation

◆ UPstream()

UPstream ( const commsTypes  commsType)
inline

Construct given optional buffer size.

Definition at line 267 of file UPstream.H.

Member Function Documentation

◆ calcLinearComm()

Foam::List< Foam::UPstream::commsStruct > calcLinearComm ( const label  nProcs)
staticprivate

Calculate linear communication schedule.

Definition at line 99 of file UPstream.C.

References forAll.

◆ calcTreeComm()

Foam::List< Foam::UPstream::commsStruct > calcTreeComm ( const label  nProcs)
staticprivate

Calculate tree communication schedule.

Definition at line 182 of file UPstream.C.

References List::append().

Here is the call graph for this function:

◆ collectReceives()

void collectReceives ( const label  procID,
const List< DynamicList< label > > &  receives,
DynamicList< label > &  allReceives 
)
staticprivate

Helper function for tree communication schedule determination.

Collects all processorIDs below a processor

Definition at line 139 of file UPstream.C.

References DynamicList::append(), and forAll.

Here is the call graph for this function:

◆ allocatePstreamCommunicator()

void allocatePstreamCommunicator ( const label  parentIndex,
const label  index 
)
staticprivate

Allocate a communicator with index.

Definition at line 85 of file UPstream.C.

◆ freePstreamCommunicator()

void freePstreamCommunicator ( const label  index)
staticprivate

Free a communicator.

Definition at line 92 of file UPstream.C.

◆ ClassName()

ClassName ( "UPstream"  )

◆ allocateCommunicator()

Foam::label allocateCommunicator ( const label  parent,
const labelList subRanks,
const bool  doPstream = true 
)
static

◆ freeCommunicator()

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

◆ freeCommunicators()

void freeCommunicators ( const bool  doPstream)
static

Free all communicators.

Definition at line 341 of file UPstream.C.

References forAll.

◆ baseProcNo()

int baseProcNo ( const label  myComm,
const int  procID 
)
static

Return physical processor number (i.e. processor number in.

worldComm) given communicator and procssor

Definition at line 353 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 369 of file UPstream.C.

References Foam::findIndex().

Here is the call graph for this function:

◆ procNo() [2/2]

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

Return processor number in communicator (given processor number.

and communicator)

Definition at line 387 of file UPstream.C.

References UPstream::baseProcNo().

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 31 of file UPstream.C.

◆ init()

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

Initialisation function called from main.

Spawns slave processes and initialises inter-communication

Definition at line 35 of file UPstream.C.

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

Referenced by ParRunControl::runPar().

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

◆ nRequests()

Foam::label nRequests ( )
static

◆ resetRequests()

void resetRequests ( const label  sz)
static

Truncate number of outstanding requests.

Definition at line 102 of file UPstream.C.

Referenced by main().

Here is the caller graph for this function:

◆ waitRequests()

void waitRequests ( const label  start = 0)
static

Wait until all requests (from start onwards) have finished.

Definition at line 106 of file UPstream.C.

Referenced by volPointInterpolation::addSeparated(), mapDistributeBase::compact(), correctCoupledBoundaryConditions(), and GeometricField::GeometricBoundaryField::evaluate().

Here is the caller graph for this function:

◆ waitRequest()

void waitRequest ( const label  i)
static

Wait until request i has finished.

Definition at line 110 of file UPstream.C.

Referenced by main(), processorFvPatchField< Type >::updateInterfaceMatrix(), and processorGAMGInterfaceField::updateInterfaceMatrix().

Here is the caller graph for this function:

◆ finishedRequest()

bool finishedRequest ( const label  i)
static

Non-blocking comms: has request i finished?

Definition at line 114 of file UPstream.C.

References NotImplemented.

◆ allocateTag() [1/2]

int allocateTag ( const char *  s)
static

Definition at line 547 of file UPstream.C.

References Foam::endl(), Foam::PstreamGlobals::freedTags_, Foam::PstreamGlobals::nTags_, Foam::Pout, DynamicList::remove(), and s().

Here is the call graph for this function:

◆ allocateTag() [2/2]

int allocateTag ( const word s)
static

Definition at line 576 of file UPstream.C.

References Foam::endl(), Foam::PstreamGlobals::freedTags_, Foam::PstreamGlobals::nTags_, Foam::Pout, DynamicList::remove(), and s().

Here is the call graph for this function:

◆ freeTag() [1/2]

void freeTag ( const char *  s,
const int  tag 
)
static

Definition at line 605 of file UPstream.C.

References DynamicList::append(), Foam::endl(), Foam::PstreamGlobals::freedTags_, Foam::Pout, and s().

Here is the call graph for this function:

◆ freeTag() [2/2]

void freeTag ( const word s,
const int  tag 
)
static

Definition at line 621 of file UPstream.C.

References DynamicList::append(), Foam::endl(), Foam::PstreamGlobals::freedTags_, Foam::Pout, and s().

Here is the call graph for this function:

◆ parRun()

static bool& parRun ( )
inlinestatic

Is this a parallel run?

Definition at line 377 of file UPstream.H.

References UPstream::parRun_.

Referenced by error::abort(), IOerror::abort(), polyMeshGenModifier::addBufferCells(), meshOctreeModifier::addLayerFromNeighbouringProcessors(), autoLayerDriver::addLayers(), meshRefinement::balance(), functionObjectFile::baseFileDir(), boundBox::boundBox(), partTriMesh::bufferLayerPoints(), partTetMesh::bufferLayerPoints(), addPatchCellLayer::calcExtrudeInfo(), processorCyclicPolyPatch::calcGeometry(), processorPolyPatch::calcGeometry(), meshSurfaceEngine::calcGlobalBoundaryEdgeLabels(), meshSurfaceEngine::calcGlobalBoundaryPointLabels(), polyMeshGenAddressing::calcGlobalCellLabels(), polyMeshGenAddressing::calcGlobalEdgeLabels(), meshOctreeAddressing::calcGlobalFaceLabels(), polyMeshGenAddressing::calcGlobalFaceLabels(), meshOctreeAddressing::calcGlobalLeafLabels(), meshOctreeAddressing::calcGlobalPointLabels(), polyMeshGenAddressing::calcGlobalPointLabels(), globalMeshData::calcSharedEdges(), boundBox::calculate(), meshSurfaceEngine::calculateBoundaryNodes(), meshSurfacePartitioner::calculateCornersEdgesAndAddressing(), meshSurfaceEngine::calculateEdgePatchesAddressing(), meshSurfaceEngine::calculateEdgesAndAddressing(), meshSurfaceEngine::calculateFaceFacesAddressing(), boundaryLayerOptimisation::calculateHairVectorsAtTheBoundary(), edgeExtractor::faceEvaluator::calculateNeiPatchesParallel(), edgeExtractor::faceEvaluator::calculateNeiPatchesParallelNewPatches(), boundaryLayerOptimisation::calculateNormalVectors(), featureEdgesNeiOp::calculateNumberOfEdgesAtPoint(), meshOptimizer::calculatePointLocations(), meshSurfaceEngine::calculatePointPatches(), meshSurfaceEngine::calculatePointPoints(), edgeExtractor::calculateValence(), cartesian2DMeshGenerator::cartesian2DMeshGenerator(), cartesianMeshGenerator::cartesianMeshGenerator(), checkIrregularSurfaceConnections::checkAndFixCellGroupsAtBndVertices(), meshOctreeAddressing::checkAndFixIrregularConnections(), checkCellConnectionsOverFaces::checkCellGroups(), edgeExtractor::checkConcaveEdgeCells(), edgeExtractor::checkCorners(), checkIrregularSurfaceConnections::checkEdgeFaceConnections(), decomposeCells::checkFaceConnections(), Foam::polyMeshGenChecks::checkFaceDotProduct(), Foam::polyMeshGenChecks::checkFaceFlatness(), checkIrregularSurfaceConnections::checkFaceGroupsAtBndVertices(), edgeExtractor::checkFacePatchesGeometry(), edgeExtractor::checkFacePatchesTopology(), Foam::polyMeshGenChecks::checkFaceSkewness(), Foam::polyMeshGenChecks::checkFaceUniformity(), meshOctreeAddressing::checkGluedRegions(), topologicalCleaner::checkInvalidConnectionsForVerticesCells(), topologicalCleaner::checkInvalidConnectionsForVerticesFaces(), topologicalCleaner::checkNonConsecutiveBoundaryVertices(), topologicalCleaner::checkNonMappableCells(), topologicalCleaner::checkNonMappableFaces(), polyBoundaryMesh::checkParallelSync(), meshSurfaceCheckInvertedVertices::checkVertices(), meshSurfaceCheckEdgeTypes::classifyEdges(), meshSurfaceOptimizer::classifySurfaceVertices(), CloudFunctionObject< CloudType >::CloudFunctionObject(), Pstream::combineGather(), Pstream::combineScatter(), faceSource::combineSurfaceGeometry(), mapDistributeBase::compact(), edgeExtractor::cornerEvaluator::cornerEvaluator(), correctCoupledBoundaryConditions(), processorFvPatch::coupled(), processorPointPatchField< Type >::coupled(), processorCyclicPointPatchField< Type >::coupled(), processorFvsPatchField< Type >::coupled(), processorCyclicFvsPatchField< Type >::coupled(), cyclicAMIFvPatch::coupled(), cyclicACMIFvPatch::coupled(), processorFvPatchField< Type >::coupled(), processorPolyPatch::coupled(), Foam::createFIRESelections(), meshOctree::createInitialOctreeBox(), boundaryLayers::createLayerCells(), cartesianMeshExtractor::createMesh(), boundaryLayers::createNewEdgeVerticesParallel(), boundaryLayers::createNewFacesAndCells(), extrudeLayer::createNewFacesParallel(), boundaryLayers::createNewPartitionVerticesParallel(), extrudeLayer::createNewVertices(), boundaryLayers::createNewVertices(), meshOctreeCreator::createOctreeBoxes(), meshOctreeAddressing::createOctreeFaces(), partTetMesh::createPointsAndTets(), partTriMesh::createPointsAndTrias(), cartesianMeshExtractor::createPolyMesh(), simpleGeomDecomp::decompose(), correctEdgesBetweenPatches::decomposeConcaveFaces(), decomposeFaces::decomposeConcaveInternalFaces(), decomposeFaces::decomposeMeshFaces(), correctEdgesBetweenPatches::decomposeProblematicFaces(), conformalVoronoiMesh::decomposition(), processorFvPatch::delta(), symmetryPlaneOptimisation::detectSymmetryPlanes(), fvMeshDistribute::distribute(), refinementHistory::distribute(), edgeExtractor::distributeBoundaryFacesNormalAlignment(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), fvMeshSubset::doCoupledPatches(), autoLayerDriver::doLayers(), GeometricField::GeometricBoundaryField::evaluate(), meshOctree::exchangeRequestsWithNeighbourProcessors(), error::exit(), IOerror::exit(), sampledSurfaces::expire(), edgeExtractor::faceEvaluator::faceEvaluator(), meshSurfaceMapper2D::findActiveBoundaryEdges(), checkBoundaryFacesSharingTwoEdges::findBndFacesAtBndVertex(), surfaceMorpherCells::findBoundaryVertices(), polyMesh::findCell(), checkNonMappableCellConnections::findCells(), edgeExtractor::findCornerCandidates(), checkBoundaryFacesSharingTwoEdges::findFacesAtBndEdge(), meshSurfaceOptimizer::findInvertedVertices(), distributedTriSurfaceMesh::findLine(), meshSurfaceMapper::findMappingDistance(), meshSurfaceMapper2D::findMappingDistance(), distributedTriSurfaceMesh::findNearest(), meshOctree::findNearestSurfacePoint(), meshOctree::findNearestSurfacePointInRegion(), meshOctree::findNeighbourOverNode(), meshOctree::findNeighboursInDirection(), meshOctree::findNeighboursOverEdge(), edgeExtractor::findOtherFacePatchesParallel(), boundaryLayers::findPatchesToBeTreatedTogether(), boundaryLayers::findPatchVertices(), meshOctreeAddressing::findUsedBoxes(), Gather< T0 >::Gather(), Pstream::gather(), Pstream::gatherList(), refineBoundaryLayers::generateNewCells(), refineBoundaryLayers::generateNewFaces(), refineBoundaryLayers::generateNewVertices(), distributedTriSurfaceMesh::getField(), distributedTriSurfaceMesh::getNormal(), distributedTriSurfaceMesh::getRegion(), partTriMesh::globalPointLabel(), partTetMesh::globalPointLabel(), partTriMesh::globalToLocalPointAddressing(), partTetMesh::globalToLocalPointAddressing(), Foam::help::groupMarking(), InflationInjection< CloudType >::InflationInjection(), processorPolyPatch::initGeometry(), processorPolyPatch::initOrder(), globalMeshData::initProcAddr(), processorPolyPatch::initUpdateMesh(), meshOptimizer::laplaceSmoother::laplacianParallel(), meshOptimizer::laplaceSmoother::laplacianPCParallel(), meshOptimizer::laplaceSmoother::laplacianWPCParallel(), meshOctreeCube::leavesInBox(), meshOctreeCube::leavesInSphere(), Pstream::listCombineGather(), Pstream::listCombineScatter(), meshSurfaceOptimizer::lockBoundaryFaces(), meshSurfaceOptimizer::lockBoundaryPoints(), meshOptimizer::lockCells(), meshOptimizer::lockFaces(), meshOptimizer::lockPoints(), LUscalarMatrix::LUscalarMatrix(), main(), immersedBoundaryFvPatch::makeIbCellCells(), processorFvPatch::makeWeights(), Pstream::mapCombineGather(), Pstream::mapCombineScatter(), meshSurfaceMapper::mapEdgeNodes(), meshSurfaceMapper::mapToSmallestDistance(), meshSurfaceMapper2D::mapToSmallestDistance(), meshSurfaceMapper::mapVerticesOntoSurface(), meshSurfaceMapper2D::mapVerticesOntoSurface(), meshSurfaceMapper::mapVerticesOntoSurfacePatches(), meshSurfaceMapper2D::mapVerticesOntoSurfacePatches(), meshOctreeCube::markLeavesInSphere(), edgeExtractor::markPatchPoints(), triSurfaceCleanupDuplicates::mergeIdentities(), meshOctreeAddressing::meshOctreeAddressing(), meshSurfaceEdgeExtractorFUN::meshSurfaceEdgeExtractorFUN(), meshSurfaceMapper::meshSurfaceMapper(), meshSurfaceMapper2D::meshSurfaceMapper2D(), surfaceMorpherCells::morphBoundaryFaces(), surfaceMorpherCells::morphInternalFaces(), extrudeLayer::movePoints(), edgeExtractor::moveVerticesTowardsDiscontinuities(), edgeExtractor::faceEvaluator::neiFacesProcs(), polyBoundaryMesh::neighbourEdges(), edgeExtractor::faceEvaluator::neiPatchesOverEdges(), partTriMesh::neiProcs(), partTetMesh::neiProcs(), tetMeshOptimisation::optimiseBoundarySurfaceLaplace(), tetMeshOptimisation::optimiseBoundaryVolumeOptimizer(), boundaryLayerOptimisation::optimiseHairNormalsAtTheBoundary(), boundaryLayerOptimisation::optimiseHairNormalsInside(), boundaryLayerOptimisation::optimiseThicknessVariation(), tetMeshOptimisation::optimiseUsingKnuppMetric(), tetMeshOptimisation::optimiseUsingMeshUntangler(), tetMeshOptimisation::optimiseUsingVolumeOptimizer(), processorPolyPatch::order(), InflationInjection< CloudType >::parcelsToInject(), partTetMesh::partTetMesh(), partTriMesh::partTriMesh(), correctEdgesBetweenPatches::patchCorrection(), partTriMesh::pointAtProcs(), partTetMesh::pointAtProcs(), symmetryPlaneOptimisation::pointInPlanes(), partTriMesh::pointsAtProcessorBoundaries(), partTetMesh::pointsAtProcessorBoundaries(), polyMeshGen2DEngine::polyMeshGen2DEngine(), polyMeshGenFaces::polyMeshGenFaces(), meshSurfaceMapper::preMapVertices(), meshSurfaceMapper2D::preMapVertices(), probes::prepare(), edgeExtractor::projectDeterminedFeatureVertices(), sampledSurfaces::read(), regIOobject::read(), IOdictionary::readFile(), Time::readModifiedObjects(), meshOctreeCreator::refineBoundary(), meshOctreeCreator::refineBoxes(), meshOctreeCreator::refineBoxesNearDataBoxes(), meshOctreeAutomaticRefinement::refineSelectedBoxes(), regionRenumber(), polyMeshGenModifier::removeCells(), surfaceMorpherCells::removeCellsWithAllVerticesAtTheBoundary(), polyMeshGenModifier::removeFaces(), moleculeCloud::removeHighEnergyOverlaps(), polyMeshGenModifier::reorderBoundaryFaces(), polyMeshGenModifier::replaceBoundary(), meshOctreeInsideOutside::reviseDataBoxes(), sampledSurfaces::sampledSurfaces(), Pstream::scatter(), Pstream::scatterList(), meshSurfaceMapper::selectNodesAtParallelBnd(), Time::setControls(), fvMeshSubset::setLargeCellSubset(), edgeExtractor::faceEvaluator::setNewBoundaryPatches(), meshOctreeCreator::setRootCubeSizeAndRefParameters(), meshSurfaceOptimizer::smoothEdgePoints(), meshSurfaceOptimizer::smoothLaplacianFC(), LUscalarMatrix::solve(), refineBoundaryLayers::sortFaceFaces(), refineBoundaryLayers::sortFacePoints(), sumReduce(), syncPoints(), isoSurface::syncUnseparatedPoints(), meshSurfaceEngineModifier::syncVerticesAtParallelBoundaries(), triSurfaceDetectFeatureEdges::triSurfaceDetectFeatureEdges(), meshSurfaceOptimizer::untangleSurface(), meshSurfaceOptimizer::untangleSurface2D(), sampledSurfaces::update(), meshSurfaceEngineModifier::updateGeometry(), processorPolyPatch::updateMesh(), meshSurfaceEngine::updatePointNormalsAtProcBoundaries(), partTriMesh::updateVertices(), partTriMesh::updateVerticesSMP(), streamLineBase::write(), meshToMeshMethod::writeConnectivity(), fieldMinMax::writeFileHeader(), sampledSurfaces::writeGeometry(), and boundaryLayers::~boundaryLayers().

◆ setParRun()

void setParRun ( const label  nProcs)
static

Set data for parallel running. Special case nProcs=0 to switch off.

parallel running

Definition at line 58 of file UPstream.C.

References UPstream::allocateCommunicator(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, UPstream::freeCommunicator(), Foam::identity(), UPstream::myProcNo(), Foam::name(), UPstream::nProcs(), UPstream::parRun_, Foam::Perr, Foam::Pout, prefixOSstream::prefix(), and UPstream::worldComm.

Here is the call graph for this function:

◆ nProcs()

static label nProcs ( const label  communicator = 0)
inlinestatic

Number of processes in parallel run.

Definition at line 387 of file UPstream.H.

References UPstream::procIDs_.

Referenced by surfaceZonesInfo::addCellZonesToMesh(), surfaceZonesInfo::addFaceZonesToMesh(), meshOctreeModifier::addLayerFromNeighbouringProcessors(), fvMeshDistribute::addProcPatches(), masterCoarsestGAMGProcAgglomeration::agglomerate(), eagerGAMGProcAgglomeration::agglomerate(), procFacesGAMGProcAgglomeration::agglomerate(), manualGAMGProcAgglomeration::agglomerate(), mapDistributeBase::calcCompactAddressing(), meshSurfaceEngine::calcGlobalBoundaryEdgeLabels(), meshSurfaceEngine::calcGlobalBoundaryFaceLabels(), meshSurfaceEngine::calcGlobalBoundaryPointLabels(), polyMeshGenAddressing::calcGlobalCellLabels(), polyMeshGenAddressing::calcGlobalEdgeLabels(), globalMeshData::calcGlobalEdgeSlaves(), polyMeshGenAddressing::calcGlobalFaceLabels(), meshOctreeAddressing::calcGlobalLeafLabels(), globalMeshData::calcGlobalPointBoundaryCells(), globalMeshData::calcGlobalPointBoundaryFaces(), meshOctreeAddressing::calcGlobalPointLabels(), polyMeshGenAddressing::calcGlobalPointLabels(), distributedTriSurfaceMesh::calcLocalQueries(), checkIrregularSurfaceConnections::checkAndFixCellGroupsAtBndVertices(), autoLayerDriver::checkAndUnmark(), meshRefinement::checkCoupledFaceZones(), checkIrregularSurfaceConnections::checkFaceGroupsAtBndVertices(), polyBoundaryMesh::checkParallelSync(), fieldValue::combineFields(), Pstream::combineGather(), faceSource::combineMeshGeometry(), Foam::combineReduce(), Pstream::combineScatter(), UPstream::commsStruct::commsStruct(), mapDistributeBase::compact(), fvMeshDistribute::countCells(), partTetMesh::createBufferLayers(), extrudeLayer::createNewVertices(), partTriMesh::createParallelAddressing(), partTetMesh::createParallelAddressing(), createReconstructMap(), simpleGeomDecomp::decompose(), globalIndexAndTransform::determineTransforms(), fvMeshDistribute::distribute(), refinementHistory::distribute(), distributedTriSurfaceMesh::distribute(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), meshOctreeModifier::distributeLeavesToProcessors(), distributedTriSurfaceMesh::distributeSegments(), doCommand(), mapDistributeBase::exchangeAddressing(), Foam::help::exchangeMap(), extractSurface(), distributedTriSurfaceMesh::findNearest(), boundaryLayers::findPatchesToBeTreatedTogether(), Pstream::gather(), Pstream::gatherList(), refineBoundaryLayers::generateNewCells(), refineBoundaryLayers::generateNewFaces(), refineBoundaryLayers::generateNewVertices(), globalIndex::globalIndex(), Foam::help::groupMarking(), distributedTriSurfaceMesh::independentlyDistributedBbs(), viewFactor::initialise(), meshOptimizer::laplaceSmoother::laplacianParallel(), UPstream::lastSlave(), Pstream::listCombineGather(), Pstream::listCombineScatter(), meshOctreeModifier::loadDistribution(), LUscalarMatrix::LUscalarMatrix(), main(), immersedBoundaryFvPatch::makeIbCellCells(), Pstream::mapCombineGather(), Pstream::mapCombineScatter(), mapDistributeBase::mapDistributeBase(), fvMeshDistribute::mergeWordList(), meshSurfaceOptimizer::nodeDisplacementLaplacianParallel(), InflationInjection< CloudType >::parcelsToInject(), argList::parse(), mapDistributeBase::printLayout(), printMeshData(), distributedTriSurfaceMesh::read(), regIOobject::read(), externalCoupledFunctionObject::readColumns(), readFields(), IOdictionary::readFile(), externalCoupledFunctionObject::readLines(), mapDistributeBase::receive(), Foam::reduce(), Foam::returnReduce(), Pstream::scatter(), Pstream::scatterList(), mapDistributeBase::send(), Time::setControls(), fvMeshSubset::setLargeCellSubset(), UPstream::setParRun(), ParSortableList< Type >::sort(), hierarchGeomDecomp::sortComponent(), cyclicPeriodicAMIPolyPatch::syncTransforms(), meshOctreeModifier::updateCommunicationPattern(), globalMeshData::updateMesh(), streamLineBase::write(), and externalCoupledFunctionObject::writeGeometry().

◆ masterNo()

static int masterNo ( )
inlinestatic

◆ master()

static bool master ( const label  communicator = 0)
inlinestatic

Am I the master process.

Definition at line 399 of file UPstream.H.

References UPstream::masterNo(), and UPstream::myProcNo_.

Referenced by effectivenessHeatExchangerSource::addSup(), sixDoFRigidBodyMotion::applyRestraints(), mappedPatchBase::calcMapping(), globalMeshData::calcSharedEdges(), viewFactor::calculate(), argList::check(), Foam::polyMeshGenChecks::checkFacePyramids(), polyBoundaryMesh::checkParallelSync(), argList::checkRootCase(), functionObjectFile::createFile(), externalCoupledFunctionObject::createLockFile(), simpleGeomDecomp::decompose(), determineDecomposition(), globalIndexAndTransform::determineTransforms(), JobInfo::end(), forces::execute(), externalCoupledFunctionObject::externalCoupledFunctionObject(), extractSurface(), probes::findElements(), Gather< T0 >::Gather(), cachedRandom::globalGaussNormal(), cachedRandom::globalPosition(), cachedRandom::globalRandomise01(), cachedRandom::globalSample01(), Foam::help::groupMarking(), viewFactor::initialise(), externalCoupledFunctionObject::initialise(), IOdictionary::IOdictionary(), JobInfo::JobInfo(), LUscalarMatrix::LUscalarMatrix(), main(), messageStream::masterStream(), fvMeshTools::newMesh(), InflationInjection< CloudType >::parcelsToInject(), argList::parse(), porosityModel::porosityModel(), probes::prepare(), functionObjectFile::read(), sampledSurfaces::read(), regIOobject::read(), sampledSets::read(), externalCoupledFunctionObject::read(), externalCoupledFunctionObject::readColumns(), IOdictionary::readData(), readFields(), IOdictionary::readFile(), externalCoupledFunctionObject::readLines(), parFvFieldReconstructor::reconstructPoints(), redistributeAndWrite(), abortCalculation::removeFile(), externalCoupledFunctionObject::removeLockFile(), externalCoupledFunctionObject::removeReadFiles(), externalCoupledFunctionObject::removeWriteFiles(), sampledSurfaces::sampleAndWrite(), sampledSets::sampleAndWrite(), patchInjectionBase::setPositionAndCell(), globalMeshData::sharedPoints(), JobInfo::signalEnd(), LUscalarMatrix::solve(), ParSortableList< Type >::sort(), sumReduce(), hexRef8Data::sync(), sampledSurfaces::update(), sixDoFRigidBodyMotion::update(), fileMonitor::updateStates(), solution::upgradeSolverDict(), externalCoupledFunctionObject::wait(), JobInfo::write(), residuals::write(), runTimePostProcessing::write(), cloudInfo::write(), streamLineBase::write(), sampledSets::write(), regionSizeDistribution::write(), sampledSurfaces::writeGeometry(), externalCoupledFunctionObject::writeGeometry(), cyclicPeriodicAMIPolyPatch::writeOBJ(), derivedFieldWriter::writeStatistics(), cellSource::writeValues(), faceSource::writeValues(), and JobInfo::~JobInfo().

Here is the call graph for this function:

◆ myProcNo()

static int myProcNo ( const label  communicator = 0)
inlinestatic

Number of this process (starting from masterNo() = 0)

Definition at line 405 of file UPstream.H.

References UPstream::myProcNo_.

Referenced by surfaceZonesInfo::addCellZonesToMesh(), surfaceZonesInfo::addFaceZonesToMesh(), meshOctreeModifier::addLayerFromNeighbouringProcessors(), polyMeshGenModifier::addProcessorPatch(), fvMeshDistribute::addProcPatches(), masterCoarsestGAMGProcAgglomeration::agglomerate(), eagerGAMGProcAgglomeration::agglomerate(), manualGAMGProcAgglomeration::agglomerate(), edgeExtractor::faceEvaluator::bestPatchAfterModification(), meshSurfaceEngine::calcAddressingForProcEdges(), mapDistributeBase::calcCompactAddressing(), addPatchCellLayer::calcExtrudeInfo(), meshSurfaceEngine::calcGlobalBoundaryEdgeLabels(), meshSurfaceEngine::calcGlobalBoundaryFaceLabels(), meshSurfaceEngine::calcGlobalBoundaryPointLabels(), polyMeshGenAddressing::calcGlobalCellLabels(), polyMeshGenAddressing::calcGlobalEdgeLabels(), globalMeshData::calcGlobalEdgeSlaves(), polyMeshGenAddressing::calcGlobalFaceLabels(), meshOctreeAddressing::calcGlobalLeafLabels(), globalMeshData::calcGlobalPointEdges(), meshOctreeAddressing::calcGlobalPointLabels(), polyMeshGenAddressing::calcGlobalPointLabels(), distributedTriSurfaceMesh::calcLocalQueries(), globalMeshData::calcPointConnectivity(), viewFactor::calculate(), meshToMesh::calculate(), meshSurfacePartitioner::calculateCornersEdgesAndAddressing(), boundaryLayerOptimisation::calculateHairVectorsAtTheBoundary(), boundaryLayerOptimisation::calculateNormalVectors(), featureEdgesNeiOp::calculateNumberOfEdgesAtPoint(), polyMeshGenCells::calculateOwnersAndNeighbours(), meshSurfaceEngine::calculatePointPatches(), meshSurfaceEngine::calculatePointPoints(), GAMGAgglomeration::calculateRegionMaster(), edgeExtractor::calculateValence(), checkIrregularSurfaceConnections::checkAndFixCellGroupsAtBndVertices(), meshRefinement::checkCoupledFaceZones(), checkIrregularSurfaceConnections::checkEdgeFaceConnections(), checkIrregularSurfaceConnections::checkFaceGroupsAtBndVertices(), topologicalCleaner::checkInvalidConnectionsForVerticesFaces(), polyBoundaryMesh::checkParallelSync(), meshSurfaceCheckInvertedVertices::checkVertices(), featureEdgesNeiOp::collectGroups(), regionToFace::combine(), fieldValue::combineFields(), Pstream::combineGather(), faceSource::combineMeshGeometry(), Pstream::combineScatter(), mapDistributeBase::compact(), refinementHistory::countProc(), conformalVoronoiMesh::createBafflePointPair(), partTriMesh::createBufferLayers(), partTetMesh::createBufferLayers(), boundaryLayers::createLayerCells(), boundaryLayers::createNewEdgeVerticesParallel(), boundaryLayers::createNewFacesFromPointsParallel(), boundaryLayers::createNewFacesParallel(), boundaryLayers::createNewPartitionVerticesParallel(), extrudeLayer::createNewVertices(), meshOctreeAddressing::createOctreeFaces(), partTriMesh::createParallelAddressing(), partTetMesh::createParallelAddressing(), edgeExtractor::cornerEvaluator::createParallelAddressing(), conformalVoronoiMesh::createPointPair(), cartesianMeshExtractor::createPolyMesh(), createReconstructMap(), noDecomp::decompose(), correctEdgesBetweenPatches::decomposeConcaveFaces(), correctEdgesBetweenPatches::decomposeProblematicFaces(), autoLayerDriver::determineSidePatches(), globalIndexAndTransform::determineTransforms(), fvMeshDistribute::distribute(), distributedTriSurfaceMesh::distribute(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), meshOctreeModifier::distributeLeavesToProcessors(), distributedTriSurfaceMesh::distributeSegment(), distributedTriSurfaceMesh::distributeSegments(), meshSurfaceOptimizer::edgeNodeDisplacementParallel(), mapDistributeBase::exchangeAddressing(), tetMeshOptimisation::exchangeData(), Foam::help::exchangeMap(), meshOctree::exchangeRequestsWithNeighbourProcessors(), processorField::execute(), extractSurface(), checkBoundaryFacesSharingTwoEdges::findBndFacesAtBndVertex(), InjectionModel< CloudType >::findCellAtPosition(), edgeExtractor::findCornerCandidates(), patchProbes::findElements(), probes::findElements(), checkBoundaryFacesSharingTwoEdges::findFacesAtBndEdge(), meshSurfaceOptimizer::findInvertedVertices(), distributedTriSurfaceMesh::findLine(), meshSurfaceMapper::findMappingDistance(), meshSurfaceMapper2D::findMappingDistance(), distributedTriSurfaceMesh::findNearest(), boundaryLayers::findPatchesToBeTreatedTogether(), globalMeshData::findTransform(), meshOctreeAddressing::findUsedBoxes(), Pstream::gather(), Pstream::gatherList(), refineBoundaryLayers::generateNewCells(), refineBoundaryLayers::generateNewFaces(), refineBoundaryLayers::generateNewVertices(), fvMeshDistribute::getBoundaryPatch(), fvMeshDistribute::getNeighbourData(), globalIndex::globalIndex(), Foam::help::groupMarking(), viewFactor::initialise(), globalIndex::isLocal(), meshOptimizer::laplaceSmoother::laplacianParallel(), meshOptimizer::laplaceSmoother::laplacianPCParallel(), meshOptimizer::laplaceSmoother::laplacianWPCParallel(), Pstream::listCombineGather(), Pstream::listCombineScatter(), meshOctreeModifier::loadDistribution(), globalIndex::localSize(), meshSurfaceOptimizer::lockBoundaryFaces(), meshSurfaceOptimizer::lockBoundaryPoints(), main(), immersedBoundaryFvPatch::makeIbCellCells(), Pstream::mapCombineGather(), Pstream::mapCombineScatter(), mapDistribute::mapDistribute(), mapDistributeBase::mapDistributeBase(), meshSurfaceMapper::mapToSmallestDistance(), meshSurfaceMapper2D::mapToSmallestDistance(), edgeExtractor::markPatchPoints(), fvMeshDistribute::mergeWordList(), surfaceMorpherCells::morphInternalFaces(), extrudeLayer::movePoints(), edgeExtractor::moveVerticesTowardsDiscontinuities(), edgeExtractor::faceEvaluator::neiFacesProcs(), regionSplit::nLocalRegions(), meshSurfaceOptimizer::nodeDisplacementLaplacianFCParallel(), meshSurfaceOptimizer::nodeDisplacementLaplacianParallel(), boundaryLayerOptimisation::optimiseHairNormalsAtTheBoundary(), boundaryLayerOptimisation::optimiseHairNormalsInside(), boundaryLayerOptimisation::optimiseThicknessVariation(), InflationInjection< CloudType >::parcelsToInject(), argList::parse(), partTetMesh::partTetMesh(), partTriMesh::partTriMesh(), symmetryPlaneOptimisation::pointInPlanes(), meshSurfaceMapper::preMapVertices(), meshSurfaceMapper2D::preMapVertices(), mapDistributeBase::printLayout(), printMeshData(), backgroundMeshDecomposition::procBounds(), procNeighbours(), edgeExtractor::projectDeterminedFeatureVertices(), distributedTriSurfaceMesh::read(), regIOobject::read(), readFields(), IOdictionary::readFile(), redistributeAndWrite(), indexedVertex::referred(), polyMeshGenModifier::reorderProcBoundaryFaces(), Pstream::scatter(), Pstream::scatterList(), meshSurfaceMapper::selectNodesAtParallelBnd(), Time::setControls(), fvMeshSubset::setLargeCellSubset(), UPstream::setParRun(), patchInjectionBase::setPositionAndCell(), ParSortableList< Type >::sort(), ThermoSurfaceFilm< CloudType >::splashInteraction(), fvMeshDistribute::subsetBoundaryData(), cyclicPeriodicAMIPolyPatch::syncTransforms(), meshSurfaceEngineModifier::syncVerticesAtParallelBoundaries(), globalIndex::toGlobal(), globalIndex::toLocal(), tetMeshOptimisation::unifyCoordinatesParallel(), tetMeshOptimisation::unifyNegativePoints(), indexedCell::unsortedVertexGlobalIndices(), meshSurfaceOptimizer::untangleSurface2D(), tetMeshOptimisation::updateBufferLayerPoints(), partTriMesh::updateBufferLayers(), meshOctreeModifier::updateCommunicationPattern(), meshSurfaceEngineModifier::updateGeometry(), patchInjectionBase::updateMesh(), meshSurfaceEngine::updatePointNormalsAtProcBoundaries(), partTriMesh::updateVertices(), partTriMesh::updateVerticesSMP(), Foam::help::whisperReduce(), meshToMeshMethod::writeConnectivity(), and externalCoupledFunctionObject::writeGeometry().

◆ parent()

static label parent ( const label  communicator)
inlinestatic

Definition at line 410 of file UPstream.H.

References UPstream::parentCommunicator_.

Referenced by UPstream::baseProcNo().

Here is the caller graph for this function:

◆ procID()

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

Process ID of given process index.

Definition at line 416 of file UPstream.H.

References UPstream::procIDs_.

Referenced by UPstream::baseProcNo().

Here is the caller graph for this function:

◆ firstSlave()

static int firstSlave ( )
inlinestatic

◆ lastSlave()

static int lastSlave ( const label  communicator = 0)
inlinestatic

Process index of last slave.

Definition at line 428 of file UPstream.H.

References UPstream::nProcs().

Referenced by globalMeshData::calcSharedEdges(), Gather< T0 >::Gather(), LUscalarMatrix::LUscalarMatrix(), main(), fvMeshTools::newMesh(), argList::parse(), globalMeshData::sharedPoints(), LUscalarMatrix::solve(), and sumReduce().

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

◆ linearCommunication()

static const List<commsStruct>& linearCommunication ( const label  communicator = 0)
inlinestatic

◆ treeCommunication()

static const List<commsStruct>& treeCommunication ( const label  communicator = 0)
inlinestatic

◆ msgType()

static int& msgType ( )
inlinestatic

Message tag of standard messages.

Definition at line 452 of file UPstream.H.

References UPstream::msgType_.

Referenced by extendedCentredCellToFaceStencil::compact(), extendedCentredFaceToCellStencil::compact(), extendedCentredCellToCellStencil::compact(), parFvFieldReconstructor::createPatchFaceMaps(), Foam::gAverage(), globalIndex::globalIndex(), Foam::gSumCmptProd(), Foam::gSumProd(), regionModel::interRegionAMI(), LUscalarMatrix::LUscalarMatrix(), main(), mappedPatchFieldBase< Type >::mappedField(), regIOobject::read(), IOdictionary::readFile(), mapDistributeBase::schedule(), LUscalarMatrix::solve(), sumReduce(), processorFvPatch::tag(), processorCyclicPolyPatch::tag(), processorPolyPatch::tag(), wideBandDiffusiveRadiationMixedFvPatchScalarField::updateCoeffs(), coupledFreestreamFvPatchField< Type >::updateCoeffs(), mappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs(), filmPyrolysisTemperatureCoupledFvPatchScalarField::updateCoeffs(), mappedFlowRateFvPatchVectorField::updateCoeffs(), greyDiffusiveRadiationMixedFvPatchScalarField::updateCoeffs(), coupledFixedValueFvPatchField< Type >::updateCoeffs(), MarshakRadiationFvPatchScalarField::updateCoeffs(), MarshakRadiationFixedTemperatureFvPatchScalarField::updateCoeffs(), alphatFilmWallFunctionFvPatchScalarField::updateCoeffs(), turbulentBoundaryCoupledFvPatchScalarField::updateCoeffs(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), turbulentTemperatureRadFixedGradientFvPatchScalarField::updateCoeffs(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs(), thermalBaffle1DFvPatchScalarField< solidType >::updateCoeffs(), globalMeshData::updateMesh(), and writeProcAddressing().

Here is the caller graph for this function:

◆ commsType() [1/2]

commsTypes commsType ( ) const
inline

Get the communications type of the stream.

Definition at line 459 of file UPstream.H.

References UPstream::commsType_.

◆ commsType() [2/2]

commsTypes commsType ( const commsTypes  ct)
inline

Set the communications type of the stream.

Definition at line 465 of file UPstream.H.

References UPstream::commsType_.

◆ exit()

void exit ( int  errnum = 1)
static

Exit program.

Definition at line 46 of file UPstream.C.

References NotImplemented.

Referenced by error::exit(), IOerror::exit(), ParRunControl::runPar(), and ParRunControl::~ParRunControl().

Here is the caller graph for this function:

◆ abort()

void abort ( )
static

Abort program.

Definition at line 52 of file UPstream.C.

References NotImplemented.

Referenced by error::abort(), and IOerror::abort().

Here is the caller graph for this function:

Field Documentation

◆ commsTypeNames

const Foam::NamedEnum< Foam::UPstream::commsTypes, 3 > commsTypeNames
static

◆ parRun_

bool parRun_
staticprivate

Definition at line 183 of file UPstream.H.

Referenced by UPstream::parRun(), and UPstream::setParRun().

◆ msgType_

int msgType_
staticprivate

Definition at line 184 of file UPstream.H.

Referenced by UPstream::msgType().

◆ freeComms_

Foam::LIFOStack< Foam::label > freeComms_
staticprivate

Definition at line 188 of file UPstream.H.

◆ myProcNo_

Foam::DynamicList< int > myProcNo_
staticprivate

Definition at line 189 of file UPstream.H.

Referenced by UPstream::master(), and UPstream::myProcNo().

◆ procIDs_

Foam::DynamicList< Foam::List< int > > procIDs_
staticprivate

Definition at line 190 of file UPstream.H.

Referenced by UPstream::nProcs(), and UPstream::procID().

◆ parentCommunicator_

Foam::DynamicList< Foam::label > parentCommunicator_
staticprivate

Definition at line 191 of file UPstream.H.

Referenced by UPstream::parent().

◆ linearCommunication_

Foam::DynamicList< Foam::List< Foam::UPstream::commsStruct > > linearCommunication_
staticprivate

Definition at line 193 of file UPstream.H.

Referenced by UPstream::linearCommunication().

◆ treeCommunication_

Foam::DynamicList< Foam::List< Foam::UPstream::commsStruct > > treeCommunication_
staticprivate

Definition at line 194 of file UPstream.H.

Referenced by UPstream::treeCommunication().

◆ commsType_

commsTypes commsType_
protected

Communications type of this stream.

Definition at line 232 of file UPstream.H.

Referenced by UPstream::commsType().

◆ 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 245 of file UPstream.H.

Referenced by processorFvPatchField< Type >::initInterfaceMatrixUpdate(), processorGAMGInterfaceField::initInterfaceMatrixUpdate(), argList::parse(), processorFvPatchField< Type >::updateInterfaceMatrix(), and processorGAMGInterfaceField::updateInterfaceMatrix().

◆ nProcsSimpleSum

int nProcsSimpleSum
static

◆ defaultCommsType

Foam::UPstream::commsTypes defaultCommsType
static

◆ nPollProcInterfaces

int nPollProcInterfaces
static

Number of polling cycles in processor updates.

Definition at line 255 of file UPstream.H.

Referenced by argList::parse().

◆ worldComm

Foam::label worldComm
static

◆ warnComm

Foam::label warnComm
static

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