#include <cklocation.h>
Public Types | |
typedef std::unordered_map < CkArrayID, CkArray *, ArrayIDHasher > | ArrayIdMap |
typedef std::unordered_map < CmiUInt8, int > | IdPeMap |
typedef std::unordered_map < CmiUInt8, std::vector < CkArrayMessage * > > | MsgBuffer |
typedef std::unordered_map < CkArrayIndex, std::vector < CkArrayMessage * > , IndexHasher > | IndexMsgBuffer |
typedef std::unordered_map < CkArrayIndex, std::vector < std::pair< int, bool > >, IndexHasher > | LocationRequestBuffer |
typedef std::unordered_map < CkArrayIndex, CmiUInt8, IndexHasher > | IdxIdMap |
typedef std::unordered_map < CmiUInt8, CkLocRec * > | LocRecHash |
Public Member Functions | |
CkLocMgr (CkArrayOptions opts) | |
CkLocMgr (CkMigrateMessage *m) | |
~CkLocMgr () | |
bool | isLocMgr (void) |
CkGroupID & | getGroupID (void) |
CProxy_CkLocMgr & | getProxy (void) |
CProxyElement_CkLocMgr & | getLocalProxy (void) |
int | homePe (const CkArrayIndex &idx) const |
Home mapping. | |
int | homePe (const CmiUInt8 id) const |
int | procNum (const CkArrayIndex &idx) const |
bool | isHome (const CkArrayIndex &idx) const |
int | whichPE (const CkArrayIndex &idx) const |
int | whichPE (const CmiUInt8 id) const |
int | lastKnown (const CkArrayIndex &idx) |
Return the "last-known" location (returns a processor number). | |
int | lastKnown (CmiUInt8 id) |
void | insertID (const CkArrayIndex &idx, const CmiUInt8 id) |
CmiUInt8 | lookupID (const CkArrayIndex &idx) const |
bool | lookupID (const CkArrayIndex &idx, CmiUInt8 &id) const |
CkArrayIndex | lookupIdx (const CmiUInt8 &id) const |
CkLocRec * | elementRec (const CkArrayIndex &idx) |
CkLocRec * | elementNrec (const CmiUInt8 id) |
bool | isRemote (const CkArrayIndex &idx, int *onPe) const |
Return true if this array element lives on another processor. | |
void | setDuringMigration (bool _duringMigration) |
void | setDuringDestruction (bool _duringDestruction) |
void | iterate (CkLocIterator &dest) |
Pass each of our locations (each separate array index) to this destination. | |
void | restore (const CkArrayIndex &idx, CmiUInt8 id, PUP::er &p) |
Insert and unpack this array element from this checkpoint (e.g., from CkLocation::pup), skip listeners. | |
void | resume (const CkArrayIndex &idx, CmiUInt8 id, PUP::er &p, bool create, int dummy=0) |
Insert and unpack this array element from this checkpoint (e.g., from CkLocation::pup). | |
void | resume (const CkArrayIndex &idx, CmiUInt8 id, PUP::er &p, bool notify=true, bool=false) |
void | addManager (CkArrayID aid, CkArray *mgr) |
Add a new local array manager to our list. | |
void | deleteManager (CkArrayID aid, CkArray *mgr) |
void | populateInitial (CkArrayOptions &options, void *initMsg, CkArray *mgr) |
Populate this array with initial elements and store CkArrayOptions to the underlying map. | |
bool | addElement (CkArrayID aid, const CkArrayIndex &idx, CkMigratable *elt, int ctorIdx, void *ctorMsg) |
Add a new local array element, calling element's constructor Returns true if the element was successfully added; false if the element migrated away or deleted itself. | |
void | doneInserting (void) |
Done inserting elements for now. | |
void | startInserting (void) |
unsigned int | numLocalElements () |
int | deliverMsg (CkArrayMessage *m, CkArrayID mgr, CmiUInt8 id, const CkArrayIndex *idx, CkDeliver_t type, int opts=0) |
Deliver message to this element:. | |
void | sendMsg (CkArrayMessage *msg, CkArrayID mgr, const CkArrayIndex &idx, CkDeliver_t type, int opts) |
void | inform (const CkArrayIndex &idx, CmiUInt8 id, int nowOnPe) |
This index now lives on the given processor-- update local records. | |
void | inform (CmiUInt8 id, int nowOnPe) |
void | informHome (const CkArrayIndex &idx, int nowOnPe) |
This index now lives on the given processor-- tell the home processor. | |
void | multiHop (CkArrayMessage *m) |
This message took several hops to reach us-- fix it. | |
void | emigrate (CkLocRec *rec, int toPe) |
Migrate this local element away to another processor. | |
void | informLBPeriod (CkLocRec *rec, int lb_ideal_period) |
void | metaLBCallLB (CkLocRec *rec) |
LBDatabase * | getLBDB (void) const |
MetaBalancer * | getMetaBalancer (void) const |
const LDOMHandle & | getOMHandle (void) const |
void | reclaim (CkLocRec *rec) |
bool | demandCreateElement (CkArrayMessage *msg, const CkArrayIndex &idx, int onPe, CkDeliver_t type) |
void | demandCreateElement (const CkArrayIndex &idx, int chareType, int onPe, CkArrayID mgr) |
void | immigrate (CkArrayElementMigrateMessage *msg) |
Migrating array element is arriving on this processor. | |
void | requestLocation (const CkArrayIndex &idx, int peToTell, bool suppressIfHere, int ifNonExistent, int chareType, CkArrayID mgr) |
void | requestLocation (CmiUInt8 id, int peToTell, bool suppressIfHere) |
void | updateLocation (const CkArrayIndex &idx, CmiUInt8 id, int nowOnPe) |
void | updateLocation (CmiUInt8 id, int nowOnPe) |
void | reclaimRemote (const CkArrayIndex &idx, int deletedOnPe) |
void | dummyAtSync (void) |
void | migratableList (CkLocRec *rec, std::vector< CkMigratable * > &list) |
return a list of migratables in this local record | |
void | flushAllRecs (void) |
void | flushLocalRecs (void) |
void | pup (PUP::er &p) |
Pack/UnPack - tell the runtime how to serialize this class's data for migration, checkpoint, etc. | |
void | callMethod (CkLocRec *rec, CkMigratable_voidfn_t fn) |
Call this member function on each element of this location:. | |
CmiUInt8 | getNewObjectID (const CkArrayIndex &idx) |
bool | addElementToRec (CkLocRec *rec, CkArray *m, CkMigratable *elt, int ctorIdx, void *ctorMsg) |
void | callForAllRecords (CkLocFn, CkArray *, void *) |
Data Fields | |
ArrayIdMap | managers |
IdPeMap | id2pe |
IdxIdMap | idx2id |
CmiUInt8 | idCounter |
MsgBuffer | bufferedMsgs |
Map idx to undelivered msgs. | |
MsgBuffer | bufferedRemoteMsgs |
MsgBuffer | bufferedShadowElemMsgs |
IndexMsgBuffer | bufferedIndexMsgs |
CProxy_CkLocMgr | thisProxy |
CProxyElement_CkLocMgr | thislocalproxy |
bool | duringMigration |
This flag is set while we delete an old copy of a migrator. | |
bool | duringDestruction |
This flag is set while we are deleting location manager. | |
int | homeElementCount |
Private Types | |
typedef void(CkMigratable::* | CkMigratable_voidfn_t )(void) |
Call this member function on each element of this location:. | |
typedef void(CkMigratable::* | CkMigratable_voidfn_arg_t )(void *) |
Private Member Functions | |
void | insertRec (CkLocRec *rec, const CmiUInt8 &id) |
void | removeFromTable (const CmiUInt8 id) |
void | pupElementsFor (PUP::er &p, CkLocRec *rec, CkElementCreation_t type, bool create=true, int dummy=0) |
void | pupElementsFor (PUP::er &p, CkLocRec *rec, CkElementCreation_t type, bool rebuild=false) |
void | callMethod (CkLocRec *rec, CkMigratable_voidfn_arg_t fn, void *) |
Call this member function on each element of this location:. | |
void | deliverUnknown (CkArrayMessage *msg, const CkArrayIndex *idx, CkDeliver_t type, int opts) |
This index is not hashed-- somehow figure out what to do. | |
void | deliverAnyBufferedMsgs (CmiUInt8, MsgBuffer &buffer) |
Deliver any buffered msgs to a newly created array element. | |
CkLocRec * | createLocal (const CkArrayIndex &idx, bool forMigration, bool ignoreArrival, bool notifyHome, int dummy=0) |
Create a new local record at this array index. | |
CkLocRec * | createLocal (const CkArrayIndex &idx, bool forMigration, bool ignoreArrival, bool notifyHome) |
void | checkInBounds (const CkArrayIndex &idx) |
void | dummyResumeFromSync (void) |
void | recvAtSync (void) |
void | initLB (CkGroupID lbdbID, CkGroupID metalbID) |
Static Private Member Functions | |
static void | staticDummyResumeFromSync (void *data) |
static void | staticRecvAtSync (void *data) |
Private Attributes | |
CkMagicNumber< CkMigratable > | magic |
LocationRequestBuffer | bufferedLocationRequests |
LocRecHash | hash |
The core of the location manager: map array index to element representative. | |
CmiImmediateLockType | hashImmLock |
CkGroupID | mapID |
int | mapHandle |
CkArrayMap * | map |
CkGroupID | lbdbID |
CkGroupID | metalbID |
ck::ArrayIndexCompressor * | compressor |
CkArrayIndex | bounds |
LBDatabase * | the_lbdb |
MetaBalancer * | the_metalb |
LDBarrierClient | dummyBarrierHandle |
LDOMHandle | myLBHandle |
LDBarrierReceiver | lbBarrierReceiver |
Friends | |
class | CkLocation |
class | ArrayElement |
class | MemElementPacker |
Knows about insertions, deletions, home processors, migration, and message forwarding.
Definition at line 282 of file cklocation.h.
typedef std::unordered_map<CkArrayID, CkArray*, ArrayIDHasher> CkLocMgr::ArrayIdMap |
Definition at line 287 of file cklocation.h.
typedef std::unordered_map<CmiUInt8, int> CkLocMgr::IdPeMap |
Definition at line 288 of file cklocation.h.
typedef std::unordered_map<CmiUInt8, std::vector<CkArrayMessage*> > CkLocMgr::MsgBuffer |
Definition at line 289 of file cklocation.h.
typedef std::unordered_map<CkArrayIndex, std::vector<CkArrayMessage *>, IndexHasher> CkLocMgr::IndexMsgBuffer |
Definition at line 290 of file cklocation.h.
typedef std::unordered_map<CkArrayIndex, std::vector<std::pair<int, bool> >, IndexHasher > CkLocMgr::LocationRequestBuffer |
Definition at line 291 of file cklocation.h.
typedef std::unordered_map<CkArrayIndex, CmiUInt8, IndexHasher> CkLocMgr::IdxIdMap |
Definition at line 292 of file cklocation.h.
typedef std::unordered_map<CmiUInt8, CkLocRec*> CkLocMgr::LocRecHash |
Definition at line 293 of file cklocation.h.
typedef void(CkMigratable::* CkLocMgr::CkMigratable_voidfn_t)(void) [private] |
Call this member function on each element of this location:.
typedef void(CkMigratable::* CkLocMgr::CkMigratable_voidfn_arg_t)(void *) [private] |
CkLocMgr::CkLocMgr | ( | CkArrayOptions | opts | ) |
Definition at line 2109 of file cklocation.C.
References _lbdb, _metalb, bounds, CkLocalBranch(), compressor, duringMigration, CkArrayOptions::getEnd(), CkArrayOptions::getMap(), hashImmLock, initLB(), lbdbID, ck::FixedArrayIndexCompressor::make(), map, mapHandle, mapID, metalbID, CkArrayMap::registerArray(), and IrrGroup::thisgroup.
CkLocMgr::CkLocMgr | ( | CkMigrateMessage * | m | ) |
CkLocMgr::~CkLocMgr | ( | ) |
Definition at line 2145 of file cklocation.C.
References CmiDestroyLock(), LBDatabase::DecreaseLocalBarrier(), dummyBarrierHandle, hashImmLock, lbBarrierReceiver, map, mapHandle, myLBHandle, LBDatabase::RemoveLocalBarrierClient(), LBDatabase::RemoveLocalBarrierReceiver(), the_lbdb, CkArrayMap::unregisterArray(), and LBDatabase::UnregisterOM().
bool CkLocMgr::isLocMgr | ( | void | ) | [inline, virtual] |
CkGroupID& CkLocMgr::getGroupID | ( | void | ) | [inline] |
Definition at line 300 of file cklocation.h.
Referenced by CkArrayOptions::bindTo(), CkLocRec::CkLocRec(), ArrayElement::init_checkpt(), ArrayElement::inmem_checkpoint(), and updateHomePE().
CProxy_CkLocMgr& CkLocMgr::getProxy | ( | void | ) | [inline] |
Definition at line 301 of file cklocation.h.
CProxyElement_CkLocMgr& CkLocMgr::getLocalProxy | ( | void | ) | [inline] |
Definition at line 302 of file cklocation.h.
int CkLocMgr::homePe | ( | const CkArrayIndex & | idx | ) | const [inline] |
Home mapping.
Definition at line 306 of file cklocation.h.
Referenced by _distributedLocationHandler(), _receiveMigrationNoticeAckHandler(), _sendBackLocationHandler(), addElement(), deliverUnknown(), demandCreateElement(), informHome(), CkMemCheckPT::isMaster(), lastKnown(), pup(), pupArrayElementsSkip(), reclaim(), sendMsg(), and updateHomePE().
Definition at line 307 of file cklocation.h.
int CkLocMgr::procNum | ( | const CkArrayIndex & | idx | ) | const [inline] |
Definition at line 313 of file cklocation.h.
bool CkLocMgr::isHome | ( | const CkArrayIndex & | idx | ) | const [inline] |
Definition at line 314 of file cklocation.h.
References Converse::CkMyPe().
int CkLocMgr::whichPE | ( | const CkArrayIndex & | idx | ) | const |
Definition at line 3294 of file cklocation.C.
References id2pe, and lookupID().
Referenced by deliverMsg(), CkArray::findInitialHostPe(), isRemote(), and lastKnown().
int CkLocMgr::lastKnown | ( | const CkArrayIndex & | idx | ) |
Return the "last-known" location (returns a processor number).
Definition at line 3311 of file cklocation.C.
References homePe(), and whichPE().
Referenced by _receiveLocationHandler(), ElementDistributor::addLocation(), deliverMsg(), pup(), requestLocation(), and sendBackImmigrantRecObjs().
Definition at line 3326 of file cklocation.C.
References homePe(), and whichPE().
void CkLocMgr::insertID | ( | const CkArrayIndex & | idx, | |
const CmiUInt8 | id | |||
) | [inline] |
Definition at line 321 of file cklocation.h.
Referenced by getNewObjectID(), immigrate(), inform(), restore(), and resume().
CmiUInt8 CkLocMgr::lookupID | ( | const CkArrayIndex & | idx | ) | const [inline] |
Definition at line 326 of file cklocation.h.
Referenced by addElementToRec(), createLocal(), elementRec(), getNewObjectID(), informHome(), CkMemCheckPT::inmem_restore(), pup(), reclaimRemote(), requestLocation(), sendMsg(), and whichPE().
Definition at line 336 of file cklocation.h.
CkArrayIndex CkLocMgr::lookupIdx | ( | const CmiUInt8 & | id | ) | const [inline] |
Definition at line 352 of file cklocation.h.
Referenced by OrbLB::work(), and BlockLB::work().
CkLocRec * CkLocMgr::elementRec | ( | const CkArrayIndex & | idx | ) |
Definition at line 3386 of file cklocation.C.
References abort_out_of_bounds(), elementNrec(), hash, and lookupID().
Referenced by _distributedLocationHandler(), and _sendBackLocationHandler().
Definition at line 3404 of file cklocation.C.
References hash.
Referenced by _receiveLocationHandler(), _verifyAckRequestHandler(), addElement(), deliverMsg(), elementRec(), insertRec(), pup(), removeFromTable(), and resume().
Return true if this array element lives on another processor.
Definition at line 3340 of file cklocation.C.
References Converse::CkMyPe(), and whichPE().
Referenced by CkArray::insertElement().
void CkLocMgr::setDuringMigration | ( | bool | _duringMigration | ) |
Definition at line 3357 of file cklocation.C.
References duringMigration.
Referenced by _verifyAckRequestHandler(), ElementDistributor::addLocation(), and sendBackImmigrantRecObjs().
void CkLocMgr::setDuringDestruction | ( | bool | _duringDestruction | ) |
Definition at line 3364 of file cklocation.C.
References duringDestruction, and managers.
Referenced by CkArray::ckDestroy().
void CkLocMgr::iterate | ( | CkLocIterator & | dest | ) |
Pass each of our locations (each separate array index) to this destination.
Iterate over our local elements:.
Definition at line 2874 of file cklocation.C.
References CkLocIterator::addLocation(), hash, and hashImmLock.
Referenced by CpdPythonGroup::buildIterator(), CkCacheManager< CkCacheKey >::cacheSync(), CkDeleteChares(), CkArrayElementRangeIterator< T >::iterate(), and numLocalElements().
Insert and unpack this array element from this checkpoint (e.g., from CkLocation::pup), skip listeners.
Definition at line 3223 of file cklocation.C.
References _BgOutOfCoreFlag, callMethod(), CkElementCreation_restore, CkMigratable::ckJustRestored(), CmiAbort(), createLocal(), insertID(), and pupElementsFor().
Referenced by CkPupArrayElementsData().
void CkLocMgr::resume | ( | const CkArrayIndex & | idx, | |
CmiUInt8 | id, | |||
PUP::er & | p, | |||
bool | create, | |||
int | dummy = 0 | |||
) |
Insert and unpack this array element from this checkpoint (e.g., from CkLocation::pup).
Definition at line 3248 of file cklocation.C.
References callMethod(), CkElementCreation_resume, CkMigratable::ckJustMigrated(), CmiAbort(), createLocal(), elementNrec(), insertID(), and pupElementsFor().
Referenced by _distributedLocationHandler(), _sendBackLocationHandler(), CkPupArrayElementsData(), CkMemCheckPT::inmem_restore(), CkMemCheckPT::isMaster(), and pupArrayElementsSkip().
void CkLocMgr::resume | ( | const CkArrayIndex & | idx, | |
CmiUInt8 | id, | |||
PUP::er & | p, | |||
bool | notify = true , |
|||
bool | rebuild = false | |||
) |
Definition at line 3269 of file cklocation.C.
References callMethod(), CkElementCreation_resume, CkMigratable::ckJustMigrated(), createLocal(), insertID(), and pupElementsFor().
Add a new local array manager to our list.
Definition at line 2230 of file cklocation.C.
References managers.
Referenced by CkArray::CkArray(), and CkArray::pup().
Definition at line 2237 of file cklocation.C.
References managers.
Referenced by CkArray::ckDestroy().
void CkLocMgr::populateInitial | ( | CkArrayOptions & | options, | |
void * | initMsg, | |||
CkArray * | mgr | |||
) | [inline] |
Populate this array with initial elements and store CkArrayOptions to the underlying map.
Definition at line 399 of file cklocation.h.
Referenced by CkArray::CkArray().
bool CkLocMgr::addElement | ( | CkArrayID | aid, | |
const CkArrayIndex & | idx, | |||
CkMigratable * | elt, | |||
int | ctorIdx, | |||
void * | ctorMsg | |||
) |
Add a new local array element, calling element's constructor Returns true if the element was successfully added; false if the element migrated away or deleted itself.
Definition at line 2337 of file cklocation.C.
References addElementToRec(), bufferedShadowElemMsgs, CkMigratable::ckFinishConstruction(), Converse::CkMyPe(), createLocal(), deliverAnyBufferedMsgs(), elementNrec(), getNewObjectID(), homePe(), idx2str(), managers, and thisProxy.
Referenced by CkArray::insertElement().
void CkLocMgr::doneInserting | ( | void | ) |
Done inserting elements for now.
Definition at line 3431 of file cklocation.C.
Referenced by pup(), and CkArray::remoteDoneInserting().
void CkLocMgr::startInserting | ( | void | ) |
Definition at line 3430 of file cklocation.C.
Referenced by CkArray::remoteBeginInserting().
unsigned int CkLocMgr::numLocalElements | ( | ) |
Definition at line 3417 of file cklocation.C.
References c, LocalElementCounter::count, and iterate().
Referenced by MeshStreamer< dtype >::init(), CProxy_ArrayBase::numLocalElements(), and pupArrayElementsSkip().
int CkLocMgr::deliverMsg | ( | CkArrayMessage * | msg, | |
CkArrayID | mgr, | |||
CmiUInt8 | id, | |||
const CkArrayIndex * | idx, | |||
CkDeliver_t | type, | |||
int | opts = 0 | |||
) |
Deliver message to this element:.
Deliver message to this element, going via the scheduler if local.
Definition at line 2589 of file cklocation.C.
References allowMessagesOnly, CkArrayMessage::array_ep(), CkArrayMessage::array_hops(), CkArrayMessage::array_ifNotThere(), bufferedShadowElemMsgs, CkArray_IfNotThere_buffer, CkArrayManagerDeliver(), CkCopyMsg(), CkDeliver_queue, Converse::CkMyPe(), LBDatabase::CollectingCommStats(), compressor, deliverUnknown(), demandCreateElement(), elementNrec(), CkLocRec::getIndex(), _ckGroupID::idx, lastKnown(), CkArray::lookup(), managers, multiHop(), myLBHandle, LBDatabase::ObjectStart(), LBDatabase::ObjectStop(), LBDatabase::RunningObject(), LBDatabase::Send(), the_lbdb, IrrGroup::thisgroup, UsrToEnv(), and whichPE().
Referenced by deliverAnyBufferedMsgs(), inform(), and sendMsg().
void CkLocMgr::sendMsg | ( | CkArrayMessage * | msg, | |
CkArrayID | mgr, | |||
const CkArrayIndex & | idx, | |||
CkDeliver_t | type, | |||
int | opts | |||
) |
Definition at line 2675 of file cklocation.C.
References _entryTable, CkArrayMessage::array_ep(), CkArrayMessage::array_ifNotThere(), bufferedIndexMsgs, checkInBounds(), CkArray_IfNotThere_buffer, CkCopyMsg(), CkDeliver_queue, CkInRestarting(), Converse::CkMyPe(), deliverMsg(), demandCreateElement(), ForArrayEltMsg, envelope::getEpIdx(), homePe(), idx2str(), lookupID(), managers, requestLocation(), envelope::setMsgtype(), envelope::setRecipientID(), thisProxy, and UsrToEnv().
This index now lives on the given processor-- update local records.
Definition at line 2462 of file cklocation.C.
References bufferedIndexMsgs, bufferedLocationRequests, bufferedMsgs, CkDeliver_queue, CkInRestarting(), Converse::CkMyPe(), Converse::CkNumPes(), deliverAnyBufferedMsgs(), deliverMsg(), envelope::getRecipientID(), id2pe, idCounter, insertID(), envelope::setRecipientID(), thisProxy, PUP::u, and UsrToEnv().
Referenced by _receiveLocationHandler(), ElementDistributor::addLocation(), createLocal(), demandCreateElement(), emigrate(), pup(), sendBackImmigrantRecObjs(), and updateLocation().
Definition at line 2508 of file cklocation.C.
References bufferedMsgs, deliverAnyBufferedMsgs(), and id2pe.
void CkLocMgr::informHome | ( | const CkArrayIndex & | idx, | |
int | nowOnPe | |||
) |
This index now lives on the given processor-- tell the home processor.
Definition at line 2246 of file cklocation.C.
References Converse::CkMyPe(), homePe(), idx2str(), lookupID(), and thisProxy.
Referenced by CkElementInformHome::addLocation(), createLocal(), and emigrate().
void CkLocMgr::multiHop | ( | CkArrayMessage * | m | ) |
This message took several hops to reach us-- fix it.
Definition at line 2822 of file cklocation.C.
References CkArrayMessage::array_element_id(), CkArrayMessage::array_getSrcPe(), CkArrayMessage::array_hops(), Converse::CkMyPe(), and thisProxy.
Referenced by deliverMsg().
Migrate this local element away to another processor.
Definition at line 3031 of file cklocation.C.
References PUP::er::becomeDeleting(), callMethod(), CkMigratable::ckAboutToMigrate(), CkElementCreation_migrate, IrrGroup::ckGetGroupID(), Converse::CkMyPe(), CmiAbort(), CmiPrintf(), duringMigration, CkLocRec::getID(), CkLocRec::getIndex(), CkArrayElementMigrateMessage::gid, idx, idx2str(), inform(), informHome(), CkLocRec::isAsyncMigrate(), CkLocRec::isBounced(), CkMigratable::isInCore, managers, max(), msg, p, CkArrayElementMigrateMessage::packData, CkMigratable::prefetchObjID, pupElementsFor(), PUP::mem::size(), PUP::sizer::size(), and thisProxy.
Referenced by CkElementEvacuate::addLocation(), immigrate(), and CkLocRec::migrateMe().
Definition at line 3138 of file cklocation.C.
References callMethod(), and CkMigratable::recvLBPeriod().
Referenced by CkLocRec::staticMetaLBResumeWaitingChares().
void CkLocMgr::metaLBCallLB | ( | CkLocRec * | rec | ) |
Definition at line 3142 of file cklocation.C.
References callMethod(), and CkMigratable::metaLBCallLB().
Referenced by CkLocRec::staticMetaLBCallLBOnChares().
LBDatabase* CkLocMgr::getLBDB | ( | void | ) | const [inline] |
Definition at line 443 of file cklocation.h.
Referenced by CkLocRec::CkLocRec().
MetaBalancer* CkLocMgr::getMetaBalancer | ( | void | ) | const [inline] |
Definition at line 444 of file cklocation.h.
Referenced by CkLocRec::CkLocRec().
const LDOMHandle& CkLocMgr::getOMHandle | ( | void | ) | const [inline] |
Definition at line 445 of file cklocation.h.
Referenced by CkLocRec::CkLocRec().
void CkLocMgr::reclaim | ( | CkLocRec * | rec | ) |
Definition at line 2518 of file cklocation.C.
References _BgOutOfCoreFlag, CkInRestarting(), Converse::CkMyPe(), duringDestruction, duringMigration, CkLocRec::getID(), CkLocRec::getIndex(), homePe(), idx2str(), managers, removeFromTable(), and thisProxy.
Referenced by _verifyAckRequestHandler(), and CkLocRec::destroy().
bool CkLocMgr::demandCreateElement | ( | CkArrayMessage * | msg, | |
const CkArrayIndex & | idx, | |||
int | onPe, | |||
CkDeliver_t | type | |||
) |
Definition at line 2800 of file cklocation.C.
References _chareTable, _entryTable, CkArrayMessage::array_ep(), CkArrayMessage::array_ifNotThere(), CkArray_IfNotThere_createhere, Converse::CkMyPe(), envelope::getsetArraySrcPe(), homePe(), idx2str(), and UsrToEnv().
Referenced by deliverMsg(), requestLocation(), and sendMsg().
void CkLocMgr::demandCreateElement | ( | const CkArrayIndex & | idx, | |
int | chareType, | |||
int | onPe, | |||
CkArrayID | mgr | |||
) |
Definition at line 2788 of file cklocation.C.
References _chareTable, CkDeliver_inline, getNewObjectID(), idx2str(), and inform().
void CkLocMgr::immigrate | ( | CkArrayElementMigrateMessage * | msg | ) |
Migrating array element is arriving on this processor.
Definition at line 3150 of file cklocation.C.
References CkLocRec::AsyncMigrate(), CkLocRec::Bounced(), CkArrayElementMigrateMessage::bounced, callMethod(), CkElementCreation_migrate, CkMigratable::ckJustMigrated(), Converse::CkMyPe(), createLocal(), emigrate(), getNextPE(), CkArrayElementMigrateMessage::id, CkArrayElementMigrateMessage::idx, idx, idx2str(), CkArrayElementMigrateMessage::ignoreArrival, insertID(), CkArrayElementMigrateMessage::length, managers, CkArrayElementMigrateMessage::nManagers, p, CkArrayElementMigrateMessage::packData, pupElementsFor(), CkMigratable::ResumeFromSync(), PUP::mem::size(), and thisProxy.
Referenced by _receiveMlogLocationHandler().
void CkLocMgr::requestLocation | ( | const CkArrayIndex & | idx, | |
int | peToTell, | |||
bool | suppressIfHere, | |||
int | ifNonExistent, | |||
int | chareType, | |||
CkArrayID | mgr | |||
) |
Definition at line 2403 of file cklocation.C.
References bufferedLocationRequests, CkArray_IfNotThere_createhere, CkArray_IfNotThere_createhome, Converse::CkMyPe(), demandCreateElement(), idx2str(), lastKnown(), lookupID(), and thisProxy.
Referenced by deliverUnknown(), and sendMsg().
Definition at line 2434 of file cklocation.C.
References Converse::CkMyPe(), lastKnown(), and thisProxy.
Definition at line 2450 of file cklocation.C.
References bufferedRemoteMsgs, Converse::CkMyPe(), deliverAnyBufferedMsgs(), idx2str(), and inform().
Referenced by CkMemCheckPT::isMaster(), and UpdateLocation().
Definition at line 2456 of file cklocation.C.
References bufferedRemoteMsgs, Converse::CkMyPe(), deliverAnyBufferedMsgs(), idx, idx2str(), and inform().
void CkLocMgr::reclaimRemote | ( | const CkArrayIndex & | idx, | |
int | deletedOnPe | |||
) |
Definition at line 2552 of file cklocation.C.
References bufferedIndexMsgs, bufferedLocationRequests, bufferedMsgs, bufferedRemoteMsgs, bufferedShadowElemMsgs, id2pe, idx2id, idx2str(), and lookupID().
void CkLocMgr::dummyAtSync | ( | void | ) |
Definition at line 3432 of file cklocation.C.
Referenced by dummyResumeFromSync().
void CkLocMgr::migratableList | ( | CkLocRec * | rec, | |
std::vector< CkMigratable * > & | list | |||
) |
return a list of migratables in this local record
Definition at line 3022 of file cklocation.C.
References CkLocRec::getID(), and managers.
Referenced by _distributedLocationHandler(), _sendBackLocationHandler(), CkElementEvacuate::addLocation(), ElementCaller::addLocation(), ElementDistributor::addLocation(), CkMemCheckPT::inmem_restore(), pupElementsFor(), and sendBackImmigrantRecObjs().
void CkLocMgr::flushAllRecs | ( | void | ) |
Definition at line 2092 of file cklocation.C.
References flushLocalRecs().
void CkLocMgr::flushLocalRecs | ( | void | ) |
Definition at line 2081 of file cklocation.C.
References callMethod(), CkMigratable::ckDestroy(), hash, and hashImmLock.
Referenced by flushAllRecs().
void CkLocMgr::pup | ( | PUP::er & | p | ) | [virtual] |
Pack/UnPack - tell the runtime how to serialize this class's data for migration, checkpoint, etc.
Reimplemented from IrrGroup.
Definition at line 2156 of file cklocation.C.
References bounds, CkInRestarting(), CkLocalBranch(), Converse::CkMyPe(), CmiMyPe(), CmiPrintf(), compressor, count, doneInserting(), elementNrec(), homeElementCount, homePe(), id2pe, idx, _ckGroupID::idx, inform(), initLB(), PUP::er::isUnpacking(), lastKnown(), lbdbID, lookupID(), ck::FixedArrayIndexCompressor::make(), map, mapHandle, mapID, metalbID, IrrGroup::pup(), IrrGroup::thisgroup, thislocalproxy, and thisProxy.
Definition at line 3369 of file cklocation.C.
References elementNrec(), hash, and hashImmLock.
Referenced by createLocal().
void CkLocMgr::removeFromTable | ( | const CmiUInt8 | id | ) | [private] |
Definition at line 2570 of file cklocation.C.
References elementNrec(), hash, and hashImmLock.
Referenced by reclaim().
void CkLocMgr::pupElementsFor | ( | PUP::er & | p, | |
CkLocRec * | rec, | |||
CkElementCreation_t | type, | |||
bool | create = true , |
|||
int | dummy = 0 | |||
) | [private] |
Definition at line 2889 of file cklocation.C.
References _chareTable, _entryTable, addElementToRec(), CkMigratable_initInfo::chareType, CkMigratable::ckGetChareType(), PUP::er::comment(), CkLocRec::getIndex(), CkLocRec::invokeEntry(), PUP::er::isUnpacking(), CkMigratable_initInfo::locRec, managers, p, and Chare::virtual_pup().
Referenced by emigrate(), immigrate(), ArrayElement::inmem_checkpoint(), CkLocation::pup(), restore(), and resume().
void CkLocMgr::pupElementsFor | ( | PUP::er & | p, | |
CkLocRec * | rec, | |||
CkElementCreation_t | type, | |||
bool | rebuild = false | |||
) | [private] |
Definition at line 2941 of file cklocation.C.
References _chareTable, addElementToRec(), CkArray::allocateMigrated(), c, CkElementCreation_resume, CkMigratable::ckGetChareType(), PUP::er::comment(), CkArray::getEltFromArrMgr(), CkLocRec::getID(), PUP::er::isUnpacking(), PUP::l, list, ArrayElement::listenerData, managers, migratableList(), p, contributorInfo::redNo, Chare::sanitycheck(), CkArray::stampListenerData(), and Chare::virtual_pup().
void CkLocMgr::callMethod | ( | CkLocRec * | rec, | |
CkMigratable_voidfn_arg_t | fn, | |||
void * | data | |||
) | [private] |
Call this member function on each element of this location:.
Definition at line 3013 of file cklocation.C.
References CkLocRec::getID(), and managers.
Referenced by ElementDistributor::addLocation(), CkLocation::destroyAll(), emigrate(), flushLocalRecs(), immigrate(), informLBPeriod(), metaLBCallLB(), restore(), resume(), and sendBackImmigrantRecObjs().
void CkLocMgr::deliverUnknown | ( | CkArrayMessage * | msg, | |
const CkArrayIndex * | idx, | |||
CkDeliver_t | type, | |||
int | opts | |||
) | [private] |
This index is not hashed-- somehow figure out what to do.
Definition at line 2740 of file cklocation.C.
References _messageBufferingThreshold, CkArrayMessage::array_element_id(), CkArrayMessage::array_hops(), bufferedMsgs, bufferedRemoteMsgs, CkArray_IfNotThere_buffer, CkArrayManagerDeliver(), CkCopyMsg(), CkInRestarting(), Converse::CkMyPe(), homePe(), id2pe, managers, requestLocation(), thisProxy, and UsrToEnv().
Referenced by deliverMsg().
Deliver any buffered msgs to a newly created array element.
Definition at line 2294 of file cklocation.C.
References CkDeliver_queue, deliverMsg(), PUP::m, TypeInvalid, and UsrToEnv().
Referenced by addElement(), createLocal(), inform(), and updateLocation().
CkLocRec * CkLocMgr::createLocal | ( | const CkArrayIndex & | idx, | |
bool | forMigration, | |||
bool | ignoreArrival, | |||
bool | notifyHome, | |||
int | dummy = 0 | |||
) | [private] |
Create a new local record at this array index.
Definition at line 2262 of file cklocation.C.
References bufferedMsgs, Converse::CkMyPe(), deliverAnyBufferedMsgs(), id2pe, idx2str(), informHome(), and insertRec().
Referenced by addElement(), immigrate(), restore(), and resume().
CkLocRec * CkLocMgr::createLocal | ( | const CkArrayIndex & | idx, | |
bool | forMigration, | |||
bool | ignoreArrival, | |||
bool | notifyHome | |||
) | [private] |
Definition at line 2277 of file cklocation.C.
References Converse::CkMyPe(), idx2str(), inform(), informHome(), insertRec(), and lookupID().
void CkLocMgr::callMethod | ( | CkLocRec * | rec, | |
CkMigratable_voidfn_t | fn | |||
) |
Call this member function on each element of this location:.
Definition at line 3004 of file cklocation.C.
References CkLocRec::getID(), and managers.
CmiUInt8 CkLocMgr::getNewObjectID | ( | const CkArrayIndex & | idx | ) |
Definition at line 2326 of file cklocation.C.
References Converse::CkMyPe(), idCounter, insertID(), and lookupID().
Referenced by addElement(), and demandCreateElement().
bool CkLocMgr::addElementToRec | ( | CkLocRec * | rec, | |
CkArray * | m, | |||
CkMigratable * | elt, | |||
int | ctorIdx, | |||
void * | ctorMsg | |||
) |
Definition at line 2366 of file cklocation.C.
References _entryTable, CkArray::getEltFromArrMgr(), CkLocRec::getIndex(), idx2str(), CkLocRec::invokeEntry(), lookupID(), CkMigratable::prefetchObjID, CkArray::putEltInArrMgr(), PUP::sizer::size(), and Chare::virtual_pup().
Referenced by addElement(), and pupElementsFor().
void CkLocMgr::checkInBounds | ( | const CkArrayIndex & | idx | ) | [private] |
Definition at line 2835 of file cklocation.C.
References bounds.
Referenced by sendMsg().
void CkLocMgr::staticDummyResumeFromSync | ( | void * | data | ) | [static, private] |
Definition at line 3480 of file cklocation.C.
void CkLocMgr::dummyResumeFromSync | ( | void | ) | [private] |
Definition at line 3482 of file cklocation.C.
References LBDatabase::DoneRegisteringObjects(), dummyAtSync(), myLBHandle, and the_lbdb.
void CkLocMgr::staticRecvAtSync | ( | void * | data | ) | [static, private] |
Definition at line 3488 of file cklocation.C.
void CkLocMgr::recvAtSync | ( | void | ) | [private] |
Definition at line 3490 of file cklocation.C.
References myLBHandle, LBDatabase::RegisteringObjects(), and the_lbdb.
Definition at line 3429 of file cklocation.C.
Referenced by CkLocMgr(), and pup().
Definition at line 2099 of file cklocation.C.
References hash, and hashImmLock.
Referenced by CkArray::recvBroadcast().
friend class CkLocation [friend] |
Definition at line 479 of file cklocation.h.
friend class ArrayElement [friend] |
Definition at line 480 of file cklocation.h.
friend class MemElementPacker [friend] |
Definition at line 481 of file cklocation.h.
CkMagicNumber<CkMigratable> CkLocMgr::magic [private] |
Definition at line 511 of file cklocation.h.
Referenced by inform(), reclaimRemote(), and requestLocation().
Definition at line 518 of file cklocation.h.
Referenced by addElement(), addManager(), callMethod(), deleteManager(), deliverMsg(), deliverUnknown(), emigrate(), immigrate(), ArrayElement::init_checkpt(), migratableList(), pupElementsFor(), reclaim(), sendMsg(), and setDuringDestruction().
Definition at line 520 of file cklocation.h.
Referenced by createLocal(), deliverUnknown(), inform(), pup(), reclaimRemote(), and whichPE().
Map idx to undelivered msgs.
Definition at line 532 of file cklocation.h.
Referenced by createLocal(), deliverUnknown(), inform(), and reclaimRemote().
Definition at line 533 of file cklocation.h.
Referenced by deliverUnknown(), reclaimRemote(), and updateLocation().
Definition at line 534 of file cklocation.h.
Referenced by addElement(), deliverMsg(), and reclaimRemote().
Definition at line 536 of file cklocation.h.
Referenced by inform(), reclaimRemote(), and sendMsg().
CProxy_CkLocMgr CkLocMgr::thisProxy |
Definition at line 541 of file cklocation.h.
Referenced by addElement(), deliverUnknown(), emigrate(), immigrate(), inform(), informHome(), multiHop(), pup(), reclaim(), requestLocation(), and sendMsg().
CProxyElement_CkLocMgr CkLocMgr::thislocalproxy |
This flag is set while we delete an old copy of a migrator.
Definition at line 545 of file cklocation.h.
Referenced by CkLocMgr(), emigrate(), reclaim(), and setDuringMigration().
This flag is set while we are deleting location manager.
Definition at line 547 of file cklocation.h.
Referenced by reclaim(), and setDuringDestruction().
LocRecHash CkLocMgr::hash [private] |
The core of the location manager: map array index to element representative.
Definition at line 551 of file cklocation.h.
Referenced by callForAllRecords(), elementNrec(), elementRec(), flushLocalRecs(), insertRec(), iterate(), and removeFromTable().
CmiImmediateLockType CkLocMgr::hashImmLock [private] |
Definition at line 552 of file cklocation.h.
Referenced by callForAllRecords(), CkLocMgr(), flushLocalRecs(), insertRec(), iterate(), removeFromTable(), and ~CkLocMgr().
CkGroupID CkLocMgr::mapID [private] |
int CkLocMgr::mapHandle [private] |
CkArrayMap* CkLocMgr::map [private] |
CkGroupID CkLocMgr::lbdbID [private] |
CkGroupID CkLocMgr::metalbID [private] |
ck::ArrayIndexCompressor* CkLocMgr::compressor [private] |
CkArrayIndex CkLocMgr::bounds [private] |
LBDatabase* CkLocMgr::the_lbdb [private] |
Definition at line 567 of file cklocation.h.
Referenced by deliverMsg(), dummyResumeFromSync(), recvAtSync(), and ~CkLocMgr().
MetaBalancer* CkLocMgr::the_metalb [private] |
Definition at line 568 of file cklocation.h.
LDBarrierClient CkLocMgr::dummyBarrierHandle [private] |
LDOMHandle CkLocMgr::myLBHandle [private] |
Definition at line 574 of file cklocation.h.
Referenced by deliverMsg(), dummyResumeFromSync(), recvAtSync(), and ~CkLocMgr().
LDBarrierReceiver CkLocMgr::lbBarrierReceiver [private] |
Definition at line 583 of file cklocation.h.
Referenced by CkArray::broadcastHomeElements(), and pup().