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 class | commsTypes : char { blocking , scheduled , nonBlocking } |
Types of communications. More... | |
typedef IntRange< int > | rangeType |
Int ranges are used for MPI ranks (processes) More... | |
Public Member Functions | |
ClassName ("UPstream") | |
UPstream (const commsTypes commsType) | |
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< T > | listGatherValues (const T &localValue, const label comm) |
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 std::string &) |
static void | freeTag (const char *, const int tag) |
static void | freeTag (const std::string &, const int tag) |
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 label | nProcs (const label communicator=worldComm) |
Number of processes in parallel run, and 1 for serial run. More... | |
static constexpr int | masterNo () noexcept |
Process index of the master (always 0) More... | |
static bool | master (const label communicator=worldComm) |
Am I the master process. More... | |
static int | myProcNo (const label communicator=worldComm) |
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 const wordList & | allWorlds () noexcept |
All worlds. More... | |
static const labelList & | worldIDs () noexcept |
worldID (index in allWorlds) of all processes More... | |
static label | myWorldID () |
My worldID. More... | |
static const word & | myWorld () |
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) |
static int & | msgType () noexcept |
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 UList< int32_t > &sendData, UList< int32_t > &recvData, const label communicator=worldComm) |
Exchange integer data with all processors (in the communicator). More... | |
static void | allToAll (const UList< int64_t > &sendData, UList< int64_t > &recvData, const label communicator=worldComm) |
Exchange integer data with all processors (in the communicator). More... | |
static void | mpiGather (const char *sendData, int sendCount, char *recvData, int recvCount, const label communicator=worldComm) |
Receive identically-sized char data from all ranks. More... | |
static void | mpiScatter (const char *sendData, int sendCount, char *recvData, int recvCount, const label communicator=worldComm) |
Send identically-sized char data to all ranks. 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 | 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 | 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 | 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 | 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 | 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 | 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< T > | listGatherValues (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=worldComm, const int rootProcNo=masterNo()) |
static constexpr int | firstSlave () noexcept |
Process index of first sub-process. More... | |
static int | lastSlave (const label communicator=worldComm) |
Process index of last sub-process. More... | |
Static Public Attributes | |
static const Enum< commsTypes > | commsTypeNames |
Names of the communication types. More... | |
static bool | floatTransfer |
static int | nProcsSimpleSum |
Number of processors to change from linear to tree communication. More... | |
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... | |
Int ranges are used for MPI ranks (processes)
Definition at line 63 of file UPstream.H.
|
strong |
Types of communications.
Enumerator | |
---|---|
blocking | "blocking" |
scheduled | "scheduled" |
nonBlocking | "nonBlocking" |
Definition at line 66 of file UPstream.H.
|
inlineexplicit |
Construct for given communication type.
Definition at line 302 of file UPstream.H.
ClassName | ( | "UPstream" | ) |
|
static |
Allocate a new communicator.
Definition at line 107 of file UPstream.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Pout, and UList< T >::size().
Referenced by eagerGAMGProcAgglomeration::agglomerate(), manualGAMGProcAgglomeration::agglomerate(), masterCoarsestGAMGProcAgglomeration::agglomerate(), procFacesGAMGProcAgglomeration::agglomerate(), and globalMeshData::updateMesh().
|
static |
Free a previously allocated communicator.
Definition at line 173 of file UPstream.C.
References 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 213 of file UPstream.C.
References splitCell::parent().
Referenced by UPstream::procNo().
|
static |
Return processor number in communicator (given physical processor number) (= reverse of baseProcNo)
Definition at line 229 of file UPstream.C.
References UList< T >::find(), and UPstream::procNo().
Referenced by UPstream::procNo().
|
static |
Return processor number in communicator (given processor number and communicator)
Definition at line 246 of file UPstream.C.
References UPstream::baseProcNo(), and UPstream::procNo().
Add the valid option this type of communications library adds/requires on the command line
Definition at line 33 of file UPstream.C.
Initialisation function called from main.
Spawns sub-processes and initialises inter-communication
Definition at line 47 of file UPstream.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, and FatalErrorInFunction.
|
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 37 of file UPstream.C.
References Foam::endl(), and WarningInFunction.
|
static |
Get number of outstanding requests.
Definition at line 90 of file UPstream.C.
Referenced by GAMGAgglomeration::agglomerateLduAddressing(), lduMatrix::Amul(), dynamicOversetFvMesh::correctBoundaryConditions(), dynamicOversetFvMesh::correctCoupledBoundaryConditions(), metisLikeDecomp::decomposeGeneral(), faMeshDistributor::distribute(), mapDistributeBase::distribute(), GeometricBoundaryField< Type, PatchField, GeoMesh >::evaluate(), calculatedProcessorFvPatchField< Type >::evaluate(), processorFvPatchField< Type >::evaluate(), Foam::evaluateConstraintTypes(), GeometricBoundaryField< Type, PatchField, GeoMesh >::evaluateCoupled(), mapDistributeBase::exchangeMasks(), Pstream::exchangeSizes(), globalIndex::gather(), globalIndex::gatherValues(), GAMGProcAgglomeration::globalCellCells(), calculatedProcessorFvPatchField< Type >::initEvaluate(), processorFvPatchField< Type >::initEvaluate(), calculatedProcessorFvPatchField< Type >::initInterfaceMatrixUpdate(), processorFvPatchField< Type >::initInterfaceMatrixUpdate(), lduCalculatedProcessorField< Type >::initInterfaceMatrixUpdate(), processorGAMGInterfaceField::initInterfaceMatrixUpdate(), calculatedProcessorGAMGInterfaceField::initInterfaceMatrixUpdate(), calculatedProcessorFvPatchField< Type >::ready(), processorFvPatchField< Type >::ready(), lduCalculatedProcessorField< Type >::ready(), lduMatrix::residual(), globalIndex::scatter(), nonBlockingGaussSeidelSmoother::smooth(), GaussSeidelSmoother::smooth(), symGaussSeidelSmoother::smooth(), syncTools::syncBoundaryFaceList(), syncTools::syncFaceList(), lduMatrix::Tmul(), calculatedProcessorFvPatchField< Type >::updateInterfaceMatrix(), processorFvPatchField< Type >::updateInterfaceMatrix(), lduCalculatedProcessorField< Type >::updateInterfaceMatrix(), processorGAMGInterfaceField::updateInterfaceMatrix(), calculatedProcessorGAMGInterfaceField::updateInterfaceMatrix(), and OFstreamCollator::write().
|
static |
Truncate number of outstanding requests.
Definition at line 96 of file UPstream.C.
Referenced by lduMatrix::updateMatrixInterfaces().
|
static |
Wait until all requests (from start onwards) have finished.
Definition at line 100 of file UPstream.C.
Referenced by GAMGAgglomeration::agglomerateLduAddressing(), dynamicOversetFvMesh::correctBoundaryConditions(), dynamicOversetFvMesh::correctCoupledBoundaryConditions(), metisLikeDecomp::decomposeGeneral(), faMeshDistributor::distribute(), mapDistributeBase::distribute(), GeometricBoundaryField< Type, PatchField, GeoMesh >::evaluate(), Foam::evaluateConstraintTypes(), GeometricBoundaryField< Type, PatchField, GeoMesh >::evaluateCoupled(), mapDistributeBase::exchangeMasks(), Pstream::exchangeSizes(), globalIndex::gather(), globalIndex::gatherValues(), GAMGProcAgglomeration::globalCellCells(), lduPrimitiveMesh::globalCellCells(), InteractionLists< ParticleType >::receiveReferredData(), globalIndex::scatter(), syncTools::syncBoundaryFaceList(), syncTools::syncFaceList(), lduMatrix::updateMatrixInterfaces(), and OFstreamCollator::write().
|
static |
Wait until request i has finished.
Definition at line 104 of file UPstream.C.
Referenced by calculatedProcessorFvPatchField< Type >::evaluate(), processorFvPatchField< Type >::evaluate(), PPCG::scalarSolveCG(), calculatedProcessorFvPatchField< Type >::updateInterfaceMatrix(), processorFvPatchField< Type >::updateInterfaceMatrix(), lduCalculatedProcessorField< Type >::updateInterfaceMatrix(), processorGAMGInterfaceField::updateInterfaceMatrix(), and calculatedProcessorGAMGInterfaceField::updateInterfaceMatrix().
|
static |
Non-blocking comms: has request i finished?
Definition at line 108 of file UPstream.C.
References NotImplemented.
Referenced by calculatedProcessorFvPatchField< Type >::ready(), processorFvPatchField< Type >::ready(), and lduCalculatedProcessorField< Type >::ready().
|
static |
Definition at line 754 of file UPstream.C.
References Foam::endl(), Foam::PstreamGlobals::freedTags_, Foam::PstreamGlobals::nTags_, Foam::Pout, DynamicList< T, SizeMin >::remove(), and s().
|
static |
Definition at line 776 of file UPstream.C.
References Foam::endl(), Foam::PstreamGlobals::freedTags_, Foam::PstreamGlobals::nTags_, Foam::Pout, DynamicList< T, SizeMin >::remove(), and s().
|
static |
Definition at line 798 of file UPstream.C.
References DynamicList< T, SizeMin >::append(), Foam::endl(), Foam::PstreamGlobals::freedTags_, Foam::Pout, and s().
|
static |
Definition at line 809 of file UPstream.C.
References DynamicList< T, SizeMin >::append(), Foam::endl(), Foam::PstreamGlobals::freedTags_, Foam::Pout, and s().
|
inlinestaticnoexcept |
Test if this a parallel run.
Modify access is deprecated
Definition at line 433 of file UPstream.H.
Referenced by snappyLayerDriver::addLayers(), snappyLayerDriver::addLayersSinglePass(), unwatchedIOdictionary::addWatch(), regIOobject::addWatch(), GAMGAgglomeration::agglomerateLduAddressing(), Pstream::allGatherList(), Cloud< ParcelType >::autoMap(), meshRefinement::balance(), Pstream::broadcast(), Pstream::broadcasts(), AMIInterpolation::calcDistribution(), addPatchCellLayer::calcExtrudeInfo(), processorFaPatch::calcGeometry(), processorPolyPatch::calcGeometry(), processorCyclicPolyPatch::calcGeometry(), surfaceNoise::calculate(), waveMethod::calculate(), cyclicAMIPolyPatch::canResetAMI(), FaceCellWave< Type, TrackingData >::cellToFace(), OppositeFaceCellWave< Type, TrackingData >::cellToFace(), IOobjectList::checkNames(), faBoundaryMesh::checkParallelSync(), polyBoundaryMesh::checkParallelSync(), AMIInterpolation::checkSymmetricWeights(), Pstream::combineAllGather(), fieldValue::combineFields(), Pstream::combineGather(), Pstream::combineScatter(), dynamicOversetFvMesh::correctBoundaryConditions(), dynamicOversetFvMesh::correctCoupledBoundaryConditions(), meshRefinement::countEdgeFaces(), processorFaPatch::coupled(), processorFaePatchField< Type >::coupled(), processorFaPatchField< Type >::coupled(), processorFvPatchField< Type >::coupled(), cyclicACMIFvsPatchField< Type >::coupled(), processorFvsPatchField< Type >::coupled(), processorCyclicFvsPatchField< Type >::coupled(), cyclicACMIFvPatch::coupled(), cyclicAMIFvPatch::coupled(), processorFvPatch::coupled(), cyclicAMIPointPatch::coupled(), processorPointPatchField< Type >::coupled(), processorCyclicPointPatchField< Type >::coupled(), processorPolyPatch::coupled(), multiWorldConnections::createComms(), simpleGeomDecomp::decompose(), decompositionMethod::decompose(), metisLikeDecomp::decomposeGeneral(), conformalVoronoiMesh::decomposition(), processorFaPatch::delta(), processorFvPatch::delta(), masterUncollatedFileOperation::dirPath(), faMeshDistributor::distribute(), fvMeshDistribute::distribute(), distributedTriSurfaceMesh::distribute(), refinementHistory::distribute(), mapDistributeBase::distribute(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), faMeshBoundaryHalo::distributeSparse(), snappyLayerDriver::doLayers(), snappyRefineDriver::doRefine(), PointEdgeWave< Type, TrackingData >::edgeToPoint(), GeometricBoundaryField< Type, PatchField, GeoMesh >::evaluate(), processorFaPatchField< Type >::evaluate(), calculatedProcessorFvPatchField< Type >::evaluate(), processorFvPatchField< Type >::evaluate(), Foam::evaluateConstraintTypes(), GeometricBoundaryField< Type, PatchField, GeoMesh >::evaluateCoupled(), Pstream::exchange(), mapDistributeBase::exchangeMasks(), Foam::exitNow(), faMeshReconstructor::faMeshReconstructor(), masterUncollatedFileOperation::filePath(), polyMesh::findCell(), masterUncollatedFileOperation::findInstance(), distributedTriSurfaceMesh::findLine(), distributedTriSurfaceMesh::findLineAll(), distributedTriSurfaceMesh::findLineAny(), distributedTriSurfaceMesh::findNearest(), masterUncollatedFileOperation::findTimes(), Pstream::gather(), globalIndex::gather(), PatchTools::gatherAndMerge(), globalIndex::gatherInplace(), globalIndex::gatherInplaceOp(), Pstream::gatherList(), globalIndex::gatherOp(), zoneDistribute::getDatafromOtherProc(), distributedTriSurfaceMesh::getField(), distributedTriSurfaceMesh::getNormal(), distributedTriSurfaceMesh::getRegion(), distributedTriSurfaceMesh::getVolumeType(), GAMGProcAgglomeration::globalCellCells(), lduPrimitiveMesh::globalCellCells(), faMeshBoundaryHalo::haloSize(), InflationInjection< CloudType >::InflationInjection(), faMesh::init(), processorFaPatchField< Type >::initEvaluate(), calculatedProcessorFvPatchField< Type >::initEvaluate(), processorFvPatchField< Type >::initEvaluate(), processorFaPatch::initGeometry(), processorPolyPatch::initGeometry(), extractEulerianParticles::initialiseBins(), processorPolyPatch::initOrder(), processorCyclicPointPatchField< Type >::initSwapAddSeparated(), processorFaPatch::initUpdateMesh(), processorPolyPatch::initUpdateMesh(), collatedFileOperation::isMasterRank(), isoAdvection::isoAdvection(), FaceCellWave< Type, TrackingData >::iterate(), PointEdgeWave< Type, TrackingData >::iterate(), Pstream::listCombineAllGather(), Pstream::listCombineGather(), Pstream::listCombineScatter(), UPstream::listGatherValues(), UPstream::listScatterValues(), fvMeshTools::loadOrCreateMesh(), faMeshTools::loadOrCreateMesh(), masterUncollatedFileOperation::localObjectPath(), fileOperation::lookupAndCacheProcessorsPath(), LUscalarMatrix::LUscalarMatrix(), patchMeanVelocityForce::magUbarAve(), processorFaPatch::makeDeltaCoeffs(), processorFaPatch::makeNonGlobalPatchPoints(), processorFaPatch::makeWeights(), processorFvPatch::makeWeights(), Pstream::mapCombineAllGather(), Pstream::mapCombineGather(), Pstream::mapCombineScatter(), error::master(), masterUncollatedFileOperation::masterOp(), surfaceWriter::merge(), surfaceWriter::mergeFieldTemplate(), globalIndex::mpiGather(), globalIndex::mpiGatherInplace(), globalIndex::mpiGatherInplaceOp(), globalIndex::mpiGatherOp(), polyBoundaryMesh::neighbourEdges(), processorTopology::New(), masterUncollatedFileOperation::NewIFstream(), fvMeshTools::newMesh(), faMeshTools::newMesh(), fileWriter::open(), processorPolyPatch::order(), fieldMinMax::output(), InflationInjection< CloudType >::parcelsToInject(), argList::parse(), pointHistory::pointHistory(), RecycleInteraction< CloudType >::postEvolve(), powerLawLopesdaCostaZone::powerLawLopesdaCostaZone(), collatedFileOperation::processorsDir(), masterUncollatedFileOperation::read(), uncollatedFileOperation::read(), lumpedPointState::readData(), fieldsDistributor::readFields(), Time::readModifiedObjects(), masterUncollatedFileOperation::readObjects(), masterUncollatedFileOperation::readStream(), surfaceNoise::readSurfaceData(), Foam::reduce(), AMIWeights::reportPatch(), fvMeshSubset::reset(), faMeshBoundaryHalo::reset(), globalIndex::reset(), PPCG::scalarSolveCG(), Pstream::scatter(), globalIndex::scatter(), Pstream::scatterList(), mapDistributeBase::schedule(), Time::setControls(), surfaceWriter::setSurface(), zoneDistribute::setUpCommforZone(), globalMeshData::sharedPoints(), shortestPathSet::shortestPathSet(), error::simpleExit(), TDACChemistryModel< ReactionThermo, ThermoType >::solve(), LUscalarMatrix::solve(), messageStream::stream(), Foam::sumReduce(), surfaceWriter::surface(), surfaceNoise::surfaceAverage(), processorCyclicPointPatchField< Type >::swapAddSeparated(), syncObjects::sync(), syncTools::syncEdgeMap(), syncTools::syncPointMap(), triSurfaceMesh::triSurfaceMesh(), mapDistributeBase::unionCombineMasks(), ensightFaces::uniqueMeshPoints(), turbulentDFSEMInletFvPatchVectorField::updateCoeffs(), lduMatrix::updateMatrixInterfaces(), faMesh::updateMesh(), processorFaPatch::updateMesh(), processorPolyPatch::updateMesh(), fileOperation::updateStates(), mergedSurf::use(), energySpectrum::write(), vtkWrite::write(), ParticleZoneInfo< CloudType >::write(), ensightCells::write(), ensightFaces::write(), meshToMeshMethod::writeConnectivity(), AMIWeights::writeFileHeader(), fieldMinMax::writeFileHeader(), isoAdvection::writeIsoFaces(), faMeshReconstructor::writeMesh(), patchMeshWriter::writeNeighIDs(), collatedFileOperation::writeObject(), faMeshTools::writeProcAddressing(), fileWriter::writeProcIDs(), surfaceNoise::writeSurfaceData(), and streamLineBase::writeToFile().
|
inlinestaticnoexcept |
Have support for threads.
Definition at line 439 of file UPstream.H.
Referenced by OFstreamCollator::write().
|
inlinestatic |
Number of processes in parallel run, and 1 for serial run.
Definition at line 445 of file UPstream.H.
References UList< T >::size().
Referenced by UPstream::allProcs(), UPstream::commsStruct::commsStruct(), UPstream::subProcs(), and UPstream::whichCommunication().
|
inlinestaticconstexprnoexcept |
Process index of the master (always 0)
Definition at line 451 of file UPstream.H.
Referenced by Pstream::broadcast(), Pstream::broadcasts(), Foam::createReconstructMap(), metisLikeDecomp::decomposeGeneral(), LUscalarMatrix::LUscalarMatrix(), UPstream::master(), masterUncollatedFileOperation::NewIFstream(), argList::parse(), masterUncollatedFileOperation::read(), uncollatedFileOperation::read(), decomposedBlockData::readBlocks(), fieldsDistributor::readFields(), masterUncollatedFileOperation::readHeader(), surfaceNoise::readSurfaceData(), masterUncollatedFileOperation::scatterList(), mapDistributeBase::schedule(), globalMeshData::sharedPoints(), LUscalarMatrix::solve(), surfaceNoise::surfaceAverage(), syncTools::syncEdgeMap(), syncTools::syncPointMap(), energySpectrum::write(), patchWriter::write(), decomposedBlockData::writeBlocks(), patchMeshWriter::writeNeighIDs(), patchMeshWriter::writePatchIDs(), patchMeshWriter::writePoints(), and surfaceNoise::writeSurfaceData().
Am I the master process.
Definition at line 457 of file UPstream.H.
References UPstream::masterNo().
|
inlinestatic |
Number of this process (starting from masterNo() = 0)
Definition at line 463 of file UPstream.H.
Referenced by UPstream::myWorldID().
|
inlinestatic |
Definition at line 468 of file UPstream.H.
|
inlinestatic |
Process ID of given process index.
Definition at line 474 of file UPstream.H.
|
inlinestaticnoexcept |
All worlds.
Definition at line 483 of file UPstream.H.
Referenced by mappedPatchBase::calcMapping(), mappedPatchBase::masterWorld(), UPstream::myWorld(), argList::parse(), Foam::printDOT(), and mappedPatchBase::sameWorld().
|
inlinestaticnoexcept |
worldID (index in allWorlds) of all processes
Definition at line 489 of file UPstream.H.
|
inlinestatic |
My worldID.
Definition at line 495 of file UPstream.H.
References UPstream::myProcNo().
Referenced by mappedPatchBase::calcMapping(), multiWorldConnections::createComms(), mappedPatchBase::masterWorld(), and UPstream::myWorld().
|
inlinestatic |
My world.
Definition at line 501 of file UPstream.H.
References UPstream::allWorlds(), and UPstream::myWorldID().
Referenced by multiWorldConnections::addConnectionById(), multiWorldConnections::addConnectionByName(), mappedPatchBase::calcMapping(), argList::parse(), mappedPatchBase::sameWorld(), and mappedPatchBase::sampleMesh().
Range of process indices for all processes.
Definition at line 508 of file UPstream.H.
References UPstream::nProcs().
Range of process indices for sub-processes.
Definition at line 515 of file UPstream.H.
References UPstream::nProcs().
|
inlinestatic |
Communication schedule for linear all-to-master (proc 0)
Definition at line 522 of file UPstream.H.
|
inlinestatic |
Communication schedule for tree all-to-master (proc 0)
Definition at line 531 of file UPstream.H.
|
inlinestatic |
Communication schedule for linear/tree all-to-master (proc 0). Chooses based on the value of UPstream::nProcsSimpleSum
Definition at line 541 of file UPstream.H.
References UPstream::nProcs(), and UPstream::nProcsSimpleSum.
Referenced by Pstream::allGatherList(), Pstream::combineAllGather(), Pstream::combineGather(), Pstream::combineScatter(), Pstream::gather(), Pstream::gatherList(), Pstream::listCombineAllGather(), Pstream::listCombineGather(), Pstream::listCombineScatter(), Pstream::mapCombineAllGather(), Pstream::mapCombineGather(), Pstream::mapCombineScatter(), Foam::reduce(), Pstream::scatter(), and Pstream::scatterList().
|
inlinestaticnoexcept |
Message tag of standard messages.
Definition at line 556 of file UPstream.H.
Referenced by solidAbsorption::a(), mappedPatchBase::calcMapping(), masterUncollatedFileOperation::chMod(), meshRefinement::collectAndPrint(), mappedPatchBase::collectSamples(), extendedCentredCellToCellStencil::compact(), extendedCentredCellToFaceStencil::compact(), extendedCentredFaceToCellStencil::compact(), masterUncollatedFileOperation::cp(), inverseDistance::createStencil(), metisLikeDecomp::decomposeGeneral(), masterUncollatedFileOperation::dirPath(), faMeshDistributor::distribute(), mappedPatchBase::distribute(), solidAbsorption::e(), masterUncollatedFileOperation::exists(), masterUncollatedFileOperation::filePath(), masterUncollatedFileOperation::fileSize(), distributedTriSurfaceMesh::findNearest(), mappedPatchBase::findSamples(), lduPrimitiveMesh::gather(), Foam::gAverage(), distributedTriSurfaceMesh::getVolumeType(), Foam::gSumCmptProd(), Foam::gSumProd(), masterUncollatedFileOperation::highResLastModified(), viewFactor::initialise(), dynamicOversetFvMesh::interpolate(), regionModel::interRegionAMI(), masterUncollatedFileOperation::isDir(), masterUncollatedFileOperation::isFile(), masterUncollatedFileOperation::lastModified(), lduPrimitiveMesh::lduPrimitiveMesh(), masterUncollatedFileOperation::ln(), LUscalarMatrix::LUscalarMatrix(), mappedPatchFieldBase< Type >::mappedField(), mappedPatchFieldBase< Type >::mappedInternalField(), mappedPatchFieldBase< Type >::mappedWeightField(), regionModel::mapRegionPatchField(), regionModel::mapRegionPatchInternalField(), masterUncollatedFileOperation::mkDir(), masterUncollatedFileOperation::mode(), masterUncollatedFileOperation::mv(), masterUncollatedFileOperation::mvBak(), processorTopology::New(), masterUncollatedFileOperation::NewIFstream(), GAMGAgglomeration::procAgglomerateRestrictAddressing(), GAMGAgglomeration::prolongField(), decomposedBlockData::readBlocks(), masterUncollatedFileOperation::readDir(), masterUncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readStream(), lduMesh::reduce(), fvMatrix< Type >::relax(), faMeshBoundaryHalo::reset(), GAMGAgglomeration::restrictField(), mappedPatchBase::reverseDistribute(), masterUncollatedFileOperation::rm(), masterUncollatedFileOperation::rmDir(), mapDistributeBase::schedule(), LUscalarMatrix::solve(), syncObjects::sync(), processorFaPatch::tag(), processorFvPatch::tag(), processorPolyPatch::tag(), processorCyclicPolyPatch::tag(), masterUncollatedFileOperation::type(), dynamicOversetFvMesh::updateAddressing(), mappedFixedInternalValueFvPatchField< Type >::updateCoeffs(), mappedFlowRateFvPatchVectorField::updateCoeffs(), mappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), filmPyrolysisTemperatureCoupledFvPatchScalarField::updateCoeffs(), filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs(), alphatFilmWallFunctionFvPatchScalarField::updateCoeffs(), greyDiffusiveRadiationMixedFvPatchScalarField::updateCoeffs(), MarshakRadiationFvPatchScalarField::updateCoeffs(), MarshakRadiationFixedTemperatureFvPatchScalarField::updateCoeffs(), wideBandDiffusiveRadiationMixedFvPatchScalarField::updateCoeffs(), thermalBaffle1DFvPatchScalarField< solidType >::updateCoeffs(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs(), globalMeshData::updateMesh(), Sampled< Type >::value(), OFstreamCollator::write(), and decomposedBlockData::writeBlocks().
|
inlinenoexcept |
Get the communications type of the stream.
Definition at line 562 of file UPstream.H.
Referenced by UIPstream::UIPstream(), and UIPstreamBase::UIPstreamBase().
|
inlinenoexcept |
Set the communications type of the stream.
Definition at line 569 of file UPstream.H.
|
static |
Shutdown (finalize) MPI as required.
Uses MPI_Abort instead of MPI_Finalize if errNo is non-zero
Definition at line 58 of file UPstream.C.
|
static |
Call MPI_Abort with no other checks or cleanup.
Definition at line 69 of file UPstream.C.
Referenced by error::simpleExit().
|
static |
Shutdown (finalize) MPI as required and exit program with errNo.
Definition at line 62 of file UPstream.C.
|
static |
Exchange integer data with all processors (in the communicator).
sendData
[proci] is the value to send to proci. After return recvData contains the data from the other processors.
Definition at line 48 of file UPstreamAllToAll.C.
Referenced by fvMeshDistribute::distribute(), and Pstream::exchangeSizes().
|
static |
Exchange integer data with all processors (in the communicator).
sendData
[proci] is the value to send to proci. After return recvData contains the data from the other processors.
Definition at line 49 of file UPstreamAllToAll.C.
|
static |
Receive identically-sized char
data from all ranks.
Definition at line 62 of file UPstreamGatherScatter.C.
Referenced by UPstream::listGatherValues().
|
static |
Send identically-sized char
data to all ranks.
Definition at line 62 of file UPstreamGatherScatter.C.
Referenced by UPstream::listScatterValues().
|
static |
Receive variable length char
data from all ranks.
sendCount | Ignored on master if recvCount[0] == 0 |
recvData | Ignored on non-root rank |
recvCounts | Ignored on non-root rank |
recvOffsets | Ignored on non-root rank |
Definition at line 102 of file UPstreamGatherScatter.C.
Referenced by decomposedBlockData::gather(), decomposedBlockData::gatherSlaveData(), and globalIndex::mpiGather().
|
static |
Send variable length char
data to all ranks.
sendData | Ignored on non-root rank |
sendCounts | Ignored on non-root rank |
sendOffsets | Ignored on non-root rank |
Definition at line 102 of file UPstreamGatherScatter.C.
Referenced by decomposedBlockData::calcNumProcs().
|
static |
Receive variable length int32_t
data from all ranks.
sendCount | Ignored on master if recvCount[0] == 0 |
recvData | Ignored on non-root rank |
recvCounts | Ignored on non-root rank |
recvOffsets | Ignored on non-root rank |
Definition at line 103 of file UPstreamGatherScatter.C.
|
static |
Send variable length int32_t
data to all ranks.
sendData | Ignored on non-root rank |
sendCounts | Ignored on non-root rank |
sendOffsets | Ignored on non-root rank |
Definition at line 103 of file UPstreamGatherScatter.C.
|
static |
Receive variable length int64_t
data from all ranks.
sendCount | Ignored on master if recvCount[0] == 0 |
recvData | Ignored on non-root rank |
recvCounts | Ignored on non-root rank |
recvOffsets | Ignored on non-root rank |
Definition at line 104 of file UPstreamGatherScatter.C.
|
static |
Send variable length int64_t
data to all ranks.
sendData | Ignored on non-root rank |
sendCounts | Ignored on non-root rank |
sendOffsets | Ignored on non-root rank |
Definition at line 104 of file UPstreamGatherScatter.C.
|
static |
Receive variable length uint32_t
data from all ranks.
sendCount | Ignored on master if recvCount[0] == 0 |
recvData | Ignored on non-root rank |
recvCounts | Ignored on non-root rank |
recvOffsets | Ignored on non-root rank |
Definition at line 105 of file UPstreamGatherScatter.C.
|
static |
Send variable length uint32_t
data to all ranks.
sendData | Ignored on non-root rank |
sendCounts | Ignored on non-root rank |
sendOffsets | Ignored on non-root rank |
Definition at line 105 of file UPstreamGatherScatter.C.
|
static |
Receive variable length uint64_t
data from all ranks.
sendCount | Ignored on master if recvCount[0] == 0 |
recvData | Ignored on non-root rank |
recvCounts | Ignored on non-root rank |
recvOffsets | Ignored on non-root rank |
Definition at line 106 of file UPstreamGatherScatter.C.
|
static |
Send variable length uint64_t
data to all ranks.
sendData | Ignored on non-root rank |
sendCounts | Ignored on non-root rank |
sendOffsets | Ignored on non-root rank |
Definition at line 106 of file UPstreamGatherScatter.C.
|
static |
Receive variable length float
data from all ranks.
sendCount | Ignored on master if recvCount[0] == 0 |
recvData | Ignored on non-root rank |
recvCounts | Ignored on non-root rank |
recvOffsets | Ignored on non-root rank |
Definition at line 107 of file UPstreamGatherScatter.C.
|
static |
Send variable length float
data to all ranks.
sendData | Ignored on non-root rank |
sendCounts | Ignored on non-root rank |
sendOffsets | Ignored on non-root rank |
Definition at line 107 of file UPstreamGatherScatter.C.
|
static |
Receive variable length double
data from all ranks.
sendCount | Ignored on master if recvCount[0] == 0 |
recvData | Ignored on non-root rank |
recvCounts | Ignored on non-root rank |
recvOffsets | Ignored on non-root rank |
Definition at line 108 of file UPstreamGatherScatter.C.
|
static |
Send variable length double
data to all ranks.
sendData | Ignored on non-root rank |
sendCounts | Ignored on non-root rank |
sendOffsets | Ignored on non-root rank |
Definition at line 108 of file UPstreamGatherScatter.C.
|
static |
Gather individual values into list locations.
On master list length == nProcs, otherwise zero length. If called in non-parallel mode, the returned list length is 1 with localValue.
Referenced by globalIndex::globalIndex(), and globalIndex::reset().
Scatter individual values from list locations.
On master input list length == nProcs, ignored on other procs. If called in non-parallel mode, returns the first list element (or zero).
Definition at line 77 of file UPstreamTemplates.C.
References Foam::abort(), UList< T >::cdata_bytes(), UList< T >::empty(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, splitCell::master(), UPstream::mpiScatter(), PstreamBuffers::nProcs(), UPstream::parRun(), UList< T >::size(), T, and Foam::Zero.
|
static |
Broadcast buffer contents to all processes in communicator. The sizes must match on all processes.
Definition at line 32 of file UPstreamBroadcast.C.
Referenced by Pstream::broadcast(), and globalIndex::mpiGather().
|
inlinestaticconstexprnoexcept |
Process index of first sub-process.
Definition at line 715 of file UPstream.H.
|
inlinestatic |
Process index of last sub-process.
Definition at line 722 of file UPstream.H.
Foam::List< T > listGatherValues | ( | const T & | localValue, |
const label | comm | ||
) |
Definition at line 31 of file UPstreamTemplates.C.
References Foam::abort(), UList< T >::data_bytes(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, splitCell::master(), UPstream::mpiGather(), PstreamBuffers::nProcs(), UPstream::parRun(), List< T >::resize(), and T.
|
static |
Names of the communication types.
Definition at line 74 of file UPstream.H.
Referenced by GeometricBoundaryField< Type, PatchField, GeoMesh >::evaluate(), GeometricBoundaryField< Type, PatchField, GeoMesh >::evaluateCoupled(), PstreamBuffers::finishedGathers(), PstreamBuffers::finishedScatters(), PstreamBuffers::finishedSends(), lduMatrix::initMatrixInterfaces(), argList::parse(), decomposedBlockData::readBlocks(), addcommsTypeToOpt::readData(), lduMatrix::updateMatrixInterfaces(), decomposedBlockData::writeBlocks(), and addcommsTypeToOpt::writeData().
|
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 275 of file UPstream.H.
Referenced by processorLduInterface::compressedReceive(), processorLduInterface::compressedSend(), processorFvPatchField< Type >::evaluate(), processorFvPatchField< Type >::initEvaluate(), processorFvPatchField< Type >::initInterfaceMatrixUpdate(), processorGAMGInterfaceField::initInterfaceMatrixUpdate(), calculatedProcessorGAMGInterfaceField::initInterfaceMatrixUpdate(), argList::parse(), processorFvPatchField< Type >::updateInterfaceMatrix(), processorGAMGInterfaceField::updateInterfaceMatrix(), and calculatedProcessorGAMGInterfaceField::updateInterfaceMatrix().
|
static |
Number of processors to change from linear to tree communication.
Definition at line 278 of file UPstream.H.
Referenced by UList< T >::operator[](), argList::parse(), and UPstream::whichCommunication().
|
static |
Default commsType.
Definition at line 281 of file UPstream.H.
Referenced by faBoundaryMesh::calcGeometry(), dynamicOversetFvMesh::correctBoundaryConditions(), dynamicOversetFvMesh::correctCoupledBoundaryConditions(), distributedTriSurfaceMesh::distribute(), mapDistributeBase::distribute(), mappedPatchBase::distribute(), GeometricBoundaryField< Type, PatchField, GeoMesh >::evaluate(), Foam::evaluateConstraintTypes(), GeometricBoundaryField< Type, PatchField, GeoMesh >::evaluateCoupled(), lduMatrix::initMatrixInterfaces(), faBoundaryMesh::movePoints(), pointBoundaryMesh::movePoints(), polyBoundaryMesh::movePoints(), processorTopology::New(), argList::parse(), processorCyclicFvPatchField< Type >::processorCyclicFvPatchField(), addcommsTypeToOpt::readData(), mapDistributeBase::reverseDistribute(), mappedPatchBase::reverseDistribute(), syncTools::syncBoundaryFaceList(), lduMatrix::updateMatrixInterfaces(), faBoundaryMesh::updateMesh(), pointBoundaryMesh::updateMesh(), polyBoundaryMesh::updateMesh(), and addcommsTypeToOpt::writeData().
|
static |
Number of polling cycles in processor updates.
Definition at line 284 of file UPstream.H.
Referenced by argList::parse(), and lduMatrix::updateMatrixInterfaces().
|
static |
Optional maximum message size (bytes)
Definition at line 287 of file UPstream.H.
Referenced by Pstream::exchange().
|
static |
MPI buffer-size (bytes)
Definition at line 290 of file UPstream.H.
Referenced by attachOurBuffers().
|
static |
Default communicator (all processors)
Definition at line 293 of file UPstream.H.
Referenced by mappedPatchBase::calcAMI(), decompositionMethod::calcCellCells(), processorFaPatchField< Type >::comm(), multiWorldConnections::comms(), multiWorldConnections::createComms(), metisLikeDecomp::decomposeGeneral(), masterUncollatedFileOperation::dirPath(), mappedPatchBase::distribute(), masterUncollatedFileOperation::filePath(), masterUncollatedFileOperation::findInstance(), multiWorldConnections::getCommById(), multiWorldConnections::getCommByName(), mappedPatchBase::getWorldCommunicator(), viewFactor::initialise(), surfaceNoise::initialise(), fvMeshTools::loadOrCreateMesh(), masterUncollatedFileOperation::localObjectPath(), messageStream::masterStream(), masterUncollatedFileOperation::NewIFstream(), fvMeshTools::newMesh(), faMeshTools::newMesh(), masterUncollatedFileOperation::read(), uncollatedFileOperation::read(), decomposedBlockData::readBlocks(), lumpedPointState::readData(), masterUncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readObjects(), masterUncollatedFileOperation::readStream(), mappedPatchBase::reverseDistribute(), globalMeshData::updateMesh(), collatedFileOperation::~collatedFileOperation(), hostCollatedFileOperation::~hostCollatedFileOperation(), and masterUncollatedFileOperation::~masterUncollatedFileOperation().
|
static |
Debugging: warn for use of any communicator differing from warnComm.
Definition at line 296 of file UPstream.H.
Referenced by mappedPatchBase::calcAMI(), mappedPatchBase::collectSamples(), multiWorldConnections::createComms(), mappedPatchBase::distribute(), mappedPatchBase::findSamples(), messageStream::masterStream(), Foam::reduce(), mappedPatchBase::reverseDistribute(), syncObjects::sync(), and globalMeshData::updateMesh().