Inter-processor communications stream. More...
Classes | |
class | commsStruct |
Structure for communicating between processors. More... | |
class | communicator |
Helper class for allocating/freeing communicators. More... | |
struct | 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) |
static label | procNo (const label comm, const int baseProcID) |
static label | procNo (const label myComm, const label currentComm, const int currentProcID) |
static void | addValidParOptions (HashTable< string > &validParOptions) |
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 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 bool | haveThreads () |
Have support for threads. More... | |
static label | nProcs (const label communicator=0) |
Number of processes in parallel run. More... | |
static constexpr int | masterNo () noexcept |
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 constexpr int | firstSlave () noexcept |
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 | 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 labelUList &sendData, labelUList &recvData, const label communicator=0) |
Exchange label with all processors (in the communicator). More... | |
static void | allToAll (const char *sendData, const UList< int > &sendSizes, const UList< int > &sendOffsets, char *recvData, const UList< int > &recvSizes, const UList< int > &recvOffsets, const label communicator=0) |
Exchange data with all processors (in the communicator) More... | |
static void | gather (const char *sendData, int sendSize, char *recvData, const UList< int > &recvSizes, const UList< int > &recvOffsets, const label communicator=0) |
Receive data from all processors on the master. More... | |
static void | scatter (const char *sendData, const UList< int > &sendSizes, const UList< int > &sendOffsets, char *recvData, int recvSize, const label communicator=0) |
Send data to all processors from the root of the communicator. More... | |
Static Public Attributes | |
static const Enum< commsTypes > | commsTypeNames |
Names of the communication types. More... | |
static bool | floatTransfer |
static int | nProcsSimpleSum |
static commsTypes | defaultCommsType |
Default commsType. More... | |
static int | nPollProcInterfaces |
Number of polling cycles in processor updates. More... | |
static int | maxCommsSize |
Optional maximum message size (bytes) More... | |
static const int | mpiBufferSize |
MPI buffer-size (bytes) 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... | |
|
strong |
Types of communications.
Enumerator | |
---|---|
blocking | |
scheduled | |
nonBlocking |
Definition at line 66 of file UPstream.H.
|
inline |
Construct given optional buffer size.
Definition at line 294 of file UPstream.H.
ClassName | ( | "UPstream" | ) |
|
static |
Allocate a new communicator.
Definition at line 100 of file UPstream.C.
References Foam::abort(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, and Foam::Pout.
Referenced by masterCoarsestGAMGProcAgglomeration::agglomerate(), eagerGAMGProcAgglomeration::agglomerate(), procFacesGAMGProcAgglomeration::agglomerate(), manualGAMGProcAgglomeration::agglomerate(), and globalMeshData::updateMesh().
|
static |
Free a previously allocated communicator.
Definition at line 166 of file UPstream.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), and Foam::Pout.
Referenced by globalMeshData::updateMesh(), collatedFileOperation::~collatedFileOperation(), UPstream::communicator::~communicator(), eagerGAMGProcAgglomeration::~eagerGAMGProcAgglomeration(), hostCollatedFileOperation::~hostCollatedFileOperation(), manualGAMGProcAgglomeration::~manualGAMGProcAgglomeration(), masterCoarsestGAMGProcAgglomeration::~masterCoarsestGAMGProcAgglomeration(), masterUncollatedFileOperation::~masterUncollatedFileOperation(), OFstreamCollator::~OFstreamCollator(), and procFacesGAMGProcAgglomeration::~procFacesGAMGProcAgglomeration().
|
static |
|
static |
Return physical processor number (i.e. processor number in worldComm) given communicator and procssor
Definition at line 205 of file UPstream.C.
References UPstream::parent(), and UPstream::procID().
Referenced by UPstream::procNo().
|
static |
Return processor number in communicator (given physical processor number) (= reverse of baseProcNo)
Definition at line 221 of file UPstream.C.
|
static |
Return processor number in communicator (given processor number and communicator)
Definition at line 239 of file UPstream.C.
References UPstream::baseProcNo().
Add the valid option this type of communications library adds/requires on the command line
Definition at line 34 of file UPstream.C.
Initialisation function called from main.
Spawns slave processes and initialises inter-communication
Definition at line 48 of file UPstream.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, and FatalErrorInFunction.
Referenced by ParRunControl::runPar().
|
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.
Definition at line 38 of file UPstream.C.
References Foam::endl(), and WarningInFunction.
|
static |
Get number of outstanding requests.
Definition at line 224 of file UPstream.C.
Referenced by mapDistributeBase::compact(), dynamicOversetFvMesh::correctBoundaryConditions(), dynamicOversetFvMesh::correctCoupledBoundaryConditions(), GeometricField< Type, PatchField, GeoMesh >::Boundary::evaluate(), Foam::evaluateConstraintTypes(), and OFstreamCollator::write().
|
static |
Truncate number of outstanding requests.
Definition at line 230 of file UPstream.C.
|
static |
Wait until all requests (from start onwards) have finished.
Definition at line 234 of file UPstream.C.
Referenced by mapDistributeBase::compact(), dynamicOversetFvMesh::correctBoundaryConditions(), dynamicOversetFvMesh::correctCoupledBoundaryConditions(), GeometricField< Type, PatchField, GeoMesh >::Boundary::evaluate(), Foam::evaluateConstraintTypes(), and OFstreamCollator::write().
|
static |
Wait until request i has finished.
Definition at line 238 of file UPstream.C.
Referenced by PPCG::scalarSolveCG().
|
static |
Non-blocking comms: has request i finished?
Definition at line 242 of file UPstream.C.
References NotImplemented.
|
static |
Definition at line 1137 of file UPstream.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::PstreamGlobals::freedTags_, Foam::PstreamGlobals::nTags_, Foam::Pout, DynamicList< T, SizeMin >::remove(), and s.
|
static |
Definition at line 1166 of file UPstream.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::PstreamGlobals::freedTags_, Foam::PstreamGlobals::nTags_, Foam::Pout, DynamicList< T, SizeMin >::remove(), and s.
|
static |
Definition at line 1195 of file UPstream.C.
References DynamicList< T, SizeMin >::append(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::PstreamGlobals::freedTags_, Foam::Pout, and s.
|
static |
Definition at line 1211 of file UPstream.C.
References DynamicList< T, SizeMin >::append(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::PstreamGlobals::freedTags_, Foam::Pout, and s.
|
inlinestatic |
Is this a parallel run?
Definition at line 415 of file UPstream.H.
Referenced by snappyLayerDriver::addLayers(), unwatchedIOdictionary::addWatch(), regIOobject::addWatch(), UPstream::allToAll(), meshRefinement::balance(), addPatchCellLayer::calcExtrudeInfo(), processorCyclicPolyPatch::calcGeometry(), processorFaPatch::calcGeometry(), processorPolyPatch::calcGeometry(), surfaceNoise::calculate(), cyclicAMIPolyPatch::canResetAMI(), IOobjectList::checkNames(), polyBoundaryMesh::checkParallelSync(), AMIInterpolation::checkSymmetricWeights(), fieldValue::combineFields(), mapDistributeBase::compact(), dynamicOversetFvMesh::correctBoundaryConditions(), dynamicOversetFvMesh::correctCoupledBoundaryConditions(), processorFvPatch::coupled(), processorPointPatchField< Type >::coupled(), processorCyclicPointPatchField< Type >::coupled(), processorFvsPatchField< Type >::coupled(), processorCyclicFvsPatchField< Type >::coupled(), processorFaePatchField< Type >::coupled(), processorFaPatchField< Type >::coupled(), cyclicACMIFvPatch::coupled(), cyclicAMIFvPatch::coupled(), processorFvPatchField< Type >::coupled(), processorFaPatch::coupled(), processorPolyPatch::coupled(), simpleGeomDecomp::decompose(), decompositionMethod::decompose(), conformalVoronoiMesh::decomposition(), processorFvPatch::delta(), processorFaPatch::delta(), refinementHistory::distribute(), fvMeshDistribute::distribute(), distributedTriSurfaceMesh::distribute(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), snappyLayerDriver::doLayers(), snappyRefineDriver::doRefine(), GeometricField< Type, PatchField, GeoMesh >::Boundary::evaluate(), Foam::evaluateConstraintTypes(), Pstream::exchange(), Foam::expandLeadingTilde(), faMesh::faMesh(), polyMesh::findCell(), distributedTriSurfaceMesh::findLine(), distributedTriSurfaceMesh::findLineAll(), distributedTriSurfaceMesh::findLineAny(), distributedTriSurfaceMesh::findNearest(), masterUncollatedFileOperation::findTimes(), Pstream::gather(), Pstream::gatherList(), zoneDistribute::getDatafromOtherProc(), distributedTriSurfaceMesh::getField(), distributedTriSurfaceMesh::getNormal(), distributedTriSurfaceMesh::getRegion(), distributedTriSurfaceMesh::getVolumeType(), InflationInjection< CloudType >::InflationInjection(), processorFaPatch::initGeometry(), processorPolyPatch::initGeometry(), InjectedParticleInjection< CloudType >::initialise(), InjectedParticleDistributionInjection< CloudType >::initialise(), extractEulerianParticles::initialiseBins(), processorPolyPatch::initOrder(), processorFaPatch::initUpdateMesh(), processorPolyPatch::initUpdateMesh(), collatedFileOperation::isMasterRank(), fileOperation::lookupAndCacheProcessorsPath(), LUscalarMatrix::LUscalarMatrix(), processorFaPatch::makeDeltaCoeffs(), processorFaPatch::makeNonGlobalPatchPoints(), processorFvPatch::makeWeights(), processorFaPatch::makeWeights(), surfaceWriter::merge(), surfaceWriter::mergeFieldTemplate(), cyclicAMIFvPatch::movePoints(), polyBoundaryMesh::neighbourEdges(), masterUncollatedFileOperation::NewIFstream(), fileWriter::open(), processorPolyPatch::order(), InflationInjection< CloudType >::parcelsToInject(), pointHistory::pointHistory(), collatedFileOperation::processorsDir(), masterUncollatedFileOperation::read(), lumpedPointState::readData(), Time::readModifiedObjects(), masterUncollatedFileOperation::readObjects(), masterUncollatedFileOperation::readStream(), surfaceNoise::readSurfaceData(), AMIWeights::reportPatch(), PPCG::scalarSolveCG(), Pstream::scatter(), Pstream::scatterList(), fvMeshSubset::setCellSubset(), Time::setControls(), surfaceWriter::setSurface(), zoneDistribute::setUpCommforZone(), shortestPathSet::shortestPathSet(), surfaceWriter::surface(), surfaceNoise::surfaceAverage(), syncTools::syncEdgeMap(), syncTools::syncPointMap(), triSurfaceMesh::triSurfaceMesh(), turbulentDFSEMInletFvPatchVectorField::updateCoeffs(), processorFaPatch::updateMesh(), processorPolyPatch::updateMesh(), faMesh::updateMesh(), fileOperation::updateStates(), mergedSurf::use(), Foam::warnCompatDegrees(), energySpectrum::write(), areaWrite::write(), ensightCells::write(), vtkWrite::write(), meshToMeshMethod::writeConnectivity(), AMIWeights::writeFileHeader(), fieldMinMax::writeFileHeader(), decomposedBlockData::writeHeader(), isoAdvection::writeIsoFaces(), patchMeshWriter::writeNeighIDs(), collatedFileOperation::writeObject(), patchMeshWriter::writeProcIDs(), surfaceNoise::writeSurfaceData(), and streamLineBase::writeToFile().
|
inlinestatic |
Have support for threads.
Definition at line 421 of file UPstream.H.
Referenced by OFstreamCollator::write().
|
inlinestatic |
Number of processes in parallel run.
Definition at line 427 of file UPstream.H.
Referenced by surfaceZonesInfo::addCellZonesToMesh(), surfaceZonesInfo::addFaceZonesToMesh(), masterCoarsestGAMGProcAgglomeration::agglomerate(), eagerGAMGProcAgglomeration::agglomerate(), procFacesGAMGProcAgglomeration::agglomerate(), manualGAMGProcAgglomeration::agglomerate(), sensitivitySurfacePoints::assembleSensitivities(), meshRefinement::balanceAndRefine(), mapDistributeBase::calcCompactAddressing(), decomposedBlockData::calcNumProcs(), surfaceNoise::calculate(), meshRefinement::checkCoupledFaceZones(), polyBoundaryMesh::checkParallelSync(), collatedFileOperation::collatedFileOperation(), fieldValue::combineFields(), sizeDistribution::combineFields(), Foam::combineReduce(), UPstream::commsStruct::commsStruct(), mapDistributeBase::compact(), GAMGAgglomeration::continueAgglomerating(), fvMeshDistribute::countCells(), simpleGeomDecomp::decompose(), meshRefinement::directionalRefineCandidates(), refinementHistory::distribute(), fvMeshDistribute::distribute(), distributedTriSurfaceMesh::distribute(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), Pstream::exchange(), mapDistributeBase::exchangeAddressing(), Pstream::exchangeSizes(), extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil(), distributedTriSurfaceMesh::findNearest(), meshRefinement::findRegions(), Pstream::gather(), decomposedBlockData::gather(), externalCoupled::gatherAndCombine(), Pstream::gatherList(), decomposedBlockData::gatherSlaveData(), zoneDistribute::getDatafromOtherProc(), distributedTriSurfaceMesh::getVolumeType(), hostCollatedFileOperation::hostCollatedFileOperation(), processorPolyPatch::initGeometry(), InjectedParticleInjection< CloudType >::initialise(), viewFactor::initialise(), InjectedParticleDistributionInjection< CloudType >::initialise(), processorPolyPatch::initUpdateMesh(), UPstream::lastSlave(), distributedTriSurfaceMesh::localQueries(), LUscalarMatrix::LUscalarMatrix(), mapDistributeBase::mapDistributeBase(), masterUncollatedFileOperation::NewIFstream(), InflationInjection< CloudType >::parcelsToInject(), argList::parse(), pointHistory::pointHistory(), mapDistributeBase::printLayout(), collatedFileOperation::processorsDir(), masterUncollatedFileOperation::read(), decomposedBlockData::readBlocks(), lumpedPointState::readData(), masterUncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readStream(), surfaceNoise::readSurfaceData(), mapDistributeBase::receive(), Foam::reduce(), regionSplit::reduceRegions(), meshRefinement::refineAndBalance(), meshRefinement::refineCandidates(), meshRefinement::removeGapCells(), parProfiling::report(), globalIndex::reset(), Foam::returnReduce(), Pstream::scatter(), Pstream::scatterList(), mapDistributeBase::send(), fvMeshSubset::setCellSubset(), Time::setControls(), zoneDistribute::setUpCommforZone(), ParSortableList< Type >::sort(), surfaceNoise::surfaceAverage(), trackingInverseDistance::update(), inverseDistance::update(), dynamicOversetFvMesh::updateAddressing(), turbulentDFSEMInletFvPatchVectorField::updateCoeffs(), globalMeshData::updateMesh(), energySpectrum::write(), decomposedBlockData::writeBlocks(), externalCoupled::writeGeometry(), decomposedBlockData::writeHeader(), isoAdvection::writeIsoFaces(), internalMeshWriter::writeProcIDs(), patchMeshWriter::writeProcIDs(), surfaceNoise::writeSurfaceData(), and streamLineBase::writeToFile().
|
inlinestaticconstexprnoexcept |
Process index of the master.
Definition at line 433 of file UPstream.H.
Referenced by simpleGeomDecomp::decompose(), LUscalarMatrix::LUscalarMatrix(), UPstream::master(), masterUncollatedFileOperation::NewIFstream(), fvMeshTools::newMesh(), argList::parse(), decomposedBlockData::readBlocks(), globalMeshData::sharedPoints(), syncTools::syncEdgeMap(), syncTools::syncPointMap(), decomposedBlockData::writeBlocks(), patchMeshWriter::writeNeighIDs(), patchMeshWriter::writePatchIDs(), and patchMeshWriter::writePoints().
|
inlinestatic |
Am I the master process.
Definition at line 439 of file UPstream.H.
References UPstream::masterNo().
Referenced by regIOobject::addWatch(), masterUncollatedFileOperation::addWatch(), mappedPatchBase::calcMapping(), decomposedBlockData::calcNumProcs(), pointNoise::calculate(), viewFactor::calculate(), surfaceNoise::calculate(), argList::check(), polyBoundaryMesh::checkParallelSync(), argList::checkRootCase(), collatedFileOperation::collatedFileOperation(), extractEulerianParticles::collectParticle(), sizeDistribution::combineFields(), commSchedule::commSchedule(), writeFile::createFile(), logFiles::createFiles(), simpleGeomDecomp::decompose(), masterUncollatedFileOperation::dirPath(), systemCall::dispatch(), snappyVoxelMeshDriver::doRefine(), abort::end(), abort::execute(), wallHeatFlux::execute(), Curle::execute(), momentum::execute(), forces::execute(), Foam::expandLeadingTilde(), externalFileCoupler::externalFileCoupler(), masterUncollatedFileOperation::filePath(), logFiles::files(), probes::findElements(), masterUncollatedFileOperation::findInstance(), meshRefinement::findRegions(), masterUncollatedFileOperation::findTimes(), masterUncollatedFileOperation::findWatch(), decomposedBlockData::gather(), sampledSet::gather(), externalCoupled::gatherAndCombine(), decomposedBlockData::gatherSlaveData(), masterUncollatedFileOperation::getFile(), masterUncollatedFileOperation::getState(), Random::globalGaussNormal(), Random::globalPosition(), Random::globalRandomise01(), Random::globalSample01(), hostCollatedFileOperation::hostCollatedFileOperation(), viewFactor::initialise(), surfaceNoise::initialise(), collatedFileOperation::isMasterRank(), JobInfo::JobInfo(), LUscalarMatrix::LUscalarMatrix(), NURBS3DVolume::makeFolders(), messageStream::masterStream(), surfaceWriter::mergeFieldTemplate(), ensightCase::newCloud(), ensightCase::newGeometry(), masterUncollatedFileOperation::NewIFstream(), fvMeshTools::newMesh(), fileOperation::nProcs(), fileWriter::open(), InflationInjection< CloudType >::parcelsToInject(), argList::parse(), pointHistory::pointHistory(), porosityModel::porosityModel(), probes::prepare(), decomposedBlockData::read(), writeFile::read(), sampledSets::read(), externalCoupled::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(), parProfiling::report(), logFiles::resetNames(), faMatrix< Type >::setReference(), ensightCase::setTime(), masterUncollatedFileOperation::setUnmodified(), globalMeshData::sharedPoints(), shortestPathSet::shortestPathSet(), externalFileCoupler::shutdown(), JobInfo::signalEnd(), snappyVoxelMeshDriver::snappyVoxelMeshDriver(), rigidBodyMeshMotionSolver::solve(), rigidBodyMeshMotion::solve(), rigidBodyMotion::solve(), ParSortableList< Type >::sort(), SQP::SQP(), surfaceNoise::surfaceAverage(), hexRef8Data::sync(), syncTools::syncEdgeMap(), syncTools::syncPointMap(), triSurfaceMesh::triSurfaceMesh(), sixDoFRigidBodyMotion::update(), lumpedPointDisplacementPointPatchVectorField::updateCoeffs(), activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs(), turbulentDigitalFilterInletFvPatchVectorField::updateCoeffs(), updateMethod::updateMethod(), fileMonitor::updateStates(), masterUncollatedFileOperation::updateStates(), solution::upgradeSolverDict(), externalFileCoupler::useMaster(), externalFileCoupler::useSlave(), OFstreamCollator::waitAll(), externalFileCoupler::waitForMaster(), externalFileCoupler::waitForSlave(), Foam::warnCompatDegrees(), objectiveForceTarget::write(), JobInfo::write(), objectivePartialVolume::write(), objectivePtLosses::write(), sensitivityBezier::write(), sensitivityVolBSplines::write(), sensitivityVolBSplinesFI::write(), proxyWriter::write(), sensitivityBezierFI::write(), timeInfo::write(), starcdWriter::write(), x3dWriter::write(), SQP::write(), energySpectrum::write(), foamWriter::write(), yPlus::write(), rawWriter::write(), OFstreamCollator::write(), vtkWriter::write(), boundaryDataWriter::write(), wallShearStress::write(), histogram::write(), nastranWriter::write(), sampledSets::write(), sizeDistribution::write(), vtkCloud::write(), NURBS3DCurve::write(), vtkWrite::write(), volFieldValue::write(), regionSizeDistribution::write(), NURBS3DSurface::write(), turbulentDigitalFilterInletFvPatchVectorField::write(), surfaceFieldValue::write(), decomposedBlockData::writeBlocks(), ensightWriter::writeCollated(), updateMethod::writeCorrection(), NURBS3DVolume::writeCps(), NURBS3DVolume::writeCpsInDict(), decomposedBlockData::writeData(), lumpedPointMovement::writeData(), lumpedPointMovement::writeForcesAndMomentsVTP(), externalCoupled::writeGeometry(), isoAdvection::writeIsoFaces(), patchMeshWriter::writeNeighIDs(), decomposedBlockData::writeObject(), collatedFileOperation::writeObject(), patchMeshWriter::writePatchIDs(), patchMeshWriter::writePoints(), internalMeshWriter::writeProcIDs(), patchMeshWriter::writeProcIDs(), surfaceNoise::writeSurfaceData(), foamWriter::writeTemplate(), starcdWriter::writeTemplate(), boundaryDataWriter::writeTemplate(), x3dWriter::writeTemplate(), vtkWriter::writeTemplate(), streamLineBase::writeToFile(), ensightWriter::writeUncollated(), NURBS3DSurface::writeVTK(), AMIWeights::writeWeightField(), NURBS3DCurve::writeWParses(), and NURBS3DSurface::writeWParses().
|
inlinestatic |
Number of this process (starting from masterNo() = 0)
Definition at line 445 of file UPstream.H.
Referenced by surfaceZonesInfo::addCellZonesToMesh(), surfaceZonesInfo::addFaceZonesToMesh(), masterCoarsestGAMGProcAgglomeration::agglomerate(), eagerGAMGProcAgglomeration::agglomerate(), manualGAMGProcAgglomeration::agglomerate(), sensitivitySurfacePoints::assembleSensitivities(), mapDistributeBase::calcCompactAddressing(), addPatchCellLayer::calcExtrudeInfo(), viewFactor::calculate(), GAMGAgglomeration::calculateRegionMaster(), meshRefinement::checkCoupledFaceZones(), polyBoundaryMesh::checkParallelSync(), collatedFileOperation::collatedFileOperation(), fieldValue::combineFields(), sizeDistribution::combineFields(), mapDistributeBase::compact(), noDecomp::decompose(), fvMeshDistribute::distribute(), distributedTriSurfaceMesh::distribute(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), Pstream::exchange(), mapDistributeBase::exchangeAddressing(), processorField::execute(), InjectionModel< CloudType >::findCellAtPosition(), patchProbes::findElements(), probes::findElements(), distributedTriSurfaceMesh::findNearest(), meshRefinement::findRegions(), Pstream::gather(), lduPrimitiveMesh::gather(), externalCoupled::gatherAndCombine(), Pstream::gatherList(), decomposedBlockData::gatherSlaveData(), zoneDistribute::getDatafromOtherProc(), hostCollatedFileOperation::hostCollatedFileOperation(), InjectedParticleInjection< CloudType >::initialise(), viewFactor::initialise(), InjectedParticleDistributionInjection< CloudType >::initialise(), globalIndex::inplaceToGlobal(), globalIndex::isLocal(), lduPrimitiveMesh::lduPrimitiveMesh(), distributedTriSurfaceMesh::localQueries(), globalIndex::localSize(), globalIndex::localStart(), mapDistribute::mapDistribute(), mapDistributeBase::mapDistributeBase(), masterUncollatedFileOperation::NewIFstream(), regionSplit::nLocalRegions(), InflationInjection< CloudType >::parcelsToInject(), argList::parse(), pointHistory::pointHistory(), mapDistributeBase::printLayout(), backgroundMeshDecomposition::procBounds(), globalIndex::range(), masterUncollatedFileOperation::read(), lumpedPointState::readData(), masterUncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readStream(), surfaceNoise::readSurfaceData(), regionSplit::reduceRegions(), indexedVertex< Gt, Vb >::referred(), parProfiling::report(), globalIndex::reset(), Pstream::scatter(), Pstream::scatterList(), fvMeshSubset::setCellSubset(), Time::setControls(), patchInjectionBase::setPositionAndCell(), zoneDistribute::setUpCommforZone(), ParSortableList< Type >::sort(), ThermoSurfaceFilm< CloudType >::splashInteraction(), globalIndex::toGlobal(), globalIndex::toLocal(), trackingInverseDistance::update(), inverseDistance::update(), dynamicOversetFvMesh::updateAddressing(), patchInjectionBase::updateMesh(), meshToMeshMethod::writeConnectivity(), AMIInterpolation::writeFaceConnectivity(), externalCoupled::writeGeometry(), isoAdvection::writeIsoFaces(), and patchMeshWriter::writeProcIDs().
|
inlinestatic |
Definition at line 450 of file UPstream.H.
Referenced by UPstream::baseProcNo().
|
inlinestatic |
Process ID of given process index.
Definition at line 456 of file UPstream.H.
Referenced by UPstream::baseProcNo(), and collatedFileOperation::processorsDir().
|
inlinestaticconstexprnoexcept |
Process index of first slave.
Definition at line 462 of file UPstream.H.
Referenced by LUscalarMatrix::LUscalarMatrix(), fvMeshTools::newMesh(), argList::parse(), globalMeshData::sharedPoints(), syncTools::syncEdgeMap(), syncTools::syncPointMap(), patchMeshWriter::writeNeighIDs(), patchMeshWriter::writePatchIDs(), and patchMeshWriter::writePoints().
|
inlinestatic |
Process index of last slave.
Definition at line 468 of file UPstream.H.
References UPstream::nProcs().
Referenced by LUscalarMatrix::LUscalarMatrix(), fvMeshTools::newMesh(), argList::parse(), globalMeshData::sharedPoints(), syncTools::syncEdgeMap(), syncTools::syncPointMap(), patchMeshWriter::writeNeighIDs(), patchMeshWriter::writePatchIDs(), and patchMeshWriter::writePoints().
|
inlinestatic |
Communication schedule for linear all-to-master (proc 0)
Definition at line 475 of file UPstream.H.
Referenced by Foam::combineReduce(), Pstream::gather(), Pstream::gatherList(), masterUncollatedFileOperation::read(), lumpedPointState::readData(), Foam::reduce(), Foam::returnReduce(), Pstream::scatter(), and Pstream::scatterList().
|
inlinestatic |
Communication schedule for tree all-to-master (proc 0)
Definition at line 484 of file UPstream.H.
Referenced by Foam::combineReduce(), Pstream::gather(), Pstream::gatherList(), masterUncollatedFileOperation::read(), lumpedPointState::readData(), Foam::reduce(), Foam::returnReduce(), Pstream::scatter(), and Pstream::scatterList().
|
inlinestatic |
Message tag of standard messages.
Definition at line 492 of file UPstream.H.
Referenced by solidAbsorption::a(), decompositionMethod::calcCellCells(), masterUncollatedFileOperation::chMod(), extendedCentredCellToFaceStencil::compact(), extendedCentredFaceToCellStencil::compact(), extendedCentredCellToCellStencil::compact(), masterUncollatedFileOperation::cp(), masterUncollatedFileOperation::dirPath(), solidAbsorption::e(), masterUncollatedFileOperation::exists(), masterUncollatedFileOperation::filePath(), masterUncollatedFileOperation::fileSize(), masterUncollatedFileOperation::findInstance(), lduPrimitiveMesh::gather(), Foam::gAverage(), Foam::gSumCmptProd(), Foam::gSumProd(), masterUncollatedFileOperation::highResLastModified(), dynamicOversetFvMesh::interpolate(), regionModel::interRegionAMI(), masterUncollatedFileOperation::isDir(), masterUncollatedFileOperation::isFile(), masterUncollatedFileOperation::lastModified(), lduPrimitiveMesh::lduPrimitiveMesh(), masterUncollatedFileOperation::ln(), LUscalarMatrix::LUscalarMatrix(), masterUncollatedFileOperation::mkDir(), masterUncollatedFileOperation::mode(), masterUncollatedFileOperation::mv(), masterUncollatedFileOperation::mvBak(), masterUncollatedFileOperation::NewIFstream(), fileOperation::nProcs(), masterUncollatedFileOperation::read(), decomposedBlockData::readBlocks(), lumpedPointState::readData(), masterUncollatedFileOperation::readDir(), masterUncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readStream(), fvMatrix< Type >::relax(), globalIndex::reset(), masterUncollatedFileOperation::rm(), masterUncollatedFileOperation::rmDir(), mapDistributeBase::schedule(), processorFvPatch::tag(), processorFaPatch::tag(), processorCyclicPolyPatch::tag(), processorPolyPatch::tag(), masterUncollatedFileOperation::type(), dynamicOversetFvMesh::updateAddressing(), wideBandDiffusiveRadiationMixedFvPatchScalarField::updateCoeffs(), mappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), filmPyrolysisTemperatureCoupledFvPatchScalarField::updateCoeffs(), filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs(), greyDiffusiveRadiationMixedFvPatchScalarField::updateCoeffs(), mappedFlowRateFvPatchVectorField::updateCoeffs(), MarshakRadiationFvPatchScalarField::updateCoeffs(), MarshakRadiationFixedTemperatureFvPatchScalarField::updateCoeffs(), alphatFilmWallFunctionFvPatchScalarField::updateCoeffs(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs(), thermalBaffle1DFvPatchScalarField< solidType >::updateCoeffs(), globalMeshData::updateMesh(), OFstreamCollator::write(), decomposedBlockData::writeBlocks(), and decomposedBlockData::writeData().
|
inline |
Get the communications type of the stream.
Definition at line 499 of file UPstream.H.
References UPstream::commsType_.
|
inline |
Set the communications type of the stream.
Definition at line 505 of file UPstream.H.
References UPstream::commsType_.
|
static |
Shutdown (finalize) MPI as required.
Uses MPI_Abort instead of MPI_Finalize if errNo is non-zero
Definition at line 59 of file UPstream.C.
Referenced by ParRunControl::~ParRunControl().
|
static |
Call MPI_Abort with no other checks or cleanup.
Definition at line 70 of file UPstream.C.
References Foam::abort().
|
static |
Shutdown (finalize) MPI as required and exit program with errNo.
Definition at line 63 of file UPstream.C.
References Foam::exit().
Referenced by snappyLayerDriver::addLayers(), argList::argList(), argList::parse(), and ParRunControl::runPar().
|
static |
Exchange label with all processors (in the communicator).
sendData[proci] is the label to send to proci. After return recvData contains the data from the other processors.
Definition at line 172 of file UPstream.C.
References UList< T >::deepCopy().
Referenced by fvMeshDistribute::distribute().
|
static |
Exchange data with all processors (in the communicator)
sendSizes, sendOffsets give (per processor) the slice of sendData to send, similarly recvSizes, recvOffsets give the slice of recvData to receive
Definition at line 674 of file UPstream.C.
References Foam::abort(), profilingPstream::addAllToAllTime(), UList< T >::begin(), profilingPstream::beginTiming(), Foam::FatalError, FatalErrorInFunction, Foam::PstreamGlobals::MPICommunicators_, UPstream::parRun(), and UList< T >::size().
|
static |
Receive data from all processors on the master.
Definition at line 183 of file UPstream.C.
Referenced by decomposedBlockData::gather(), and decomposedBlockData::gatherSlaveData().
|
static |
Send data to all processors from the root of the communicator.
Definition at line 198 of file UPstream.C.
Referenced by decomposedBlockData::calcNumProcs().
|
static |
Names of the communication types.
Definition at line 74 of file UPstream.H.
Referenced by GeometricField< Type, PatchField, GeoMesh >::Boundary::evaluate(), PstreamBuffers::finishedSends(), argList::parse(), decomposedBlockData::readBlocks(), addcommsTypeToOpt::readData(), decomposedBlockData::writeBlocks(), and addcommsTypeToOpt::writeData().
|
protected |
Communications type of this stream.
Definition at line 253 of file UPstream.H.
Referenced by UPstream::commsType().
|
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 266 of file UPstream.H.
Referenced by argList::parse().
|
static |
Number of processors at which the sum algorithm changes from linear to tree
Definition at line 270 of file UPstream.H.
Referenced by Foam::combineReduce(), Pstream::gather(), Pstream::gatherList(), UList< Foam::wordRe >::operator[](), argList::parse(), masterUncollatedFileOperation::read(), lumpedPointState::readData(), Foam::reduce(), Foam::returnReduce(), Pstream::scatter(), and Pstream::scatterList().
|
static |
Default commsType.
Definition at line 273 of file UPstream.H.
Referenced by dynamicOversetFvMesh::correctBoundaryConditions(), dynamicOversetFvMesh::correctCoupledBoundaryConditions(), mapDistributeBase::distribute(), mappedPatchBase::distribute(), distributedTriSurfaceMesh::distribute(), GeometricField< Type, PatchField, GeoMesh >::Boundary::evaluate(), Foam::evaluateConstraintTypes(), pointBoundaryMesh::movePoints(), polyBoundaryMesh::movePoints(), argList::parse(), addcommsTypeToOpt::readData(), mappedPatchBase::reverseDistribute(), mapDistributeBase::reverseDistribute(), pointBoundaryMesh::updateMesh(), polyBoundaryMesh::updateMesh(), and addcommsTypeToOpt::writeData().
|
static |
Number of polling cycles in processor updates.
Definition at line 276 of file UPstream.H.
Referenced by argList::parse().
|
static |
Optional maximum message size (bytes)
Definition at line 279 of file UPstream.H.
Referenced by Pstream::exchange().
|
static |
MPI buffer-size (bytes)
Definition at line 282 of file UPstream.H.
Referenced by attachOurBuffers().
|
static |
Default communicator (all processors)
Definition at line 285 of file UPstream.H.
Referenced by decompositionMethod::calcCellCells(), processorFaPatchField< Type >::comm(), mapDistributeBase::exchangeAddressing(), masterUncollatedFileOperation::findInstance(), messageStream::masterStream(), masterUncollatedFileOperation::NewIFstream(), masterUncollatedFileOperation::read(), lumpedPointState::readData(), masterUncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readStream(), globalMeshData::updateMesh(), collatedFileOperation::~collatedFileOperation(), hostCollatedFileOperation::~hostCollatedFileOperation(), and masterUncollatedFileOperation::~masterUncollatedFileOperation().
|
static |
Debugging: warn for use of any communicator differing from warnComm.
Definition at line 288 of file UPstream.H.
Referenced by messageStream::masterStream(), and Foam::reduce().