PPL Logo

opt Class Reference

#include <opt.h>

Inheritance diagram for opt:

Inheritance graph
[legend]
Collaboration diagram for opt:

Collaboration graph
[legend]

Public Member Functions

 opt ()
 Basic Constructor.
void initSync ()
 Initialize the synchronization strategy type of the poser.
virtual void Step ()
 Perform a single forward execution step.
POSE_TimeType SafeTime ()
 Compute safe time for object.
void AddSpawnedEvent (int AnObjIdx, eventID evID, POSE_TimeType ts)
 Add spawned event to current event's spawned event list.
void CancelSpawn (Event *e)
 Send cancellation messages to all of event e's spawned events.

Data Fields

int cpRate
 Checkpoint rate.
unsigned int specEventCount
unsigned int eventCount
unsigned int stepCount
unsigned int avgEventsPerStep
unsigned int rbCount
unsigned int jumpCount
POSE_TimeType avgRBoffset
POSE_TimeType avgTimeLeash
POSE_TimeType avgJump
unsigned short int rbFlag

Protected Member Functions

virtual void Rollback ()
 Rollback to predetermined RBevent.
virtual void RecoverState (Event *recoveryPoint)
 Recover checkpointed state prior to ev.
virtual void CancelEvents ()
 Cancel events in cancellation list that have arrived.
virtual void CancelUnexecutedEvents ()
virtual void UndoEvent (Event *e)
 Undo a single event, cancelling its spawned events.

Protected Attributes

int idle
 Idle measure.

Detailed Description

Definition at line 6 of file opt.h.


Constructor & Destructor Documentation

opt::opt (  )  [inline]

Basic Constructor.

Definition at line 40 of file opt.h.

References avgRBoffset, cpRate, pose_config, POSE_TimeMax, POSE_Config::store_rate, and strat::STRAT_T.


Member Function Documentation

void opt::Rollback (  )  [protected, virtual]

Rollback to predetermined RBevent.

Undo a single event, cancelling its spawned events

Cancel events in cancellation list that have arrived

Cancel events in cancellation list that have arrived

Recover checkpointed state prior to ev

Reimplemented from strat.

Definition at line 41 of file opt.C.

References avgRBoffset, eventQueue::back(), sim::basicStats, CancelEvents(), sim::cancels, CancelSpawn(), CancelUnexecutedEvents(), CmiWallTimer(), Event::commitBfr, Event::commitBfrLen, Event::commitErr, Event::cpData, strat::currentEvent, eventQueue::currentPtr, PVT::decEventCount(), eventQueue::DeleteEvent(), EqHeap::DeleteEvent(), Event::done, strat::eq, eventQueue::eqh, eventCount, eventQueue::eventCount, CancelNode::evID, Event::evID, eventQueue::FindLargest(), Event::fnIdx, free(), eventQueue::front(), PVT::getGVT(), CancelList::GetItem(), CancelList::IsEmpty(), strat::localPVT, strat::localStats, rep::localTimePool, eventQueue::mem_usage, Event::msg, Event::next, strat::parent, pose_config, POSE_UnsetTS, Event::prev, rbCount, eventQueue::RBevent, rbFlag, RecoverState(), CancelList::RemoveItem(), sim::ResolveFn(), localStat::Rollback(), Event::serialCPdata, Event::serialCPdataSz, eventQueue::SetCurrentPtr(), eventQueue::ShiftEvent(), POSE_Config::stats, localStat::SwitchTimer(), strat::targetEvent, CancelNode::timestamp, Event::timestamp, TimePool::tmp_free(), POSE_Config::trace, traceUserBracketEvent(), localStat::Undo(), UndoEvent(), sim::UNDOs, strat::userObj, and rep::usesAntimethods().

Referenced by spec::Step(), opt3::Step(), opt2::Step(), Step(), adapt5::Step(), adapt4::Step(), adapt3::Step(), adapt2::Step(), and adapt::Step().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void opt::RecoverState ( Event recoveryPoint  )  [protected, virtual]

Recover checkpointed state prior to ev.

Searches backward from recoveryPoint without undoing events or cancelling their spawn, until a checkpoint is found. Then restores the state from this found checkpoint, and uses pseudo-re-execution to return back to recoveryPoint. This means that events are re-executed to reconstruct the state, but any events they would have spawned are not respawned, since they were never cancelled.

Referenced by Rollback().

Here is the caller graph for this function:

virtual void opt::CancelEvents (  )  [protected, virtual]

Cancel events in cancellation list that have arrived.

This will go through all the cancellations and remove whatever has arrived already. For events that have already been executed, a rollback is performed. No forward execution happens until all the cancellations have been examined.

Reimplemented from strat.

Referenced by Rollback(), spec::Step(), opt3::Step(), opt2::Step(), Step(), adapt5::Step(), adapt4::Step(), adapt3::Step(), adapt2::Step(), and adapt::Step().

Here is the caller graph for this function:

virtual void opt::CancelUnexecutedEvents (  )  [protected, virtual]

Referenced by Rollback(), spec::Step(), opt3::Step(), opt2::Step(), Step(), adapt5::Step(), adapt4::Step(), adapt3::Step(), adapt2::Step(), and adapt::Step().

Here is the caller graph for this function:

virtual void opt::UndoEvent ( Event e  )  [protected, virtual]

Undo a single event, cancelling its spawned events.

Referenced by Rollback().

Here is the caller graph for this function:

void opt::initSync (  )  [inline, virtual]

Initialize the synchronization strategy type of the poser.

Reimplemented from strat.

Definition at line 49 of file opt.h.

References strat::parent, and sim::sync.

void opt::Step (  )  [virtual]

Perform a single forward execution step.

Basic Optimistic Synchronization Strategy.

Prior to the forward execution, cancellation and rollback are done if necessary. Derived strategies typically just reimplement this method

Perform a single forward execution step

Reimplemented from strat.

Reimplemented in adapt, adapt2, adapt3, adapt4, adapt5, opt2, opt3, and spec.

Definition at line 5 of file opt.C.

References CancelEvents(), sim::cancels, CancelUnexecutedEvents(), strat::currentEvent, eventQueue::currentPtr, Event::done, strat::eq, eventCount, Event::fnIdx, PVT::getGVT(), idle, CancelList::IsEmpty(), strat::localPVT, strat::localStats, localStat::Loop(), eventQueue::mem_usage, Event::msg, strat::parent, pose_config, POSE_Objects, POSE_TimeMax, POSE_UnsetTS, eventQueue::RBevent, sim::ResolveFn(), Rollback(), prioMsg::setPriority(), eventQueue::ShiftEvent(), specEventCount, POSE_Config::stats, sim::Status(), stepCount, and Event::timestamp.

Here is the call graph for this function:

POSE_TimeType opt::SafeTime (  )  [inline, virtual]

Compute safe time for object.

Safe time is the earliest timestamp that this object can generate given its current state (assuming no stragglers, cancellations or events are subsequently received

Reimplemented from strat.

Definition at line 58 of file opt.h.

References sim::cancels, eventQueue::currentPtr, strat::eq, CancelList::getEarliest(), PVT::getGVT(), strat::localPVT, rep::OVT(), strat::parent, POSE_UnsetTS, Event::timestamp, and strat::userObj.

Here is the call graph for this function:

void opt::AddSpawnedEvent ( int  AnObjIdx,
eventID  evID,
POSE_TimeType  ts 
) [inline]

Add spawned event to current event's spawned event list.

Definition at line 90 of file opt.h.

References eventQueue::AddSpawnToCurrent(), and strat::eq.

Here is the call graph for this function:

void opt::CancelSpawn ( Event e  )  [inline]

Send cancellation messages to all of event e's spawned events.

Definition at line 94 of file opt.h.

References CmiWallTimer(), SpawnedEvent::evID, cancelMsg::evID, strat::localPVT, PUP::m, SpawnedEvent::next, SpawnedEvent::objIdx, PVT::objUpdate(), pose_config, POSE_Objects, POSE_TimeMax, cancelMsg::setPriority(), Event::spawnedList, SpawnedEvent::timestamp, cancelMsg::timestamp, POSE_Config::trace, and traceUserBracketEvent().

Referenced by Rollback().

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

int opt::idle [protected]

Idle measure.

Definition at line 9 of file opt.h.

Referenced by Step().

Checkpoint rate.

Checkpoint once for every cpRate events

Definition at line 33 of file opt.h.

Referenced by opt().

Definition at line 35 of file opt.h.

Referenced by Step(), adapt5::Step(), adapt4::Step(), and adapt3::Step().

unsigned int opt::eventCount

Definition at line 35 of file opt.h.

Referenced by Rollback(), Step(), adapt5::Step(), adapt4::Step(), and adapt3::Step().

unsigned int opt::stepCount

Definition at line 35 of file opt.h.

Referenced by Step().

Definition at line 35 of file opt.h.

unsigned int opt::rbCount

Definition at line 36 of file opt.h.

Referenced by Rollback().

unsigned int opt::jumpCount

Definition at line 36 of file opt.h.

Definition at line 37 of file opt.h.

Referenced by opt(), Rollback(), adapt5::Step(), adapt4::Step(), and adapt3::Step().

Definition at line 37 of file opt.h.

Definition at line 37 of file opt.h.

unsigned short int opt::rbFlag

Definition at line 38 of file opt.h.

Referenced by Rollback(), adapt5::Step(), adapt4::Step(), adapt3::Step(), adapt2::Step(), and adapt::Step().


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

Generated on Mon Sep 21 08:28:18 2020 for Charm++ by  doxygen 1.5.5