Next: Acknowledgements
Up: WARPED A TimeWarp Parallel
Previous: The Stopwatch class
Three types of dynamic memory managers have been added to the simulation
kernel. In addition, five major features have been added to the simulation
kernel code.
- Feature One (Removal of containers from input and state queue):
The inputQueue is now a queue of BasicEvents and the StateQueue is a queue
of BasicStates. The output queue still retains its original structure and
is a queue of containers with BasicEvent pointers.
Figure:
Pointers in the state
 |
- Feature Two(Introduction of queue pointers in the state): The
second optimization was introduced to reduce the searching in the queues
during rollback (this was found to be a major time consuming function in
the WARPED kernel). The basic idea is to have two pointers in the
state. One pointer to point to the current position in the input Queue,
and the other to point to the tail of the output Queue. Upon rollback,
the correct state is restored and from the restored state, we can
determine where to rollback in the inputQueue and in the output
queue. Figure
illustrates the new structure of the
queues. This significantly reduces the search time required in the queues
during rollback. In addition, garbage collection also works off the queue
pointers in the state. When GVT crosses the time of a state, garbage
collection routines are invoked on that state. This in turn will invoke
garbage collection routines on the input and the output queue. As the
state contains pointers to the input and output queue, garbage collection
of the input and output queues becomes trivial.
- Feature Three (One antimessage per rollback): Only one
antimessage is sent out upon rollback. The lowest timestamp antimessage is
sent out and the other antimessages are suppressed. At the receipient's
end, upon receiving an antimessage, all messages with timestamps greater
than that of the antimessages are deleted. This greatly reduces the total
number of messages that are generated in the system and improves
performance.
Figure:
Message Aggregation in WARPED
 |
- Feature Four(Message Aggregation capability): A MessageManager
module has been built on top of the MPI communication library. This
functionality has been added to the CommManager module.
Figure
illustrates the basic scheme. In message
passing environments, the message send time is dominated by overheads that
are relatively independent of the message size. Therefore, fine-grained
applications (such as TimeWarp simulators) suffer high overheads because
of frequent communication. This optimization optimizes the communication
subsystem of Time-Warp simulators using dynamic message
aggregation . Under this scheme, Time-Warp messages with the same
destination LP, occuring in close temporal proximity are dynamically
aggregated and sent as a single physical message. Several aggregation
strategies that attempt to minimize the communication overhead without
harming the progress of the simulation (because of messages being delayed)
have been developed.
- Feature Five (Terminate Simulation capability): A TimeWarp
simulation object can now terminate simulation by calling the
terminateSimulation(char *) method. When a TimeWarp object calls the
terminateSimulation(char *) method, the logical process (LP) on which the
object resides, sends a TERMINATE message to all other LPs. But be
forewarned that even though a call to terminateSimulation(char *)
causes the simulation to terminate cleanly
, it can violate causality in certain special cases and
potentially cause an incorrect simulation. The use of this function is
left to the user's discretion and it is the user's responsibility to make
sure that an incorrect simulation does not occur.
Next: Acknowledgements
Up: WARPED A TimeWarp Parallel
Previous: The Stopwatch class
Philip A. Wilsey
1/26/1998