PPL Logo

CkLocMgr Class Reference
[CkArrayImpl]

A group which manages the location of an indexed set of migratable objects. More...

#include <cklocation.h>

Inheritance diagram for CkLocMgr:

Inheritance graph
[legend]
Collaboration diagram for CkLocMgr:

Collaboration graph
[legend]

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)
CkGroupIDgetGroupID (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
CkLocRecelementRec (const CkArrayIndex &idx)
CkLocRecelementNrec (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)
LBDatabasegetLBDB (void) const
MetaBalancergetMetaBalancer (void) const
const LDOMHandlegetOMHandle (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.
CkLocReccreateLocal (const CkArrayIndex &idx, bool forMigration, bool ignoreArrival, bool notifyHome, int dummy=0)
 Create a new local record at this array index.
CkLocReccreateLocal (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< CkMigratablemagic
LocationRequestBuffer bufferedLocationRequests
LocRecHash hash
 The core of the location manager: map array index to element representative.
CmiImmediateLockType hashImmLock
CkGroupID mapID
int mapHandle
CkArrayMapmap
CkGroupID lbdbID
CkGroupID metalbID
ck::ArrayIndexCompressorcompressor
CkArrayIndex bounds
LBDatabasethe_lbdb
MetaBalancerthe_metalb
LDBarrierClient dummyBarrierHandle
LDOMHandle myLBHandle
LDBarrierReceiver lbBarrierReceiver

Friends

class CkLocation
class ArrayElement
class MemElementPacker

Detailed Description

A group which manages the location of an indexed set of migratable objects.

Knows about insertions, deletions, home processors, migration, and message forwarding.

Definition at line 282 of file cklocation.h.


Member Typedef Documentation

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]


Constructor & Destructor Documentation

CkLocMgr::CkLocMgr ( CkArrayOptions  opts  ) 

CkLocMgr::CkLocMgr ( CkMigrateMessage m  ) 

Definition at line 2138 of file cklocation.C.

References duringMigration, and hashImmLock.

CkLocMgr::~CkLocMgr (  ) 


Member Function Documentation

bool CkLocMgr::isLocMgr ( void   )  [inline, virtual]

Reimplemented from IrrGroup.

Definition at line 299 of file cklocation.h.

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().

Here is the caller graph for this function:

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]

int CkLocMgr::homePe ( const CmiUInt8  id  )  const [inline]

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

int CkLocMgr::whichPE ( const CmiUInt8  id  )  const

Definition at line 3304 of file cklocation.C.

References id2pe.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

int CkLocMgr::lastKnown ( CmiUInt8  id  ) 

Definition at line 3326 of file cklocation.C.

References homePe(), and whichPE().

Here is the call graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

bool CkLocMgr::lookupID ( const CkArrayIndex &  idx,
CmiUInt8 id 
) const [inline]

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

CkLocRec * CkLocMgr::elementNrec ( const CmiUInt8  id  ) 

Definition at line 3404 of file cklocation.C.

References hash.

Referenced by _receiveLocationHandler(), _verifyAckRequestHandler(), addElement(), deliverMsg(), elementRec(), insertRec(), pup(), removeFromTable(), and resume().

Here is the caller graph for this function:

bool CkLocMgr::isRemote ( const CkArrayIndex &  idx,
int onPe 
) const

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkLocMgr::setDuringMigration ( bool  _duringMigration  ) 

Definition at line 3357 of file cklocation.C.

References duringMigration.

Referenced by _verifyAckRequestHandler(), ElementDistributor::addLocation(), and sendBackImmigrantRecObjs().

Here is the caller graph for this function:

void CkLocMgr::setDuringDestruction ( bool  _duringDestruction  ) 

Definition at line 3364 of file cklocation.C.

References duringDestruction, and managers.

Referenced by CkArray::ckDestroy().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkLocMgr::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.

Definition at line 3223 of file cklocation.C.

References _BgOutOfCoreFlag, callMethod(), CkElementCreation_restore, CkMigratable::ckJustRestored(), CmiAbort(), createLocal(), insertID(), and pupElementsFor().

Referenced by CkPupArrayElementsData().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

void CkLocMgr::addManager ( CkArrayID  aid,
CkArray mgr 
)

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().

Here is the caller graph for this function:

void CkLocMgr::deleteManager ( CkArrayID  aid,
CkArray mgr 
)

Definition at line 2237 of file cklocation.C.

References managers.

Referenced by CkArray::ckDestroy().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkLocMgr::doneInserting ( void   ) 

Done inserting elements for now.

Definition at line 3431 of file cklocation.C.

Referenced by pup(), and CkArray::remoteDoneInserting().

Here is the caller graph for this function:

void CkLocMgr::startInserting ( void   ) 

Definition at line 3430 of file cklocation.C.

Referenced by CkArray::remoteBeginInserting().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

int CkLocMgr::deliverMsg ( CkArrayMessage msg,
CkArrayID  mgr,
CmiUInt8  id,
const CkArrayIndex *  idx,
CkDeliver_t  type,
int  opts = 0 
)

void CkLocMgr::sendMsg ( CkArrayMessage msg,
CkArrayID  mgr,
const CkArrayIndex &  idx,
CkDeliver_t  type,
int  opts 
)

void CkLocMgr::inform ( const CkArrayIndex &  idx,
CmiUInt8  id,
int  nowOnPe 
)

void CkLocMgr::inform ( CmiUInt8  id,
int  nowOnPe 
)

Definition at line 2508 of file cklocation.C.

References bufferedMsgs, deliverAnyBufferedMsgs(), and id2pe.

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkLocMgr::emigrate ( CkLocRec rec,
int  toPe 
)

void CkLocMgr::informLBPeriod ( CkLocRec rec,
int  lb_ideal_period 
)

Definition at line 3138 of file cklocation.C.

References callMethod(), and CkMigratable::recvLBPeriod().

Referenced by CkLocRec::staticMetaLBResumeWaitingChares().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkLocMgr::metaLBCallLB ( CkLocRec rec  ) 

Definition at line 3142 of file cklocation.C.

References callMethod(), and CkMigratable::metaLBCallLB().

Referenced by CkLocRec::staticMetaLBCallLBOnChares().

Here is the call graph for this function:

Here is the caller graph for this function:

LBDatabase* CkLocMgr::getLBDB ( void   )  const [inline]

Definition at line 443 of file cklocation.h.

Referenced by CkLocRec::CkLocRec().

Here is the caller graph for this function:

MetaBalancer* CkLocMgr::getMetaBalancer ( void   )  const [inline]

Definition at line 444 of file cklocation.h.

Referenced by CkLocRec::CkLocRec().

Here is the caller graph for this function:

const LDOMHandle& CkLocMgr::getOMHandle ( void   )  const [inline]

Definition at line 445 of file cklocation.h.

Referenced by CkLocRec::CkLocRec().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

void CkLocMgr::immigrate ( CkArrayElementMigrateMessage msg  ) 

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkLocMgr::requestLocation ( CmiUInt8  id,
int  peToTell,
bool  suppressIfHere 
)

Definition at line 2434 of file cklocation.C.

References Converse::CkMyPe(), lastKnown(), and thisProxy.

Here is the call graph for this function:

void CkLocMgr::updateLocation ( const CkArrayIndex &  idx,
CmiUInt8  id,
int  nowOnPe 
)

Definition at line 2450 of file cklocation.C.

References bufferedRemoteMsgs, Converse::CkMyPe(), deliverAnyBufferedMsgs(), idx2str(), and inform().

Referenced by CkMemCheckPT::isMaster(), and UpdateLocation().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkLocMgr::updateLocation ( CmiUInt8  id,
int  nowOnPe 
)

Definition at line 2456 of file cklocation.C.

References bufferedRemoteMsgs, Converse::CkMyPe(), deliverAnyBufferedMsgs(), idx, idx2str(), and inform().

Here is the call graph for this function:

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().

Here is the call graph for this function:

void CkLocMgr::dummyAtSync ( void   ) 

Definition at line 3432 of file cklocation.C.

Referenced by dummyResumeFromSync().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkLocMgr::flushAllRecs ( void   ) 

Definition at line 2092 of file cklocation.C.

References flushLocalRecs().

Here is the call graph for this function:

void CkLocMgr::flushLocalRecs ( void   ) 

Definition at line 2081 of file cklocation.C.

References callMethod(), CkMigratable::ckDestroy(), hash, and hashImmLock.

Referenced by flushAllRecs().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

void CkLocMgr::insertRec ( CkLocRec rec,
const CmiUInt8 id 
) [private]

Definition at line 3369 of file cklocation.C.

References elementNrec(), hash, and hashImmLock.

Referenced by createLocal().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkLocMgr::removeFromTable ( const CmiUInt8  id  )  [private]

Definition at line 2570 of file cklocation.C.

References elementNrec(), hash, and hashImmLock.

Referenced by reclaim().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkLocMgr::pupElementsFor ( PUP::er p,
CkLocRec rec,
CkElementCreation_t  type,
bool  create = true,
int  dummy = 0 
) [private]

void CkLocMgr::pupElementsFor ( PUP::er p,
CkLocRec rec,
CkElementCreation_t  type,
bool  rebuild = false 
) [private]

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkLocMgr::deliverAnyBufferedMsgs ( CmiUInt8  id,
MsgBuffer buffer 
) [private]

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

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.

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void CkLocMgr::checkInBounds ( const CkArrayIndex &  idx  )  [private]

Definition at line 2835 of file cklocation.C.

References bounds.

Referenced by sendMsg().

Here is the caller graph for this function:

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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

void CkLocMgr::initLB ( CkGroupID  lbdbID,
CkGroupID  metalbID 
) [private]

Definition at line 3429 of file cklocation.C.

Referenced by CkLocMgr(), and pup().

Here is the caller graph for this function:

void CkLocMgr::callForAllRecords ( CkLocFn  fnPointer,
CkArray arr,
void *  data 
)

Definition at line 2099 of file cklocation.C.

References hash, and hashImmLock.

Referenced by CkArray::recvBroadcast().

Here is the caller graph for this function:


Friends And Related Function Documentation

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.


Field Documentation

Reimplemented from Chare.

Definition at line 283 of file cklocation.h.

Definition at line 511 of file cklocation.h.

Referenced by inform(), reclaimRemote(), and requestLocation().

Definition at line 520 of file cklocation.h.

Referenced by createLocal(), deliverUnknown(), inform(), pup(), reclaimRemote(), and whichPE().

Definition at line 523 of file cklocation.h.

Referenced by reclaimRemote().

Definition at line 525 of file cklocation.h.

Referenced by getNewObjectID(), and inform().

Map idx to undelivered msgs.

Todo:
: We should not buffer msgs for uncreated array elements forever. After some timeout or other policy, we should throw errors or warnings or at least report and discard any msgs addressed to uncreated array elements

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

CProxyElement_CkLocMgr CkLocMgr::thislocalproxy

Definition at line 542 of file cklocation.h.

Referenced by pup().

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().

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().

Definition at line 555 of file cklocation.h.

Referenced by CkLocMgr(), and pup().

Definition at line 556 of file cklocation.h.

Referenced by CkLocMgr(), pup(), and ~CkLocMgr().

Definition at line 557 of file cklocation.h.

Referenced by CkLocMgr(), pup(), and ~CkLocMgr().

Definition at line 559 of file cklocation.h.

Referenced by CkLocMgr(), and pup().

Definition at line 560 of file cklocation.h.

Referenced by CkLocMgr(), and pup().

Definition at line 562 of file cklocation.h.

Referenced by CkLocMgr(), deliverMsg(), and pup().

CkArrayIndex CkLocMgr::bounds [private]

Definition at line 563 of file cklocation.h.

Referenced by checkInBounds(), CkLocMgr(), and pup().

Definition at line 567 of file cklocation.h.

Referenced by deliverMsg(), dummyResumeFromSync(), recvAtSync(), and ~CkLocMgr().

Definition at line 568 of file cklocation.h.

Definition at line 569 of file cklocation.h.

Referenced by ~CkLocMgr().

Definition at line 574 of file cklocation.h.

Referenced by deliverMsg(), dummyResumeFromSync(), recvAtSync(), and ~CkLocMgr().

Definition at line 575 of file cklocation.h.

Referenced by ~CkLocMgr().

Definition at line 583 of file cklocation.h.

Referenced by CkArray::broadcastHomeElements(), and pup().


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

Generated on Mon Sep 21 08:20:26 2020 for Charm++ by  doxygen 1.5.5