MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TgtInfo Class Reference

#include <PostMaster.h>

+ Collaboration diagram for TgtInfo:

Public Member Functions

unsigned int bindIndex () const
 
unsigned int dataSize () const
 
Eref eref () const
 
void set (ObjId id, unsigned int bindIndex, unsigned int size)
 
 TgtInfo ()
 

Static Public Attributes

static const unsigned int headerSize
 

Private Attributes

unsigned int bindIndex_
 
unsigned int dataSize_
 
ObjId id_
 

Detailed Description

This is how internode message passing works. I'll describe this at two levels: the movement of data, and then the setup.

Level 1: Movement of data.

  1. Object Sender sends out an argument A in a regular message.
  2. The SrcFinfo scans through targets in the MsgDigest via func,tgt pairs
  3. The off-node (Func,tgt-Eref) pair holds a HopFunc and a special Eref. The main part of the Eref is the originating object. The FieldIndex of the Eref is the target node.
  4. The HopFunc fills in the Send buffer of the postmaster. It uses the target node info, stuffs in the ObjId of the originating object, and converts and stuffs each of the arguments using Conv< A >. Thus the Send buffer contents are a header with TgtInfo, and then the actual arguments.
  5. This happens for all outgoing messages this cycle.
  6. Postmaster sends out buffers in process. It then waits for incoming stuff in the recvBufs.
  7. The scene now shifts to the PostMaster on the remote node. In its 'process', the clearPending call is executed. It looks at the recvBuf and extracts the tgtInfo. This tells it what the originating object was, and what SrcFinfo to use for the outgoing message. !!!! fixme (Currently I use BindIndex which ought to be right but is done very indirectly. I need to check.)
  8. we call the SrcFinfo::sendBuffer call from the originating object. The sendBuffer call converts the arguments back from the bufer to their native form and despatches using the regular messaging. Note that the MsgDigest will have done the right thing here to set up the regular messaging even for off-node DataIndices on this element.
  9. Messages reach their targets.

Level 2. Setup.

  1. Objects and messages set up the regular way. Objects may have subsets of their Data arrays placed on different nodes. Messages are globals, their contents are replicated on every node.
  2. When a SrcFinfo::send call is about to execute for the first time, it is digested: Element::digestMessages. During this step each of the messages is expanded by putTargetsInDigeest into target Erefs.
  3. The target Erefs are inspected in filterOffNodeTargets. Off-node targets are removed, and we record each pair of Source DataId and node.
  4. We now call putOffNodeTargetsInDigest. This generates the HopFunc by calling OpFunc::makeHopFunc with the fid of the SrcFinfo.
  5. putOffNodeTargetsInDigest then examines the Source/Node pairs and creates HopFunc/Eref pairs which are stuffed into the msgDigest. Note that these Erefs are the hacked version where the Eref specifies the originating object, plus using its FieldIndex to specify the target node.

Possible optimization here would be to have a sendToAll buffer that was filled when the digestMessages detected that a majority of target nodes received a given message. A setup time complication, not a runtime problem.

Definition at line 72 of file PostMaster.h.

Constructor & Destructor Documentation

TgtInfo::TgtInfo ( )
inline

Definition at line 74 of file PostMaster.h.

75  : id_(),
76  bindIndex_( 0 ), dataSize_( 0 )
77  {;}
unsigned int dataSize_
Definition: PostMaster.h:101
ObjId id_
Definition: PostMaster.h:99
unsigned int bindIndex_
Definition: PostMaster.h:100

Member Function Documentation

unsigned int TgtInfo::bindIndex ( ) const
inline

Definition at line 93 of file PostMaster.h.

References bindIndex_.

Referenced by PostMaster::clearPendingRecv(), PostMaster::clearPendingSetGet(), set(), and testHopFunc().

93  {
94  return bindIndex_;
95  }
unsigned int bindIndex_
Definition: PostMaster.h:100

+ Here is the caller graph for this function:

unsigned int TgtInfo::dataSize ( ) const
inline

Definition at line 89 of file PostMaster.h.

References dataSize_.

Referenced by PostMaster::clearPendingRecv(), PostMaster::clearPendingSetGet(), and testHopFunc().

89  {
90  return dataSize_;
91  }
unsigned int dataSize_
Definition: PostMaster.h:101

+ Here is the caller graph for this function:

Eref TgtInfo::eref ( ) const
inline

Definition at line 79 of file PostMaster.h.

References ObjId::eref(), and id_.

Referenced by PostMaster::clearPendingRecv(), and PostMaster::clearPendingSetGet().

79  {
80  return Eref( id_.eref() );
81  }
ObjId id_
Definition: PostMaster.h:99
Definition: Eref.h:26
Eref eref() const
Definition: ObjId.cpp:66

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void TgtInfo::set ( ObjId  id,
unsigned int  bindIndex,
unsigned int  size 
)
inline

Definition at line 83 of file PostMaster.h.

References bindIndex(), bindIndex_, dataSize_, id, and id_.

Referenced by PostMaster::addToSendBuf(), PostMaster::addToSetBuf(), addToTestBuf(), PostMaster::remoteFieldGetVec(), PostMaster::remoteGet(), and PostMaster::remoteGetVec().

83  {
84  id_ = id;
86  dataSize_ = size;
87  }
unsigned int dataSize_
Definition: PostMaster.h:101
ObjId id_
Definition: PostMaster.h:99
unsigned int bindIndex() const
Definition: PostMaster.h:93
unsigned int bindIndex_
Definition: PostMaster.h:100
static char id[]
Definition: mfield.cpp:404

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

unsigned int TgtInfo::bindIndex_
private

Definition at line 100 of file PostMaster.h.

Referenced by bindIndex(), and set().

unsigned int TgtInfo::dataSize_
private

Definition at line 101 of file PostMaster.h.

Referenced by dataSize(), and set().

ObjId TgtInfo::id_
private

Definition at line 99 of file PostMaster.h.

Referenced by eref(), and set().


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