Inter-processor communications stream. More...
Public Member Functions | |
ClassName ("Pstream") | |
Pstream (const UPstream::commsTypes commsType, const label bufSize=0) | |
Construct for given commsTypes, with optional buffer size. More... | |
![]() | |
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 | |
template<class Type > | |
static void | broadcast (Type &value, const label comm=UPstream::worldComm) |
template<class Type , class... Args> | |
static void | broadcasts (const label comm, Type &arg1, Args &&... args) |
Broadcast multiple items to all processes in communicator. More... | |
template<class T , class BinaryOp > | |
static void | gather (const List< commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm) |
template<class T , class BinaryOp > | |
static void | gather (T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
template<class T , class CombineOp > | |
static void | combineGather (const List< commsStruct > &comms, T &value, const CombineOp &cop, const int tag, const label comm) |
template<class T , class CombineOp > | |
static void | combineGather (T &value, const CombineOp &cop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
template<class T , class CombineOp > | |
static void | combineAllGather (const List< commsStruct > &comms, T &value, const CombineOp &cop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
template<class T , class CombineOp > | |
static void | combineAllGather (T &value, const CombineOp &cop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
template<class T , class CombineOp > | |
static void | listCombineGather (const List< commsStruct > &comms, List< T > &values, const CombineOp &cop, const int tag, const label comm) |
template<class T , class CombineOp > | |
static void | listCombineGather (List< T > &values, const CombineOp &cop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
Like above but switches between linear/tree communication. More... | |
template<class T , class CombineOp > | |
static void | listCombineAllGather (const List< commsStruct > &comms, List< T > &values, const CombineOp &cop, const int tag, const label comm) |
After completion all processors have the same data. More... | |
template<class T , class CombineOp > | |
static void | listCombineAllGather (List< T > &values, const CombineOp &cop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
After completion all processors have the same data. More... | |
template<class Container , class CombineOp > | |
static void | mapCombineGather (const List< commsStruct > &comms, Container &values, const CombineOp &cop, const int tag, const label comm) |
template<class Container , class CombineOp > | |
static void | mapCombineGather (Container &values, const CombineOp &cop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
Like above but switches between linear/tree communication. More... | |
template<class Container , class CombineOp > | |
static void | mapCombineAllGather (const List< commsStruct > &comms, Container &values, const CombineOp &cop, const int tag, const label comm) |
After completion all processors have the same data. More... | |
template<class Container , class CombineOp > | |
static void | mapCombineAllGather (Container &values, const CombineOp &cop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
After completion all processors have the same data. More... | |
template<class T > | |
static void | gatherList (const List< commsStruct > &comms, List< T > &values, const int tag, const label comm) |
template<class T > | |
static void | gatherList (List< T > &values, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
template<class T > | |
static void | allGatherList (const List< commsStruct > &comms, List< T > &values, const int tag, const label comm) |
template<class T > | |
static void | allGatherList (List< T > &values, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
template<class T > | |
static void | scatter (const List< commsStruct > &comms, T &value, const int tag, const label comm) |
Broadcast data: Distribute without modification. More... | |
template<class T > | |
static void | scatter (T &value, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
Broadcast data: Distribute without modification. More... | |
template<class T > | |
static void | combineScatter (const List< commsStruct > &comms, T &value, const int tag, const label comm) |
Broadcast data: Distribute without modification. More... | |
template<class T > | |
static void | combineScatter (T &value, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
Broadcast data: Distribute without modification. More... | |
template<class T > | |
static void | listCombineScatter (const List< commsStruct > &comms, List< T > &value, const int tag, const label comm) |
Broadcast data: Distribute without modification. More... | |
template<class T > | |
static void | listCombineScatter (List< T > &value, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
Broadcast data: Distribute without modification. More... | |
template<class Container > | |
static void | mapCombineScatter (const List< commsStruct > &comms, Container &values, const int tag, const label comm) |
Broadcast data: Distribute without modification. More... | |
template<class Container > | |
static void | mapCombineScatter (Container &values, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
Like above but switches between linear/tree communication. More... | |
template<class T > | |
static void | scatterList (const List< commsStruct > &comms, List< T > &values, const int tag, const label comm) |
Scatter data. Reverse of gatherList. More... | |
template<class T > | |
static void | scatterList (List< T > &values, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
Like above but switches between linear/tree communication. More... | |
template<class Container > | |
static void | exchangeSizes (const labelUList &sendProcs, const labelUList &recvProcs, const Container &sendData, labelList &sizes, const label tag=UPstream::msgType(), const label comm=UPstream::worldComm) |
template<class Container > | |
static void | exchangeSizes (const Container &sendData, labelList &sizes, const label comm=UPstream::worldComm) |
template<class Container , class T > | |
static void | exchange (const UList< Container > &sendData, const labelUList &recvSizes, List< Container > &recvData, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, const bool wait=true) |
template<class Container , class T > | |
static void | exchange (const UList< Container > &sendData, List< Container > &recvData, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, const bool wait=true) |
static bool | broadcast (char *buf, const std::streamsize bufSize, const label communicator=worldComm, const int rootProcNo=masterNo()) |
Broadcast buffer content to all processes in communicator. More... | |
![]() | |
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... | |
Protected Attributes | |
DynamicList< char > | transferBuf_ |
Allocated transfer buffer (can be used for send or receive) More... | |
Additional Inherited Members | |
![]() | |
enum class | commsTypes : char { blocking , scheduled , nonBlocking } |
Types of communications. More... | |
typedef IntRange< int > | rangeType |
Int ranges are used for MPI ranks (processes) More... | |
![]() | |
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... | |
Inter-processor communications stream.
|
inlineexplicit |
Construct for given commsTypes, with optional buffer size.
Definition at line 111 of file Pstream.H.
References DynamicList< T, SizeMin >::setCapacity(), and Pstream::transferBuf_.
ClassName | ( | "Pstream" | ) |
|
static |
Broadcast content (contiguous or non-contiguous) to all processes in communicator.
Definition at line 35 of file PstreamBroadcast.C.
References UPstream::broadcast(), splitCell::master(), UPstream::masterNo(), PstreamBuffers::nProcs(), os(), and UPstream::parRun().
Referenced by unwatchedIOdictionary::addWatch(), regIOobject::addWatch(), masterUncollatedFileOperation::addWatch(), AMIInterpolation::calcDistribution(), viewFactor::calculate(), Pstream::combineAllGather(), Pstream::combineScatter(), masterUncollatedFileOperation::dirPath(), faMeshDistributor::distribute(), masterUncollatedFileOperation::filePath(), distanceSurface::filterKeepLargestRegion(), distanceSurface::filterKeepNearestRegions(), distanceSurface::filterRegionProximity(), masterUncollatedFileOperation::findInstance(), masterUncollatedFileOperation::findTimes(), masterUncollatedFileOperation::findWatch(), masterUncollatedFileOperation::getFile(), codeStream::getFunction(), masterUncollatedFileOperation::getState(), Pstream::listCombineAllGather(), Pstream::listCombineScatter(), fvMeshTools::loadOrCreateMesh(), faMeshTools::loadOrCreateMesh(), fileOperation::lookupAndCacheProcessorsPath(), Pstream::mapCombineAllGather(), Pstream::mapCombineScatter(), fileOperation::nProcs(), decomposedBlockData::readBlocks(), fieldsDistributor::readFields(), masterUncollatedFileOperation::readHeader(), regIOobject::readHeaderOk(), masterUncollatedFileOperation::readStream(), Foam::reduce(), masterUncollatedFileOperation::removeWatch(), globalIndex::reset(), Pstream::scatter(), mapDistributeBase::schedule(), globalMeshData::sharedPoints(), surfaceNoise::surfaceAverage(), hexRef8Data::sync(), IOobject::typeHeaderOk(), fileMonitor::updateStates(), ParticleZoneInfo< CloudType >::write(), decomposedBlockData::writeBlocks(), vtkCloud::writeFields(), and surfaceNoise::writeSurfaceData().
|
static |
Broadcast multiple items to all processes in communicator.
Definition at line 68 of file PstreamBroadcast.C.
References args, Foam::Detail::inputLoop(), splitCell::master(), UPstream::masterNo(), PstreamBuffers::nProcs(), os(), Foam::Detail::outputLoop(), and UPstream::parRun().
Referenced by mappedPatchBase::collectSamples(), masterUncollatedFileOperation::dirPath(), masterUncollatedFileOperation::filePath(), surfaceNoise::initialise(), fvMeshTools::loadOrCreateMesh(), fvMeshTools::newMesh(), faMeshTools::newMesh(), masterUncollatedFileOperation::read(), uncollatedFileOperation::read(), decomposedBlockData::readBlocks(), lumpedPointState::readData(), masterUncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readObjects(), OFstreamCollator::write(), and decomposedBlockData::writeData().
|
static |
Gather (reduce) data, appyling bop
to combine value
from different processors. The basis for Foam::reduce().
Uses the specified communication schedule.
Definition at line 42 of file PstreamGather.C.
References UPstream::commsStruct::above(), UPstream::commsStruct::below(), processorFaPatch::myProcNo(), PstreamBuffers::nProcs(), UPstream::parRun(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::read(), UPstream::scheduled, T, and ObukhovLength::write().
Referenced by Pstream::gather(), and Foam::reduce().
|
static |
Gather (reduce) data, applying bop
to combine value
from different processors. The basis for Foam::reduce().
Uses linear/tree communication.
Definition at line 205 of file PstreamGather.C.
References Pstream::gather(), and UPstream::whichCommunication().
|
static |
Gather data, applying cop
to inplace combine value
from different processors.
Uses the specified communication schedule.
Definition at line 47 of file PstreamCombineGather.C.
References UPstream::commsStruct::above(), UPstream::commsStruct::below(), Foam::endl(), processorFaPatch::myProcNo(), PstreamBuffers::nProcs(), UPstream::parRun(), Foam::Pout, kEpsilonLopesdaCosta< BasicTurbulenceModel >::read(), UPstream::scheduled, T, and ObukhovLength::write().
Referenced by Pstream::combineAllGather(), Pstream::combineGather(), multiWorldConnections::createComms(), parProfiling::report(), and vtkCloud::writeFields().
|
static |
Gather data, applying cop
to inplace combine value
from different processors.
Uses linear/tree communication.
Definition at line 228 of file PstreamCombineGather.C.
References Pstream::combineGather(), and UPstream::whichCommunication().
|
static |
Gather data, applying cop
to inplace combine value
from different processors. After completion all processors have the same data.
Uses the specified communication schedule. Wraps combineGather/broadcast (may change in the future).
Definition at line 264 of file PstreamCombineGather.C.
References Pstream::broadcast(), and Pstream::combineGather().
Referenced by Foam::combineReduce(), globalMeshData::geometricSharedPoints(), and faGlobalMeshData::updateMesh().
|
static |
Gather data, applying cop
to inplace combine value
from different processors. After completion all processors have the same data.
Uses linear/tree communication. Wraps combineGather/broadcast (may change in the future).
Definition at line 279 of file PstreamCombineGather.C.
References Pstream::broadcast(), Pstream::combineGather(), PstreamBuffers::nProcs(), UPstream::parRun(), and UPstream::whichCommunication().
|
static |
Definition at line 300 of file PstreamCombineGather.C.
References UPstream::commsStruct::above(), UPstream::commsStruct::below(), UList< T >::data_bytes(), Foam::endl(), forAll, processorFaPatch::myProcNo(), PstreamBuffers::nProcs(), UPstream::parRun(), Foam::Pout, kEpsilonLopesdaCosta< BasicTurbulenceModel >::read(), UPstream::scheduled, UList< T >::size_bytes(), and ObukhovLength::write().
Referenced by viewFactor::calculate(), patchInjection::correct(), cellCellStencil::count(), distanceSurface::filterKeepLargestRegion(), distanceSurface::filterKeepNearestRegions(), distanceSurface::filterRegionProximity(), LocalInteraction< CloudType >::info(), RecycleInteraction< CloudType >::info(), StandardWallInteraction< CloudType >::info(), injectionModelList::info(), transferModelList::info(), Pstream::listCombineAllGather(), Pstream::listCombineGather(), patchInjection::patchInjectedMassTotals(), meshRefinement::printMeshInfo(), fileMonitor::updateStates(), histogram::write(), and ParticleZoneInfo< CloudType >::write().
|
static |
Like above but switches between linear/tree communication.
Definition at line 487 of file PstreamCombineGather.C.
References Pstream::listCombineGather(), and UPstream::whichCommunication().
|
static |
After completion all processors have the same data.
Definition at line 529 of file PstreamCombineGather.C.
References Pstream::broadcast(), and Pstream::listCombineGather().
Referenced by meshRefinement::balance(), extractEulerianParticles::calculateAddressing(), NURBS3DVolume::computeControlPointSensitivities(), meshRefinement::createZoneBaffles(), Curle::execute(), patchProbes::findElements(), cellVolumeWeight::findHoles(), inverseDistance::findHoles(), mappedPatchBase::findSamples(), propellerInfo::interpolate(), fvMeshSubset::reset(), patchProbes::sample(), probes::sample(), TDACChemistryModel< ReactionThermo, ThermoType >::solve(), trackingInverseDistance::trackingInverseDistance(), cellVolumeWeight::update(), inverseDistance::update(), and propellerInfo::updateSampleDiskCells().
|
static |
After completion all processors have the same data.
Definition at line 544 of file PstreamCombineGather.C.
References Pstream::broadcast(), Pstream::listCombineGather(), PstreamBuffers::nProcs(), UPstream::parRun(), and UPstream::whichCommunication().
|
static |
Definition at line 565 of file PstreamCombineGather.C.
References UPstream::commsStruct::above(), UPstream::commsStruct::below(), Foam::endl(), processorFaPatch::myProcNo(), PstreamBuffers::nProcs(), UPstream::parRun(), Foam::Pout, and UPstream::scheduled.
Referenced by Pstream::mapCombineAllGather(), and Pstream::mapCombineGather().
|
static |
Like above but switches between linear/tree communication.
Definition at line 708 of file PstreamCombineGather.C.
References Pstream::mapCombineGather(), and UPstream::whichCommunication().
|
static |
After completion all processors have the same data.
Definition at line 750 of file PstreamCombineGather.C.
References Pstream::broadcast(), and Pstream::mapCombineGather().
Referenced by regionSplit2D::regionSplit2D(), Foam::regionSum(), areaWrite::write(), and meshRefinement::zonify().
|
static |
After completion all processors have the same data.
Definition at line 765 of file PstreamCombineGather.C.
References Pstream::broadcast(), Pstream::mapCombineGather(), PstreamBuffers::nProcs(), UPstream::parRun(), and UPstream::whichCommunication().
|
static |
Gather data, but keep individual values separate. Uses the specified communication schedule.
Definition at line 46 of file PstreamGatherList.C.
References Foam::abort(), UPstream::commsStruct::above(), UPstream::commsStruct::allBelow(), UPstream::commsStruct::below(), UList< T >::cdata_bytes(), UList< T >::data_bytes(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, processorFaPatch::myProcNo(), PstreamBuffers::nProcs(), UPstream::parRun(), Foam::Pout, kEpsilonLopesdaCosta< BasicTurbulenceModel >::read(), UPstream::scheduled, UList< T >::size(), UList< T >::size_bytes(), and ObukhovLength::write().
Referenced by Pstream::allGatherList(), sizeDistribution::combineFields(), Foam::createReconstructMap(), externalCoupled::gatherAndCombine(), Pstream::gatherList(), viewFactor::initialise(), masterUncollatedFileOperation::masterOp(), masterUncollatedFileOperation::NewIFstream(), InflationInjection< CloudType >::parcelsToInject(), collatedFileOperation::printBanner(), masterUncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readStream(), ParSortableList< Type >::sort(), externalCoupled::writeGeometry(), and isoAdvection::writeIsoFaces().
|
static |
Gather data, but keep individual values separate. Uses linear/tree communication.
Definition at line 321 of file PstreamGatherList.C.
References Pstream::gatherList(), and UPstream::whichCommunication().
|
static |
Gather data, but keep individual values separate. Uses the specified communication schedule.
After completion all processors have the same data. Wraps gatherList/scatterList (may change in the future).
Definition at line 345 of file PstreamGatherList.C.
References Pstream::gatherList(), and Pstream::scatterList().
Referenced by surfaceZonesInfo::addCellZonesToMesh(), surfaceZonesInfo::addFaceZonesToMesh(), sensitivitySurfacePoints::assembleSensitivities(), fieldMinMax::calcMinMaxFieldType(), meshRefinement::checkCoupledFaceZones(), mappedPatchBase::collectSamples(), fieldValue::combineFields(), box::createLODMap(), distributedTriSurfaceMesh::distribute(), mappedPatchBase::findSamples(), distributedTriSurfaceMesh::localQueries(), processorTopology::New(), pointHistory::pointHistory(), powerLawLopesdaCostaZone::powerLawLopesdaCostaZone(), fvMeshSubset::reset(), inverseDistance::update(), and trackingInverseDistance::update().
|
static |
Gather data, but keep individual values separate. Uses linear/tree communication.
After completion all processors have the same data. Wraps gatherList/scatterList (may change in the future).
Definition at line 359 of file PstreamGatherList.C.
References Pstream::gatherList(), PstreamBuffers::nProcs(), UPstream::parRun(), Pstream::scatterList(), and UPstream::whichCommunication().
|
static |
Broadcast data: Distribute without modification.
Definition at line 122 of file PstreamGather.C.
References UPstream::commsStruct::above(), UPstream::commsStruct::below(), Pstream::broadcast(), forAllReverse, processorFaPatch::myProcNo(), PstreamBuffers::nProcs(), UPstream::parRun(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::read(), UPstream::scheduled, T, and ObukhovLength::write().
Referenced by multiWorldConnections::createComms(), systemCall::dispatch(), abort::execute(), Random::globalGaussNormal(), Random::globalPosition(), Random::globalRandomise01(), Random::globalSample01(), InflationInjection< CloudType >::parcelsToInject(), rigidBodyMotion::solve(), ParSortableList< Type >::sort(), syncTools::syncEdgeMap(), syncTools::syncPointMap(), triSurfaceMesh::triSurfaceMesh(), sixDoFRigidBodyMotion::update(), externalFileCoupler::waitForMaster(), externalFileCoupler::waitForSlave(), and streamLineBase::writeToFile().
|
static |
Broadcast data: Distribute without modification.
Definition at line 218 of file PstreamGather.C.
References Pstream::broadcast(), and UPstream::whichCommunication().
|
static |
Broadcast data: Distribute without modification.
Definition at line 147 of file PstreamCombineGather.C.
References UPstream::commsStruct::above(), UPstream::commsStruct::below(), Pstream::broadcast(), forAllReverse, processorFaPatch::myProcNo(), PstreamBuffers::nProcs(), UPstream::parRun(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::read(), UPstream::scheduled, T, and ObukhovLength::write().
|
static |
Broadcast data: Distribute without modification.
Definition at line 248 of file PstreamCombineGather.C.
References Pstream::broadcast(), and UPstream::whichCommunication().
|
static |
Broadcast data: Distribute without modification.
Definition at line 406 of file PstreamCombineGather.C.
References UPstream::commsStruct::above(), UPstream::commsStruct::below(), Pstream::broadcast(), forAllReverse, processorFaPatch::myProcNo(), PstreamBuffers::nProcs(), UPstream::parRun(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::read(), UPstream::scheduled, and ObukhovLength::write().
Referenced by viewFactor::calculate(), and Pstream::listCombineScatter().
|
static |
Broadcast data: Distribute without modification.
Definition at line 507 of file PstreamCombineGather.C.
References Pstream::broadcast(), Pstream::listCombineScatter(), and UPstream::whichCommunication().
|
static |
Broadcast data: Distribute without modification.
Definition at line 646 of file PstreamCombineGather.C.
References UPstream::commsStruct::above(), UPstream::commsStruct::below(), Pstream::broadcast(), Foam::endl(), forAllReverse, processorFaPatch::myProcNo(), PstreamBuffers::nProcs(), UPstream::parRun(), Foam::Pout, and UPstream::scheduled.
Referenced by Pstream::mapCombineScatter().
|
static |
Like above but switches between linear/tree communication.
Definition at line 728 of file PstreamCombineGather.C.
References Pstream::broadcast(), Pstream::mapCombineScatter(), and UPstream::whichCommunication().
|
static |
Scatter data. Reverse of gatherList.
Definition at line 191 of file PstreamGatherList.C.
References Foam::abort(), UPstream::commsStruct::above(), UPstream::commsStruct::allNotBelow(), UPstream::commsStruct::below(), UList< T >::cdata_bytes(), UList< T >::data_bytes(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, forAllReverse, processorFaPatch::myProcNo(), PstreamBuffers::nProcs(), UPstream::parRun(), Foam::Pout, kEpsilonLopesdaCosta< BasicTurbulenceModel >::read(), UPstream::scheduled, UList< T >::size(), UList< T >::size_bytes(), and ObukhovLength::write().
Referenced by Pstream::allGatherList(), and Pstream::scatterList().
|
static |
Like above but switches between linear/tree communication.
Definition at line 333 of file PstreamGatherList.C.
References Pstream::scatterList(), and UPstream::whichCommunication().
|
static |
Helper: exchange sizes of sendData for specified set of send/receive processes.
Definition at line 357 of file PstreamExchange.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, UPstream::nonBlocking, PstreamBuffers::nProcs(), UPstream::nRequests(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::read(), List< T >::resize_nocopy(), UList< T >::size(), UPstream::waitRequests(), and ObukhovLength::write().
Referenced by distributedTriSurfaceMesh::distribute(), and mapDistributeBase::mapDistributeBase().
|
static |
Helper: exchange sizes of sendData. The sendData is the data per processor (in the communicator).
Returns sizes of sendData on the sending processor.
FUTURE?
template<class Container> void Foam::Pstream::exchangeSizes ( const labelUList& neighProcs, const Container& sendBufs, labelList& recvSizes, const label tag, const label comm ) { exchangeSizes<Container>(neighProcs, neighProcs, sendBufs, tag, comm); }
Definition at line 434 of file PstreamExchange.C.
References Foam::abort(), UPstream::allToAll(), Foam::FatalError, FatalErrorInFunction, forAll, PstreamBuffers::nProcs(), List< T >::resize_nocopy(), and UList< T >::size().
|
static |
Helper: exchange contiguous data. Sends sendData, receives into recvData.
If wait=true will wait for all transfers to finish.
Info<< "iter " << iter << ": beg=" << flatOutput(startSend) << " len=" << flatOutput(nSend) << endl;
wait | Wait for requests to complete |
Definition at line 186 of file PstreamExchange.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::max(), UPstream::maxCommsSize, Foam::min(), processorFaPatch::myProcNo(), PstreamBuffers::nProcs(), UPstream::parRun(), Foam::reduce(), List< T >::resize_nocopy(), UList< T >::size(), T, and Foam::Zero.
|
static |
Exchange contiguous data. Sends sendData, receives into recvData. Determines sizes to receive.
If wait=true will wait for all transfers to finish.
wait | Wait for requests to complete |
Definition at line 461 of file PstreamExchange.C.
|
static |
Broadcast buffer content to all processes in communicator.
Definition at line 702 of file UPstreamBroadcast.C.
|
protected |
Allocated transfer buffer (can be used for send or receive)
Definition at line 99 of file Pstream.H.
Referenced by Pstream::Pstream().