#include <gvt.h>
Public Member Functions | |
PVT (void) | |
Circular buffer for storing debug prints. | |
PVT (CkMigrateMessage *msg) | |
Migration Constructor. | |
void | pup (PUP::er &p) |
PUP routine. | |
~PVT () | |
Destructor. | |
void | startPhase (prioBcMsg *m) |
ENTRY: runs the PVT calculation and reports to GVT. | |
void | startPhaseExp (prioBcMsg *m) |
ENTRY: runs the expedited PVT calculation and reports to GVT. | |
void | setGVT (GVTMsg *m) |
ENTRY: receive GVT estimate; wake up objects. | |
void | beginCheckpoint (eventMsg *m) |
ENTRY: begin checkpoint now that quiescence has been reached. | |
void | resumeAfterCheckpoint (eventMsg *m) |
ENTRY: resume after checkpointing, restarting, or if checkpointing doesn't occur. | |
void | beginLoadbalancing (eventMsg *m) |
ENTRY:. | |
void | resumeAfterLB (eventMsg *m) |
ENTRY:. | |
void | callAtSync () |
ENTRY:. | |
void | doneLB () |
POSE_TimeType | getGVT () |
Returns GVT estimate. | |
int | getSpecEventCount () |
int | getEventCount () |
void | incSpecEventCount () |
void | incEventCount () |
void | decEventCount () |
int | done () |
Returns termination flag. | |
int | objRegister (int arrIdx, POSE_TimeType safeTime, int sync, sim *myPtr) |
Register poser with PVT. | |
void | objRemove (int pvtIdx) |
Unregister poser from PVT. | |
void | objUpdate (POSE_TimeType timestamp, int sr) |
Update send/recv table at timestamp. | |
void | objUpdateOVT (int pvtIdx, POSE_TimeType safeTime, POSE_TimeType ovt) |
Update PVT with safeTime and send/recv table at timestamp. | |
void | reportReduce (UpdateMsg *) |
ENTRY: Reduction point for PVT reports. | |
void | addSR (SRentry **SRs, SRentry *e, POSE_TimeType og, int ne) |
Adds incoming send/recv information to a list. | |
int | getNumObjs () |
Private Attributes | |
localStat * | localStats |
POSE_TimeType | optPVT |
PVT of local optimistic posers. | |
POSE_TimeType | conPVT |
PVT of local conservative posers. | |
POSE_TimeType | estGVT |
Last GVT estimate. | |
POSE_TimeType | repPVT |
Last reported PVT estimate. | |
int | simdone |
Simulation termination flag. | |
POSE_TimeType | iterMin |
Minimum send/recv timestamp in this iteration. | |
int | waitForFirst |
Flag to indicate waiting for first send/recv of next iteration. | |
SRtable * | SendsAndRecvs |
Table to store send/recv timestamps. | |
pvtObjects | objs |
List of objects registered with this PVT branch. | |
int | reportTo |
reduction-related vars | |
int | reportsExpected |
int | reportReduceTo |
int | reportEnd |
int | gvtTurn |
where the centralized GVT goes | |
int | specEventCount |
int | eventCount |
int | startPhaseActive |
startPhase active flag | |
double | parStartTime |
starting time of the simulation | |
int | parCheckpointInProgress |
indicates if checkpointing is in progress | |
POSE_TimeType | parLastCheckpointGVT |
GVT at which the last checkpoint was performed. | |
int | parLBInProgress |
indicates if load balancing is in progress | |
POSE_TimeType | parLastLBGVT |
GVT at which the last load balancing was performed. | |
double | parLastCheckpointTime |
Time at which the last checkpoint was performed. | |
POSE_TimeType | optGVT |
optimistic and coservative GVTs | |
POSE_TimeType | conGVT |
int | rdone |
SRentry * | SRs |
used in PVT report reduction | |
TimePool * | localTimePool |
Keeps track of local sends/recvs and computes processor virtual time. Interacts with GVT to obtain new estimate and invokes fossil collection and forward execution on objects with new estimate.
Definition at line 69 of file gvt.h.
PVT::PVT | ( | void | ) |
Circular buffer for storing debug prints.
Basic Constructor.
Basic Constructor
Definition at line 18 of file gvt.C.
References LBDatabase::AddMigrationDoneFn(), CkLocalBranch(), Converse::CkMyPe(), Converse::CkNumPes(), conGVT, conPVT, estGVT, eventCount, gvtTurn, SRtable::Initialize(), iterMin, localStats, localTimePool, LBDatabase::Object(), optGVT, optPVT, parCheckpointInProgress, parLastCheckpointGVT, parLastCheckpointTime, parLastLBGVT, parLBInProgress, parStartTime, pose_config, POSE_UnsetTS, rdone, reportEnd, reportReduceTo, reportsExpected, reportTo, SendsAndRecvs, simdone, specEventCount, SRs, startPhaseActive, staticDoneLB(), POSE_Config::stats, TempMemID, theLocalStats, localStat::TimerStart(), localStat::TimerStop(), and waitForFirst.
PVT::PVT | ( | CkMigrateMessage * | msg | ) | [inline] |
void PVT::pup | ( | PUP::er & | p | ) | [virtual] |
PUP routine.
Reimplemented from Group.
Definition at line 92 of file gvt.C.
References CkLocalBranch(), conGVT, conPVT, estGVT, eventCount, gvtTurn, PUP::er::isUnpacking(), iterMin, localStats, localTimePool, optGVT, optPVT, parCheckpointInProgress, parLastCheckpointGVT, parLastCheckpointTime, parLastLBGVT, parLBInProgress, parStartTime, SRentry::pup(), SRtable::pup(), rdone, reportEnd, reportReduceTo, reportsExpected, reportTo, repPVT, SendsAndRecvs, simdone, specEventCount, SRs, startPhaseActive, TempMemID, theLocalStats, and waitForFirst.
void PVT::startPhase | ( | prioBcMsg * | m | ) |
ENTRY: runs the PVT calculation and reports to GVT.
Definition at line 141 of file gvt.C.
References prioBcMsg::bc, CkPriorityPtr(), CkSetQueueing(), UpdateMsg::conPVT, conPVT, estGVT, pvtObjects::getNumSpaces(), pvtObjectNode::getOVT(), pvtObjectNode::getOVT2(), pvtObjectNode::isConservative(), pvtObjectNode::isOptimistic(), pvtObjectNode::isPresent(), iterMin, localStats, UpdateMsg::maxSR, UpdateMsg::numEntries, pvtObjects::objs, objs, UpdateMsg::optPVT, optPVT, p, SRtable::PackTable(), pose_config, POSE_TimeMax, POSE_UnsetTS, reportTo, SRtable::Restructure(), UpdateMsg::runGVTflag, SendsAndRecvs, pvtObjects::SetIdle(), simdone, startPhaseActive, POSE_Config::stats, localStat::TimerStart(), localStat::TimerStop(), waitForFirst, and pvtObjects::Wake().
Referenced by startPhaseExp().
void PVT::startPhaseExp | ( | prioBcMsg * | m | ) |
ENTRY: runs the expedited PVT calculation and reports to GVT.
Definition at line 136 of file gvt.C.
References startPhase().
void PVT::setGVT | ( | GVTMsg * | m | ) |
ENTRY: receive GVT estimate; wake up objects.
Receives the new GVT estimate and termination flag; wakes up objects for fossil collection and forward execution with new GVT estimate.
Definition at line 246 of file gvt.C.
References cb, POSE_Config::checkpoint_gvt_interval, POSE_Config::checkpoint_time_interval, pvtObjects::CheckpointCommit(), CkFreeMsg(), Converse::CkMyPe(), CkStartQD(), CmiWallTimer(), pvtObjects::Commit(), GVTMsg::done, estGVT, GVTMsg::estGVT, pvtObjects::getNumSpaces(), POSE_Config::lb_gvt_interval, localStats, localTimePool, objs, p, parCheckpointInProgress, parLastCheckpointGVT, parLastCheckpointTime, parLastLBGVT, parLBInProgress, parStartTime, pose_config, TimePool::set_min_time(), simdone, POSE_Config::stats, pvtObjects::StratCalcs(), localStat::TimerStart(), localStat::TimerStop(), and waitForFirst.
void PVT::beginCheckpoint | ( | eventMsg * | m | ) |
ENTRY: begin checkpoint now that quiescence has been reached.
Definition at line 313 of file gvt.C.
References cb, CkFreeMsg(), Converse::CkMyPe(), CkStartCheckpoint(), CmiWallTimer(), estGVT, localStats, parCheckpointInProgress, parStartTime, pose_config, POSE_Config::stats, localStat::TimerStart(), and localStat::TimerStop().
void PVT::resumeAfterCheckpoint | ( | eventMsg * | m | ) |
ENTRY: resume after checkpointing, restarting, or if checkpointing doesn't occur.
Definition at line 367 of file gvt.C.
References prioBcMsg::bc, CkFreeMsg(), Converse::CkMyPe(), CkPriorityPtr(), CkSetQueueing(), CmiWallTimer(), estGVT, int, localStats, p, parCheckpointInProgress, parLastCheckpointGVT, parStartTime, pose_config, startPhaseActive, POSE_Config::stats, localStat::TimerStart(), and localStat::TimerStop().
void PVT::beginLoadbalancing | ( | eventMsg * | m | ) |
ENTRY:.
Definition at line 332 of file gvt.C.
References CkFreeMsg(), localStats, p, parLBInProgress, pose_config, POSE_Config::stats, localStat::TimerStart(), and localStat::TimerStop().
void PVT::resumeAfterLB | ( | eventMsg * | m | ) |
ENTRY:.
Definition at line 392 of file gvt.C.
References prioBcMsg::bc, CkFreeMsg(), Converse::CkMyPe(), Converse::CkNumPes(), CkPriorityPtr(), CkSetQueueing(), CmiWallTimer(), count, estGVT, int, localStats, p, parLastLBGVT, parLBInProgress, parStartTime, pose_config, startPhaseActive, POSE_Config::stats, localStat::TimerStart(), and localStat::TimerStop().
void PVT::callAtSync | ( | ) |
ENTRY:.
Definition at line 348 of file gvt.C.
References pvtObjects::callAtSync(), localStats, objs, pose_config, POSE_Config::stats, localStat::TimerStart(), and localStat::TimerStop().
POSE_TimeType PVT::getGVT | ( | ) | [inline] |
Returns GVT estimate.
Definition at line 155 of file gvt.h.
References estGVT.
Referenced by con::CancelEvents(), sim::CheckpointCommit(), sim::Commit(), LBgroup::computePeLoad(), sim::pup(), rep::registerTimestamp(), opt::Rollback(), opt::SafeTime(), con::SafeTime(), spec::Step(), opt3::Step(), opt2::Step(), opt::Step(), con::Step(), adapt5::Step(), adapt4::Step(), adapt3::Step(), adapt2::Step(), and adapt::Step().
int PVT::getSpecEventCount | ( | ) | [inline] |
int PVT::getEventCount | ( | ) | [inline] |
void PVT::incSpecEventCount | ( | ) | [inline] |
Definition at line 159 of file gvt.h.
References specEventCount.
Referenced by adapt5::Step(), and adapt4::Step().
void PVT::incEventCount | ( | ) | [inline] |
Definition at line 160 of file gvt.h.
References eventCount.
Referenced by adapt5::Step(), and adapt4::Step().
void PVT::decEventCount | ( | ) | [inline] |
Definition at line 161 of file gvt.h.
References eventCount.
Referenced by opt::Rollback().
int PVT::done | ( | ) | [inline] |
Returns termination flag.
Definition at line 163 of file gvt.h.
References simdone.
Referenced by sim::Commit().
int PVT::objRegister | ( | int | arrIdx, | |
POSE_TimeType | safeTime, | |||
int | sync, | |||
sim * | myPtr | |||
) |
Register poser with PVT.
Definition at line 424 of file gvt.C.
References Converse::CkMyPe(), pvtObjects::Insert(), objs, and POSE_UnsetTS.
Referenced by sim::pup().
void PVT::objRemove | ( | int | pvtIdx | ) |
Unregister poser from PVT.
Definition at line 431 of file gvt.C.
References Converse::CkMyPe(), pvtObjects::Delete(), idx, and objs.
Referenced by sim::~sim().
void PVT::objUpdate | ( | POSE_TimeType | timestamp, | |
int | sr | |||
) |
Update send/recv table at timestamp.
Definition at line 438 of file gvt.C.
References estGVT, SRtable::Insert(), iterMin, localStats, pose_config, POSE_UnsetTS, SRtable::Restructure(), SendsAndRecvs, simdone, POSE_Config::stats, localStat::SwitchTimer(), localStat::TimerRunning(), localStat::TimerStart(), localStat::TimerStop(), and waitForFirst.
Referenced by sim::Cancel(), opt::CancelSpawn(), and sim::registerSent().
void PVT::objUpdateOVT | ( | int | pvtIdx, | |
POSE_TimeType | safeTime, | |||
POSE_TimeType | ovt | |||
) |
Update PVT with safeTime and send/recv table at timestamp.
Update PVT with safeTime.
Definition at line 474 of file gvt.C.
References Converse::CkMyPe(), estGVT, pvtObjectNode::getOVT(), pvtObjectNode::getOVT2(), index, pvtObjects::objs, objs, POSE_UnsetTS, pvtObjectNode::setOVT(), pvtObjectNode::setOVT2(), and simdone.
Referenced by sim::Status().
void PVT::reportReduce | ( | UpdateMsg * | m | ) |
ENTRY: Reduction point for PVT reports.
Reduction point for PVT reports.
Definition at line 497 of file gvt.C.
References addSR(), CkFreeMsg(), Converse::CkNumPes(), conGVT, UpdateMsg::conPVT, gvtTurn, localStats, UpdateMsg::maxSR, SRentry::next, UpdateMsg::numEntries, optGVT, UpdateMsg::optPVT, p, pose_config, POSE_UnsetTS, rdone, SRentry::recvs, reportEnd, reportReduceTo, reportsExpected, UpdateMsg::runGVTflag, SRentry::sends, simdone, UpdateMsg::SRs, SRs, POSE_Config::stats, localStat::TimerStart(), localStat::TimerStop(), and SRentry::timestamp.
void PVT::addSR | ( | SRentry ** | SRs, | |
SRentry * | e, | |||
POSE_TimeType | og, | |||
int | ne | |||
) |
Adds incoming send/recv information to a list.
Definition at line 924 of file gvt.C.
References SRentry::next, POSE_UnsetTS, SRentry::recvs, SRentry::sends, and SRentry::timestamp.
Referenced by reportReduce().
int PVT::getNumObjs | ( | ) | [inline] |
Definition at line 176 of file gvt.h.
References pvtObjects::getNumObjs(), and objs.
localStat* PVT::localStats [private] |
Definition at line 72 of file gvt.h.
Referenced by beginCheckpoint(), beginLoadbalancing(), callAtSync(), objUpdate(), pup(), PVT(), reportReduce(), resumeAfterCheckpoint(), resumeAfterLB(), setGVT(), and startPhase().
POSE_TimeType PVT::optPVT [private] |
POSE_TimeType PVT::conPVT [private] |
POSE_TimeType PVT::estGVT [private] |
Last GVT estimate.
Definition at line 79 of file gvt.h.
Referenced by beginCheckpoint(), getGVT(), objUpdate(), objUpdateOVT(), pup(), PVT(), resumeAfterCheckpoint(), resumeAfterLB(), setGVT(), and startPhase().
POSE_TimeType PVT::repPVT [private] |
int PVT::simdone [private] |
Simulation termination flag.
Definition at line 83 of file gvt.h.
Referenced by done(), objUpdate(), objUpdateOVT(), pup(), PVT(), reportReduce(), setGVT(), and startPhase().
POSE_TimeType PVT::iterMin [private] |
Minimum send/recv timestamp in this iteration.
Definition at line 85 of file gvt.h.
Referenced by objUpdate(), pup(), PVT(), and startPhase().
int PVT::waitForFirst [private] |
Flag to indicate waiting for first send/recv of next iteration.
Used to indicate when to restructure the SendsAndRecvs table
Definition at line 88 of file gvt.h.
Referenced by objUpdate(), pup(), PVT(), setGVT(), and startPhase().
SRtable* PVT::SendsAndRecvs [private] |
Table to store send/recv timestamps.
Definition at line 90 of file gvt.h.
Referenced by objUpdate(), pup(), PVT(), and startPhase().
pvtObjects PVT::objs [private] |
List of objects registered with this PVT branch.
Definition at line 92 of file gvt.h.
Referenced by callAtSync(), getNumObjs(), objRegister(), objRemove(), objUpdateOVT(), setGVT(), and startPhase().
int PVT::reportTo [private] |
reduction-related vars
Definition at line 94 of file gvt.h.
Referenced by pup(), PVT(), and startPhase().
int PVT::reportsExpected [private] |
int PVT::reportReduceTo [private] |
int PVT::reportEnd [private] |
int PVT::gvtTurn [private] |
int PVT::specEventCount [private] |
Definition at line 97 of file gvt.h.
Referenced by getSpecEventCount(), incSpecEventCount(), pup(), and PVT().
int PVT::eventCount [private] |
Definition at line 97 of file gvt.h.
Referenced by decEventCount(), getEventCount(), incEventCount(), pup(), and PVT().
int PVT::startPhaseActive [private] |
startPhase active flag
Definition at line 99 of file gvt.h.
Referenced by pup(), PVT(), resumeAfterCheckpoint(), resumeAfterLB(), and startPhase().
double PVT::parStartTime [private] |
starting time of the simulation
Definition at line 101 of file gvt.h.
Referenced by beginCheckpoint(), pup(), PVT(), resumeAfterCheckpoint(), resumeAfterLB(), and setGVT().
int PVT::parCheckpointInProgress [private] |
indicates if checkpointing is in progress
Definition at line 103 of file gvt.h.
Referenced by beginCheckpoint(), pup(), PVT(), resumeAfterCheckpoint(), and setGVT().
POSE_TimeType PVT::parLastCheckpointGVT [private] |
int PVT::parLBInProgress [private] |
indicates if load balancing is in progress
Definition at line 107 of file gvt.h.
Referenced by beginLoadbalancing(), pup(), PVT(), resumeAfterLB(), and setGVT().
POSE_TimeType PVT::parLastLBGVT [private] |
double PVT::parLastCheckpointTime [private] |
POSE_TimeType PVT::optGVT [private] |
optimistic and coservative GVTs
Definition at line 114 of file gvt.h.
Referenced by pup(), PVT(), and reportReduce().
POSE_TimeType PVT::conGVT [private] |
int PVT::rdone [private] |
TimePool* PVT::localTimePool [private] |