3.2 Event Message and Poser Interface Description

Messages, be they event messages or otherwise, are described in the .ci file exactly the way they are in CHARM++. Event messages cannot make use of CHARM++'s parameter marshalling, and thus you must declare them in the .h file. CHARM++ varsize event messages are currently not implemented in POSE.

All event messages inherit from a POSE type eventMsg which includes data for timestamps and miscellaneous POSE statistics.

 
message myMessage;

Posers are described similar to chares, with a few exceptions. First, the poser keyword is used to denote that the class is a POSE simulation object class. Second, event methods are tagged with the keyword event in square brackets. Finally, three components are specified which indicate how objects of the poser class are to be simulated. The sim component controls the wrapper class and event queue used by the object. The strat component controls the synchronization strategy the object should use (i.e. adaptive or basic optimistic). The rep component specifies the global state representation, which controls how the global state is kept accurate depending on the synchronization strategy being used (i.e. checkpointing or no checkpointing). Currently, there is only one wrapper type, sim. This 3-tuple syntax is likely to become obsolete, replaced simply by synchronization strategy only. Keeping the global state accurate is largely a function of the synchronization strategy used.

 
poser mySim : sim strat rep {
entry mySim(myMessage *);
entry [event] void myEventMethod(eventMsg *);
...
};

A typical .ci file poser specification might look like this:

 
poser Worker : sim adapt4 chpt {
entry Worker(WorkerCreationMsg *);
entry [event] void doWork(WorkMsg *);
...
};

Note that the constructors and event methods of a poser must take an event message as parameter. If there is no data (and thereby no message defined) that needs to be passed to the method, then the parameter should be of type eventMsg *. This ensures that POSE will be able to timestamp the event.

November 07, 2009
POSE Homepage
Charm Homepage