MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <PostMaster.h>
Public Member Functions | |
double * | addToSendBuf (const Eref &e, unsigned int bindIndex, unsigned int size) |
Returns pointer to Send buffer for filling in arguments. More... | |
double * | addToSetBuf (const Eref &e, unsigned int opIndex, unsigned int size, unsigned int hopType) |
Returns pointer to Set buffer for filling in arguments. More... | |
void | clearPending () |
All arrived messages and set calls are handled and cleared. More... | |
void | clearPendingRecv () |
Clears arrived messages. More... | |
void | clearPendingSetGet () |
Clears arrived set and get calls. More... | |
void | dispatchSetBuf (const Eref &e) |
Sends off contets of Set buffer. More... | |
void | finalizeSends () |
Checks that all sends have gone out. More... | |
unsigned int | getBufferSize () const |
unsigned int | getMyNode () const |
unsigned int | getNumNodes () const |
void | handleRemoteGet (const Eref &e, const OpFunc *op, int requestingNode) |
Handles 'get' calls from another node, to an object on mynode. More... | |
void | handleRemoteGetVec (const Eref &e, const OpFunc *op, int requestingNode) |
PostMaster () | |
void | process (const Eref &e, ProcPtr p) |
void | reinit (const Eref &e, ProcPtr p) |
void | remoteFieldGetVec (const Eref &e, unsigned int bindIndex, vector< double > &getRecvBuf) |
This is a blocking call. However, it must still handle other. More... | |
double * | remoteGet (const Eref &e, unsigned int bindIndex) |
Blocking call to get a value from a remote node. More... | |
void | remoteGetVec (const Eref &e, unsigned int bindIndex, vector< vector< double > > &getRecvBuf, vector< unsigned int > &size) |
This is a blocking call. However, it must still handle other. More... | |
void | setBufferSize (unsigned int size) |
Static Public Member Functions | |
static const Cinfo * | initCinfo () |
Static Public Attributes | |
static const int | CONTROLTAG = 5 |
static const int | DIETAG = 100 |
static const int | GETTAG = 3 |
static const int | MSGTAG = 1 |
static const unsigned int | reserveBufSize = 1048576 |
static const int | RETURNTAG = 4 |
static const unsigned int | setRecvBufSize = 1048576 |
static const int | SETTAG = 2 |
Private Attributes | |
vector< int > | doneIndices_ |
vector< double > | getHandlerBuf_ |
int | isSetRecv_ |
int | isSetSent_ |
unsigned int | numRecvDone_ |
vector< vector< double > > | recvBuf_ |
unsigned int | recvBufSize_ |
vector< vector< double > > | sendBuf_ |
vector< unsigned int > | sendSize_ |
vector< double > | setRecvBuf_ |
vector< double > | setSendBuf_ |
int | setSendSize_ |
Definition at line 104 of file PostMaster.h.
PostMaster::PostMaster | ( | ) |
Definition at line 25 of file PostMaster.cpp.
References getHandlerBuf_, GETTAG, TgtInfo::headerSize, MSGTAG, Shell::myNode(), Shell::numNodes(), recvBuf_, recvBufSize_, reserveBufSize, sendBuf_, setRecvBuf_, setRecvBufSize, and SETTAG.
double * PostMaster::addToSendBuf | ( | const Eref & | e, |
unsigned int | bindIndex, | ||
unsigned int | size | ||
) |
Returns pointer to Send buffer for filling in arguments.
Definition at line 442 of file PostMaster.cpp.
References Eref::fieldIndex(), TgtInfo::headerSize, Shell::myNode(), Eref::objId(), recvBufSize_, sendBuf_, sendSize_, and TgtInfo::set().
Referenced by addToBuf().
double * PostMaster::addToSetBuf | ( | const Eref & | e, |
unsigned int | opIndex, | ||
unsigned int | size, | ||
unsigned int | hopType | ||
) |
Returns pointer to Set buffer for filling in arguments.
Definition at line 463 of file PostMaster.cpp.
References clearPending(), TgtInfo::headerSize, isSetSent_, Shell::myNode(), Eref::objId(), TgtInfo::set(), setRecvBufSize, setSendBuf_, and setSendSize_.
Referenced by addToBuf().
void PostMaster::clearPending | ( | ) |
All arrived messages and set calls are handled and cleared.
Definition at line 215 of file PostMaster.cpp.
References clearPendingRecv(), clearPendingSetGet(), and Shell::numNodes().
Referenced by addToSetBuf(), main(), process(), reinit(), remoteFieldGetVec(), remoteGet(), and remoteGetVec().
void PostMaster::clearPendingRecv | ( | ) |
Clears arrived messages.
Definition at line 383 of file PostMaster.cpp.
References TgtInfo::bindIndex(), Element::cinfo(), Eref::dataIndex(), TgtInfo::dataSize(), doneIndices_, Eref::element(), TgtInfo::eref(), Cinfo::getSrcFinfo(), TgtInfo::headerSize, MSGTAG, Shell::myNode(), Shell::numNodes(), numRecvDone_, recvBuf_, recvBufSize_, and SrcFinfo::sendBuffer().
Referenced by clearPending().
void PostMaster::clearPendingSetGet | ( | ) |
Clears arrived set and get calls.
Definition at line 299 of file PostMaster.cpp.
References TgtInfo::bindIndex(), TgtInfo::dataSize(), TgtInfo::eref(), handleRemoteGet(), handleRemoteGetVec(), TgtInfo::headerSize, isSetRecv_, isSetSent_, OpFunc::lookop(), MooseGetHop, MooseGetVecHop, MooseSetHop, MooseSetVecHop, op(), OpFunc::opBuffer(), OpFunc::opVecBuffer(), setRecvBuf_, setRecvBufSize, and SETTAG.
Referenced by addToBuf(), and clearPending().
void PostMaster::dispatchSetBuf | ( | const Eref & | e | ) |
Sends off contets of Set buffer.
Definition at line 487 of file PostMaster.cpp.
References Eref::element(), Eref::getNode(), Element::isGlobal(), Shell::myNode(), Shell::numNodes(), setSendBuf_, setSendSize_, and SETTAG.
Referenced by dispatchBuffers().
void PostMaster::finalizeSends | ( | ) |
Checks that all sends have gone out.
Finalize all outgoing messages, clear the sendSize vector so that we can handle another round of messages.
Definition at line 147 of file PostMaster.cpp.
References Shell::numNodes(), and sendSize_.
Referenced by process(), and reinit().
unsigned int PostMaster::getBufferSize | ( | ) | const |
Definition at line 714 of file PostMaster.cpp.
References sendBuf_.
Referenced by initCinfo().
unsigned int PostMaster::getMyNode | ( | ) | const |
Definition at line 709 of file PostMaster.cpp.
References Shell::myNode().
Referenced by initCinfo().
unsigned int PostMaster::getNumNodes | ( | ) | const |
Definition at line 704 of file PostMaster.cpp.
References Shell::numNodes().
Referenced by initCinfo().
Handles 'get' calls from another node, to an object on mynode.
Definition at line 223 of file PostMaster.cpp.
References OpFunc::opBuffer(), reserveBufSize, and RETURNTAG.
Referenced by clearPendingSetGet().
Definition at line 284 of file PostMaster.cpp.
References innerGetVec(), reserveBufSize, and RETURNTAG.
Referenced by clearPendingSetGet().
|
static |
Definition at line 82 of file PostMaster.cpp.
References getBufferSize(), getMyNode(), getNumNodes(), Neutral::initCinfo(), myNode, numNodes, process(), reinit(), and setBufferSize().
Referenced by init().
Definition at line 190 of file PostMaster.cpp.
References clearPending(), finalizeSends(), MSGTAG, Shell::myNode(), Shell::numNodes(), numRecvDone_, sendBuf_, and sendSize_.
Referenced by initCinfo().
PostMaster class: handles cross-node messaging using MPI. Identical to the Process call: sends out what needs to go, and then waits for any incoming messages and passes them on.
Definition at line 164 of file PostMaster.cpp.
References clearPending(), finalizeSends(), MSGTAG, Shell::myNode(), Shell::numNodes(), numRecvDone_, sendBuf_, and sendSize_.
Referenced by initCinfo().
void PostMaster::remoteFieldGetVec | ( | const Eref & | e, |
unsigned int | bindIndex, | ||
vector< double > & | getRecvBuf | ||
) |
This is a blocking call. However, it must still handle other.
Definition at line 568 of file PostMaster.cpp.
References clearPending(), Eref::element(), Eref::getNode(), TgtInfo::headerSize, Element::isGlobal(), isSetSent_, MooseGetVecHop, Shell::myNode(), Eref::objId(), reserveBufSize, RETURNTAG, TgtInfo::set(), and SETTAG.
Referenced by remoteFieldGetVec().
double * PostMaster::remoteGet | ( | const Eref & | e, |
unsigned int | bindIndex | ||
) |
Blocking call to get a value from a remote node.
This is a blocking call. However, it must not block other requests.
Definition at line 520 of file PostMaster.cpp.
References clearPending(), Eref::element(), Eref::getNode(), TgtInfo::headerSize, Element::isGlobal(), isSetSent_, MooseGetHop, Shell::myNode(), Eref::objId(), RETURNTAG, TgtInfo::set(), setRecvBufSize, and SETTAG.
Referenced by remoteGet().
void PostMaster::remoteGetVec | ( | const Eref & | e, |
unsigned int | bindIndex, | ||
vector< vector< double > > & | getRecvBuf, | ||
vector< unsigned int > & | size | ||
) |
This is a blocking call. However, it must still handle other.
Definition at line 623 of file PostMaster.cpp.
References clearPending(), Eref::element(), TgtInfo::headerSize, Element::isGlobal(), isSetSent_, MooseGetVecHop, Shell::myNode(), Shell::numNodes(), Eref::objId(), reserveBufSize, RETURNTAG, TgtInfo::set(), and SETTAG.
Referenced by remoteGetVec().
void PostMaster::setBufferSize | ( | unsigned int | size | ) |
Definition at line 722 of file PostMaster.cpp.
References resize(), and sendBuf_.
Referenced by initCinfo().
|
static |
Definition at line 153 of file PostMaster.h.
|
static |
Definition at line 154 of file PostMaster.h.
|
private |
Definition at line 175 of file PostMaster.h.
Referenced by clearPendingRecv().
|
private |
Definition at line 164 of file PostMaster.h.
Referenced by PostMaster().
|
static |
Definition at line 151 of file PostMaster.h.
Referenced by PostMaster().
|
private |
Definition at line 177 of file PostMaster.h.
Referenced by clearPendingSetGet().
|
private |
Definition at line 176 of file PostMaster.h.
Referenced by addToSetBuf(), clearPendingSetGet(), remoteFieldGetVec(), remoteGet(), and remoteGetVec().
|
static |
Definition at line 149 of file PostMaster.h.
Referenced by clearPendingRecv(), PostMaster(), process(), and reinit().
|
private |
Definition at line 179 of file PostMaster.h.
Referenced by clearPendingRecv(), process(), and reinit().
|
private |
Definition at line 162 of file PostMaster.h.
Referenced by clearPendingRecv(), and PostMaster().
|
private |
Definition at line 157 of file PostMaster.h.
Referenced by addToSendBuf(), clearPendingRecv(), and PostMaster().
|
static |
Definition at line 147 of file PostMaster.h.
Referenced by handleRemoteGet(), handleRemoteGetVec(), innerGetVec(), PostMaster(), remoteFieldGetVec(), and remoteGetVec().
|
static |
Definition at line 152 of file PostMaster.h.
Referenced by handleRemoteGet(), handleRemoteGetVec(), remoteFieldGetVec(), remoteGet(), and remoteGetVec().
|
private |
Definition at line 161 of file PostMaster.h.
Referenced by addToSendBuf(), getBufferSize(), PostMaster(), process(), reinit(), and setBufferSize().
|
private |
Definition at line 163 of file PostMaster.h.
Referenced by addToSendBuf(), finalizeSends(), process(), and reinit().
|
private |
Definition at line 160 of file PostMaster.h.
Referenced by clearPendingSetGet(), and PostMaster().
|
static |
Definition at line 148 of file PostMaster.h.
Referenced by addToSetBuf(), clearPendingSetGet(), PostMaster(), and remoteGet().
|
private |
Definition at line 159 of file PostMaster.h.
Referenced by addToSetBuf(), and dispatchSetBuf().
|
private |
Definition at line 178 of file PostMaster.h.
Referenced by addToSetBuf(), and dispatchSetBuf().
|
static |
Definition at line 150 of file PostMaster.h.
Referenced by clearPendingSetGet(), dispatchSetBuf(), PostMaster(), remoteFieldGetVec(), remoteGet(), and remoteGetVec().