next up previous
Next: Implementation of Parallel Up: Basic Simulator Design Previous: Message Delivery

Keeping Track of Simulation Time

In MPISIM, runtime measurement (see Chapter 4.4) is used to keep an estimate of the simulation time of each thread. Runtime measurement is implemented by inserting a timer start call at the end of each MPI function and a timer stop call at the beginning of each MPI function. This allows the simulation to get an execution time estimate of the code in between MPI functions, and increment the simulation time by this estimate. Since microsecond resolution is needed to time the smaller sections of code, a wall clock timer must be used. This is because CPU timers provide a resolution equal to one time slice, which is ten milliseconds, and too coarse grained for our purpose. Since we use a wall clock timer, the simulation must be executed as the only program on the host.



next up previous
Next: Implementation of Parallel Up: Basic Simulator Design Previous: Message Delivery



Andy Kahn
Wed Jun 25 20:28:02 PDT 1997