#include <State.H>
Classes | |
struct | messagebuffers |
Public Member Functions | |
halo () | |
halo (const pcpp::IndexIntervalType &inGlobalExtent, const pcpp::IndexIntervalType &inPartitionExtent) | |
void | SetGridInterval (const pcpp::IndexIntervalType &inExtent) |
void | SetPartitionInterval (const pcpp::IndexIntervalType &inExtent) |
bool | SetFill (bool yesno) |
bool | Fill () |
void | SetLocalBufferSizes (const std::vector< size_t > &inBufferSizes) |
void | SetLocalPartitionExtent (const pcpp::IndexIntervalType &inExtent) |
std::vector< pcpp::IndexIntervalType > | CreateRemoteHaloExtents (const pcpp::IndexIntervalType &globalExtent, const pcpp::IndexIntervalType &partitionExtent, std::vector< size_t > &haloSizes) |
std::vector< pcpp::IndexIntervalType > | CreateRemoteHaloExtents (std::vector< size_t > &haloSizes) |
std::vector< pcpp::IndexIntervalType > | CreateLocalHaloExtents (const pcpp::IndexIntervalType &globalExtent, const pcpp::IndexIntervalType &partitionExtent, std::vector< size_t > &haloSizes) |
std::vector< pcpp::IndexIntervalType > | CreateLocalHaloExtents (std::vector< size_t > &haloSizes) |
void | ConfigureHalo (const pcpp::IndexIntervalType &partitionExtent, const std::vector< pcpp::IndexIntervalType > &haloExtents, size_t numHaloVar) |
void | ConfigureHalo (const pcpp::IndexIntervalType &globalExtent, const pcpp::IndexIntervalType &partitionExtent, const std::vector< pcpp::IndexIntervalType > &haloExtents) |
void | ConfigureHalo (const pcpp::IndexIntervalType &globalExtent, const pcpp::IndexIntervalType &partitionExtent) |
void | ConfigureData (const state::base &inState) |
void | ConfigureData (const state::base &inState, const std::vector< int > &selectFields) |
int | CreateThreadSendIndices (int threadId) |
Creates send buffers for each whole local halo extent. More... | |
int | CreateThreadRecvIndices (int threadId) |
Create receive buffers for state data from neighboring processors. More... | |
int | UnpackSimpleRecvBuffers (int threadId) |
int | PackSimpleSendBuffers (const state::base &inX, int threadId) |
Packs a send buffer with all components of state fields. More... | |
void | SetRemoteHaloExtents (const std::vector< pcpp::IndexIntervalType > haloExtents) |
void | SetThreadExtent (int myThreadId, pcpp::IndexIntervalType threadInterval) |
void | SetNumThreads (int numThreadsIn) |
int | NumThreads () |
void | SetLocalHaloExtents (const std::vector< pcpp::IndexIntervalType > haloExtents) |
void | CreateHaloBuffers () |
int | CreateSendBuffers (const std::vector< pcpp::RemoteCollisionType > &inCollisions) |
Creates send buffers for intra-grid state communications. More... | |
int | CreateRecvBuffers (const std::vector< pcpp::RemoteCollisionType > &inCollisions) |
Create receive buffers for state data from neighboring processors. More... | |
int | CreateSimpleSendBuffers () |
Creates send buffers for each whole local halo extent. More... | |
int | CreateSimpleSendIndices () |
Creates the flat buffer indices for each whole local halo extent. More... | |
int | CreateSimpleRecvBuffers () |
Create receive buffers for state data from neighboring processors. More... | |
int | CreateSimpleRecvIndices () |
int | CreateMessageBuffers (int numComponents) |
int | PackMessageBuffers (const int messageId, const int componentId, const int numComponents, const double *sourceBuffer) |
Pack generic send buffers for specified message. More... | |
int | PackMessageBuffers (const int messageId, const int componentId, const int numComponents, const double *sourceBuffer, const int threadId) |
Pack generic send buffers for specified message. More... | |
int | SendMessage (const int messageId, const std::vector< int > &neighborRanks, CommunicatorType &inComm) |
int | ReceiveMessage (const int messageId, const std::vector< int > &neighborRanks, CommunicatorType &inComm) |
int | UnPackMessageBuffers (const int messageId, const int componentId, const int numComponents, double *targetBuffer) |
Unpack generic recv buffers for specified message. More... | |
int | UnPackMessageBuffers (const int messageId, const int componentId, const int numComponents, double *targetBuffer, const int threadId) |
void | DestroySendBuffers () |
void | DestroyHaloBuffers () |
void | DestroyRecvBuffers () |
int | UnpackReceiveBuffers () |
int | UnpackSimpleRecvBuffers () |
int | PackSendBuffers (const state::base &inState) |
Packs a send buffer with all components of state fields. More... | |
int | PackSimpleSendBuffers (const state::base &inState) |
Packs a send buffer with all components of state fields. More... | |
int | PackSimpleSendBuffers (double inA, const state::base &inX, const state::base &inY) |
Packs a send buffer with all components of state fields. More... | |
int | Send (CommunicatorType &inComm) |
Packs a send buffer with all components of state fields. More... | |
int | SimpleSend (std::vector< int > &neighborRanks, CommunicatorType &inComm) |
int | PostReceives (CommunicatorType &inComm) |
int | PostSimpleReceives (std::vector< int > &sourceRanks, CommunicatorType &inComm) |
int | CompleteReceives (CommunicatorType &inComm) |
int | CompleteSimpleReceives (CommunicatorType &inComm) |
int | Wait (CommunicatorType &inComm) |
void | SetNeighbors (const std::vector< bool > &inNeighbors) |
std::vector< double * > & | RecvBuffers () |
std::vector< std::vector< double * > > & | HaloBuffers () |
std::vector< double * > & | SendBuffers () |
std::vector< std::pair< int, std::vector< size_t > > > & | HaloRecvIndices () |
std::vector< pcpp::RemoteCollisionType > & | SendCollisions () |
std::vector< pcpp::RemoteCollisionType > & | RecvCollisions () |
double * | HaloBuffer (int fieldIndex, int directionIndex) |
std::vector< pcpp::IndexIntervalType > & | ThreadExtents () |
std::vector< int > & | StateFieldIndices () |
pcpp::IndexIntervalType & | GlobalExtent () |
pcpp::IndexIntervalType & | PartitionExtent () |
std::vector< pcpp::IndexIntervalType > & | RemoteHaloExtents () |
std::vector< pcpp::IndexIntervalType > & | LocalHaloExtents () |
const std::vector< pcpp::IndexIntervalType > & | RemoteHaloBufferExtents () const |
const std::vector< pcpp::IndexIntervalType > & | LocalHaloBufferExtents () const |
std::vector< messagebuffers > & | CommunicationBuffers () |
const std::vector< std::vector< size_t > > & | SendIndices () const |
const std::vector< std::vector< size_t > > & | RecvIndices () const |
std::vector< int > & | PeriodicDirs () |
void | ReportSimpleBufferContents (std::ostream &outStream) |
~halo () | |
void | DestroyAll () |
Public Attributes | |
int | numStateComponents |
int | numStateFields |
std::vector< int > | stateFieldIndices |
std::vector< int > | numFieldComponents |
Protected Attributes | |
bool | ownSendBuffers |
bool | ownRecvBuffers |
bool | ownHaloBuffers |
bool | haveRecvData |
bool | haveSendData |
bool | doFill |
int | numThreads |
size_t | numPointsBuffer |
std::vector< int > | periodicDirs |
pcpp::IndexIntervalType | globalGridExtent |
pcpp::IndexIntervalType | globalPartitionExtent |
pcpp::IndexIntervalType | localPartitionExtent |
std::vector< size_t > | localBufferSizes |
std::vector< bool > | haveNeighbor |
std::vector< pcpp::IndexIntervalType > | remoteHaloExtents |
std::vector< pcpp::IndexIntervalType > | localHaloExtents |
std::vector< pcpp::IndexIntervalType > | localHaloBufferExtents |
std::vector< pcpp::IndexIntervalType > | remoteHaloBufferExtents |
std::vector< pcpp::IndexIntervalType > | sendExtents |
std::vector< pcpp::IndexIntervalType > | threadExtents |
std::vector< pcpp::IndexIntervalType > | threadBufferExtents |
std::vector< pcpp::RemoteCollisionType > | sendCollisions |
std::vector< std::vector< size_t > > | sendIndices |
std::vector< std::vector< std::vector< size_t > > > | threadSendIndices |
std::vector< std::vector< std::vector< size_t > > > | threadSendBufferIndices |
std::vector< pcpp::RemoteCollisionType > | recvCollisions |
std::vector< std::vector< size_t > > | recvIndices |
std::vector< std::pair< int, std::vector< size_t > > > | haloRecvIndices |
std::vector< std::vector< std::vector< size_t > > > | threadRecvIndices |
std::vector< std::vector< std::vector< size_t > > > | threadRecvBufferIndices |
std::vector< std::vector< std::vector< size_t > > > | threadHaloBufferIndices |
std::vector< messagebuffers > | communicationBuffers |
std::vector< double * > | sendBuffers |
std::vector< double * > | recvBuffers |
std::vector< std::vector< double * > > | haloBuffers |
stores the state variable values in the halo zones More... | |
|
inline |
|
inline |
int CompleteReceives | ( | CommunicatorType & | inComm | ) |
Definition at line 1536 of file State.C.
References CommunicatorObject::WaitAll().
int CompleteSimpleReceives | ( | CommunicatorType & | inComm | ) |
Definition at line 1553 of file State.C.
References CommunicatorObject::WaitAll().
Referenced by TestHaloParallel(), and TestHaloPeriodic().
void ConfigureData | ( | const state::base & | inState | ) |
Definition at line 1513 of file State.C.
References base::StateFieldIndices().
Referenced by TestHaloBasic(), TestHaloParallel(), TestHaloPeriodic(), and TestHaloThreaded().
void ConfigureData | ( | const state::base & | inState, |
const std::vector< int > & | selectFields | ||
) |
Definition at line 1519 of file State.C.
References dataset::Meta().
void ConfigureHalo | ( | const pcpp::IndexIntervalType & | partitionExtent, |
const std::vector< pcpp::IndexIntervalType > & | haloExtents, | ||
size_t | numHaloVar | ||
) |
void ConfigureHalo | ( | const pcpp::IndexIntervalType & | globalExtent, |
const pcpp::IndexIntervalType & | partitionExtent, | ||
const std::vector< pcpp::IndexIntervalType > & | haloExtents | ||
) |
void ConfigureHalo | ( | const pcpp::IndexIntervalType & | globalExtent, |
const pcpp::IndexIntervalType & | partitionExtent | ||
) |
void CreateHaloBuffers | ( | ) |
Definition at line 238 of file State.C.
References sizeextent::NNodes().
Referenced by TestHaloBasic(), TestHaloParallel(), TestHaloPeriodic(), and TestHaloThreaded().
std::vector< pcpp::IndexIntervalType > CreateLocalHaloExtents | ( | const pcpp::IndexIntervalType & | globalExtent, |
const pcpp::IndexIntervalType & | partitionExtent, | ||
std::vector< size_t > & | haloSizes | ||
) |
Definition at line 155 of file State.C.
Referenced by TestHaloBasic(), TestHaloParallel(), TestHaloPeriodic(), and TestHaloThreaded().
std::vector< pcpp::IndexIntervalType > CreateLocalHaloExtents | ( | std::vector< size_t > & | haloSizes | ) |
int CreateMessageBuffers | ( | int | numComponents | ) |
Definition at line 633 of file State.C.
References numComponents, halo::messagebuffers::numComponents, halo::messagebuffers::numPointsRecv, halo::messagebuffers::numPointsSend, halo::messagebuffers::recvBuffers, and halo::messagebuffers::sendBuffers.
int CreateRecvBuffers | ( | const std::vector< pcpp::RemoteCollisionType > & | inCollisions | ) |
Create receive buffers for state data from neighboring processors.
inCollisions | Must have extents wrt global indexing |
Definition at line 504 of file State.C.
References sizeextent::GetFlatIndices(), sizeextent::NNodes(), and sizeextent::Overlap().
std::vector< pcpp::IndexIntervalType > CreateRemoteHaloExtents | ( | const pcpp::IndexIntervalType & | globalExtent, |
const pcpp::IndexIntervalType & | partitionExtent, | ||
std::vector< size_t > & | haloSizes | ||
) |
Definition at line 78 of file State.C.
Referenced by TestHaloBasic(), TestHaloParallel(), TestHaloPeriodic(), and TestHaloThreaded().
std::vector< pcpp::IndexIntervalType > CreateRemoteHaloExtents | ( | std::vector< size_t > & | haloSizes | ) |
int CreateSendBuffers | ( | const std::vector< pcpp::RemoteCollisionType > & | inCollisions | ) |
int CreateSimpleRecvBuffers | ( | ) |
Create receive buffers for state data from neighboring processors.
inCollisions | Must have extents wrt global indexing |
Definition at line 554 of file State.C.
References sizeextent::GetFlatIndices(), and sizeextent::InitSimple().
Referenced by TestHaloBasic(), TestHaloParallel(), TestHaloPeriodic(), and TestHaloThreaded().
int CreateSimpleRecvIndices | ( | ) |
Definition at line 601 of file State.C.
References sizeextent::GetFlatIndices(), and sizeextent::InitSimple().
int CreateSimpleSendBuffers | ( | ) |
Creates send buffers for each whole local halo extent.
Definition at line 347 of file State.C.
References bufferInterval, sizeextent::GetFlatIndices(), and sizeextent::InitSimple().
Referenced by TestHaloBasic(), TestHaloParallel(), TestHaloPeriodic(), and TestHaloThreaded().
int CreateSimpleSendIndices | ( | ) |
Creates the flat buffer indices for each whole local halo extent.
Definition at line 305 of file State.C.
References bufferInterval, sizeextent::GetFlatIndices(), and sizeextent::InitSimple().
int CreateThreadRecvIndices | ( | int | threadId | ) |
Create receive buffers for state data from neighboring processors.
inCollisions | Must have extents wrt global indexing |
Definition at line 826 of file State.C.
References sizeextent::GetFlatIndices(), sizeextent::InitSimple(), sizeextent::NNodes(), numComponents, and sizeextent::Overlap().
Referenced by TestHaloThreaded().
int CreateThreadSendIndices | ( | int | threadId | ) |
Creates send buffers for each whole local halo extent.
Definition at line 397 of file State.C.
References bufferInterval, sizeextent::GetFlatIndices(), sizeextent::InitSimple(), sizeextent::NNodes(), and sizeextent::Overlap().
Referenced by TestHaloThreaded().
|
inline |
Definition at line 623 of file State.H.
Referenced by TestHaloBasic(), TestHaloParallel(), and TestHaloThreaded().
|
inline |
|
inline |
Definition at line 609 of file State.H.
Referenced by TestHaloBasic(), TestHaloParallel(), TestHaloPeriodic(), and TestHaloThreaded().
|
inline |
|
inline |
|
inline |
Definition at line 626 of file State.H.
Referenced by TestHaloBasic(), and TestHaloParallel().
|
inline |
Definition at line 542 of file State.H.
Referenced by TestHaloThreaded().
int PackMessageBuffers | ( | const int | messageId, |
const int | componentId, | ||
const int | numComponents, | ||
const double * | sourceBuffer | ||
) |
Pack generic send buffers for specified message.
For the message specified by messageId, pack a message starting at componentId, and packing numComponents components from the data contained in sourceBuffer. The sourceBuffer is assumed to have a size indicated by the numPointsBuffer, which came from bufferSizes - both member data. The specific source buffer indices are pulled from member data item sendIndices, which must have been setup already by calling CreateSimpleSendIndices.
Definition at line 666 of file State.C.
References numComponents, and numPointsBuffer.
int PackMessageBuffers | ( | const int | messageId, |
const int | componentId, | ||
const int | numComponents, | ||
const double * | sourceBuffer, | ||
const int | threadId | ||
) |
Pack generic send buffers for specified message.
For the message specified by messageId, pack a message starting at componentId, and packing numComponents components from the data contained in sourceBuffer. The sourceBuffer is assumed to have a size indicated by the numPointsBuffer, which came from bufferSizes - both member data. The specific source buffer indices are pulled from member data item sendIndices, which must have been setup already by calling CreateSimpleSendIndices.
Definition at line 697 of file State.C.
References numComponents, and numPointsBuffer.
int PackSendBuffers | ( | const state::base & | inState | ) |
Packs a send buffer with all components of state fields.
Definition at line 1070 of file State.C.
References databuffer::Data(), dataset::Data(), dataset::Meta(), metadata::ncomp, databuffer::NItems(), numComponents, and base::StateFieldIndices().
int PackSimpleSendBuffers | ( | const state::base & | inX, |
int | threadId | ||
) |
Packs a send buffer with all components of state fields.
Definition at line 1301 of file State.C.
References databuffer::Data(), dataset::Data(), dataset::Meta(), metadata::ncomp, databuffer::NItems(), and numComponents.
Referenced by TestHaloBasic(), TestHaloParallel(), TestHaloPeriodic(), and TestHaloThreaded().
int PackSimpleSendBuffers | ( | const state::base & | inState | ) |
Packs a send buffer with all components of state fields.
Definition at line 1254 of file State.C.
References databuffer::Data(), dataset::Data(), dataset::Meta(), metadata::ncomp, databuffer::NItems(), and numComponents.
int PackSimpleSendBuffers | ( | double | inA, |
const state::base & | inX, | ||
const state::base & | inY | ||
) |
Packs a send buffer with all components of state fields.
Packs a send buffer with all components of state fields
Definition at line 1204 of file State.C.
References databuffer::Data(), dataset::Data(), dataset::Meta(), metadata::ncomp, databuffer::NItems(), and numComponents.
|
inline |
Definition at line 624 of file State.H.
Referenced by TestHaloBasic(), TestHaloParallel(), and TestHaloThreaded().
int PostReceives | ( | CommunicatorType & | inComm | ) |
Definition at line 1432 of file State.C.
References CommunicatorObject::ARecvBuf(), CommunicatorObject::NProc(), and numPoints.
int PostSimpleReceives | ( | std::vector< int > & | sourceRanks, |
CommunicatorType & | inComm | ||
) |
Definition at line 1456 of file State.C.
References CommunicatorObject::ARecvBuf(), and numPoints.
Referenced by TestHaloParallel(), and TestHaloPeriodic().
int ReceiveMessage | ( | const int | messageId, |
const std::vector< int > & | neighborRanks, | ||
CommunicatorType & | inComm | ||
) |
Definition at line 742 of file State.C.
References CommunicatorObject::ARecvBuf(), numComponents, and CommunicatorObject::WaitAll().
|
inline |
Definition at line 607 of file State.H.
Referenced by TestHaloBasic(), TestHaloParallel(), TestHaloPeriodic(), and TestHaloThreaded().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 625 of file State.H.
Referenced by TestHaloBasic(), and TestHaloParallel().
void ReportSimpleBufferContents | ( | std::ostream & | outStream | ) |
Definition at line 1565 of file State.C.
References sizeextent::NNodes(), and pcpp::report::StructuredBufferContents().
int Send | ( | CommunicatorType & | inComm | ) |
Packs a send buffer with all components of state fields.
Definition at line 1408 of file State.C.
References CommunicatorObject::ASendBuf(), CommunicatorObject::NProc(), and numPoints.
|
inline |
Definition at line 611 of file State.H.
Referenced by TestHaloBasic(), TestHaloParallel(), TestHaloPeriodic(), and TestHaloThreaded().
|
inline |
|
inline |
int SendMessage | ( | const int | messageId, |
const std::vector< int > & | neighborRanks, | ||
CommunicatorType & | inComm | ||
) |
Definition at line 722 of file State.C.
References CommunicatorObject::ASendBuf(), and numComponents.
|
inline |
|
inline |
Definition at line 447 of file State.H.
References numPointsBuffer.
|
inline |
Definition at line 545 of file State.H.
References sizeextent::Copy(), and numComponents.
Referenced by TestHaloBasic(), TestHaloParallel(), TestHaloPeriodic(), and TestHaloThreaded().
|
inline |
|
inline |
Definition at line 604 of file State.H.
Referenced by TestHaloPeriodic().
|
inline |
Definition at line 531 of file State.H.
Referenced by TestHaloThreaded().
|
inline |
|
inline |
Definition at line 485 of file State.H.
References sizeextent::Copy(), and sizeextent::NNodes().
Referenced by TestHaloBasic(), TestHaloParallel(), TestHaloPeriodic(), and TestHaloThreaded().
|
inline |
Definition at line 514 of file State.H.
Referenced by TestHaloThreaded().
int SimpleSend | ( | std::vector< int > & | neighborRanks, |
CommunicatorType & | inComm | ||
) |
Definition at line 1115 of file State.C.
References CommunicatorObject::ASendBuf(), sizeextent::NNodes(), and numPoints.
Referenced by TestHaloParallel(), and TestHaloPeriodic().
|
inline |
Definition at line 622 of file State.H.
Referenced by TestHaloBasic(), and TestHaloParallel().
|
inline |
Definition at line 621 of file State.H.
Referenced by TestHaloThreaded().
int UnPackMessageBuffers | ( | const int | messageId, |
const int | componentId, | ||
const int | numComponents, | ||
double * | targetBuffer | ||
) |
Unpack generic recv buffers for specified message.
For the message specified by messageId, unpack a message starting at componentId, and unpacking numComponents components from the data contained in the message receive buffers into the targetBuffer. The targetBuffer is assumed to have a size indicated by the numPointsBuffer, which came from bufferSizes - both member data. The specific target buffer indices are pulled from member data item recvIndices, which must have been setup already by calling CreateSimpleRecvIndices.
Definition at line 777 of file State.C.
References numComponents, and numPointsBuffer.
int UnPackMessageBuffers | ( | const int | messageId, |
const int | componentId, | ||
const int | numComponents, | ||
double * | targetBuffer, | ||
const int | threadId | ||
) |
Definition at line 798 of file State.C.
References numComponents, and numPointsBuffer.
int UnpackReceiveBuffers | ( | ) |
Definition at line 926 of file State.C.
References numComponents.
Referenced by TestHaloBasic().
int UnpackSimpleRecvBuffers | ( | int | threadId | ) |
Definition at line 1009 of file State.C.
References numComponents.
Referenced by TestHaloThreaded().
int UnpackSimpleRecvBuffers | ( | ) |
Definition at line 963 of file State.C.
References numComponents.
int Wait | ( | CommunicatorType & | inComm | ) |
Definition at line 1545 of file State.C.
References CommunicatorObject::WaitAll().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
std::vector<int> numFieldComponents |
Definition at line 429 of file State.H.
Referenced by TestHaloBasic(), and TestHaloThreaded().
int numStateComponents |
Definition at line 424 of file State.H.
Referenced by TestHaloBasic(), TestHaloParallel(), TestHaloPeriodic(), and TestHaloThreaded().
int numStateFields |
Definition at line 425 of file State.H.
Referenced by TestHaloBasic(), TestHaloParallel(), and TestHaloThreaded().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |