void POSE_init() Initializes various items in POSE; creates the load balancer
if load balancing is turned on; initializes the statistics
gathering facility if statistics are turned on.
Must be called in user's main program prior to creation of any
simulation objects or reference to any other POSE construct.
void POSE_start() Sets busy wait to default if none specified; starts
quiescence detection; starts simulation timer.
Must be called in user's main program when simulation
should start.
void POSE_registerCallBack(CkCallback cb) Registers callback function with POSE - when program
ends or quiesces, function is called.
CkCallback is created with the index of the callback
function and a proxy to the object that function is to be
called on. For example, to register the function wrapUp
in the main module as a callback:
void POSE_stop() Commits remaining events; prints final time and
statistics (if on); calls callback function.
Called internally when quiescence is detected or
program reaches POSE_endtime.
void POSE_exit() Similar to CkExit().
void POSE_set_busy_wait(int n) Used to control granularity of events; when calling
POSE_busy_wait, program busywaits for time to compute .
void POSE_busy_wait() Busywait for time to compute where n is either
1 or set by POSE_set_busy_wait.
POSE_useET(t) Set program to terminate when global
virtual time (GVT) reaches .
POSE_useID() Set program to terminate when no events are available
in the simulation.
void POSE_create(constructorName(eventMsg *m), int
handle, int atTime) Creates a poser object given its constructor, an event
message of the appropriate type, any integer as the handle
(by which the object will be referred from then on), and a
time (in simulation timesteps) at which it should be created.
The handle can be thought of as a chare array element
index in Charm++.
void POSE_invoke_at(methodName(eventMsg *m),
className, int handle, int atTime) Send a methodName event with message to an
object of type className designated by handle
at time specified by .
This can be used by non-poser objects in the POSE
module to inject events into the system being simulated. It
should not be used by a poser object to generate an event.
void POSE_invoke(methodName(eventMsg *m),
className, int handle, int timeOffset) Send a methodName event with message to an
object of type className designated by handle
at current OVT + .
This is used by poser objects to send events from one
poser to another.
void POSE_local_invoke(methodName(eventMsg
*m), int timeOffset) Send a methodName event with message to this
object at current OVT + .
This is used by poser objects to send events to themselves.
void CommitPrintf(char *s, args...) Buffered print statement; prints when event is
committed (i.e. will not be rolled back).
Currently, must be called on the wrapper class
(parent) to work properly, but a fix for this is in the works.
void CommitError(char *s, args...) Buffered error statement; prints and aborts program
when event is committed.
Currently, must be called on the wrapper class
(parent) to work properly, but a fix for this is in the works.
void elapse(int n) Elapse simulation time units.
poser Keyword (used in place of chare) to denote a poser
object in the .ci file of a POSE module.
event Keyword used in square brackets in the .ci file
of a POSE module to denote that the entry method is an event method.
eventMsg Base class for all event messages; provides timestamp,
priority and many other properties.
OVT() Returns the object virtual time (OVT) of the poser in
which it is called
void ::terminus() When simulation has terminated and program is about to exit, this method is called on all posers. Implemented as an empty method in the base rep class, the programmer may choose to override this with whatever actions may need to be performed per object at the end of the simulation.