The GTW parallel simulator can be run in both interactive and batch modes of execution. In the batch mode, the simulation starts execution upon initiation and executes to completion without user intervention. In the new interactive mode, the simulation execution can be controlled by the user at run-time using a console-type command line interface.
An additional command line argument '-I' (see example) turns on the interactive feature of the simulator, and places the simulation in command mode at the start of the simulation. To achieve the same effect, alternatively, a new configuration option (INTERACTIVE=TRUE) can be placed in ".tw-config" configuration file of GTW.
The run-time command line interface of the simulator supports the following command set:
Command | Description |
help | Prints information about command set. This command is available in all simulator modes. See example. |
pause | Pauses a running simulation. All the threads of computation that constitute the simulator on the multiprocessor are actually blocked, and the simulator idles waiting for further input from the user. The simulator is said to have entered a paused mode. See example. |
step | Executes exactly one event on each processor. If there are no events for the LPs on a processor, then no event is executed on that processor. This command can be used to achieve an SPMD style of execution (Single Program Multiple Data) under user control. This command can be used only in paused mode. After the execution of (at most) one event on each processor, the simulator returns to the paused mode. See example. |
resume | Resumes the execution of the simulation. The simulator is said to have returned to running mode. Note that certain commands can be given to the simulator even while the simulator is in running mode. See example. |
exit | Normally schedules end of simulation. If the simulator is in paused mode at the time of this command, the simulation will end normally immediately after the paused mode is ended/changed by another command such as resume or step. |
quit | Immediately terminates the simulation. This is an abnormal termination, and hence no statistics summary information is printed before the termination. This command is available in all simulator modes. |
breakat [T] | Sets a logical break point at the given simulation time. When the global simulation time (GVT) just goes past the given time, then the simulator stops and automatically enters paused mode. The given time must be less than the current value of GVT. If no time argument is specified, then the time of the most recently set break point that is yet to be reached is printed. Currently, at most one break point can be set at any time. This command is available in all simulator modes. See example. |
removebreak | Removes the most recently set break point. |
trace[+] [prefix] | Initiates the generation of event execution traces. Each trace file contains a log of all the events executed by the corresponding processor (see example for current format). The trace files are named as the given filename prefix followed by .PE_ followed by the processor number, starting at 0. The default prefix is trace.out. For example, with default prefix, the trace files will be named trace.out.PE_0, etc. The trace+ command (note the '+') acts just like the trace command, except that it appends to the trace files if they already exist, instead of overwriting them. These commands are available in all simulator modes. See example. |
stoptrace | Stops the generation of event traces, if tracing is currently active. The corresponding files are closed. This command is available in all simulator modes. See example. |
gvt | Prints the current value of GVT (Global Virtual Simulation Time). This command is available in all simulator modes. See example. |
endtime [T] | Prints the current value of endtime. Endtime is a simulation time that is specified by the user such that any event that is scheduled for a time that is beyond endtime need not be processed. If the optional argument is specified, then the argument is used as the new value for endtime. This command is available in all simulator modes. |
fel [PE#] [filename] | Prints some information (LP, timestamp, etc) about all the events that have been currently scheduled into future simulation time but are not yet processed. For large applications, since the amount of output of this command could be potentially large, it is useful to specify filename as the name of the file to which the output must be written. If the PE# is specified, then only the corresponding processor's future event list is printed. This command is available in all simulator modes. |
peinfo [PE#] | Prints salient information about the processors used for the simulation. The information includes the processor number, the number logical processes currently assigned to that processor, the number of events processed and rolledback. If the argument is present, then it is taken as a processor number, and only information about that particular processor is printed. This command is available in all simulator modes. See example. |
pestats [PE#] | Prints detailed report of performance statistics for the processors used in the simulation. If the argument is present, then it is taken as a processor number, and only information about that particular processor is printed. This command is available in all simulator modes. See example. |
lpinfo [LP#] | Prints salient information about the logical processes in the simulation. The information includes the logical process number, the processor to which it is currently assigned, the simulation time to which it has (tentatively) advanced, the number of events processed and rolledback for that logical process, and its application-assigned name. If the argument is present, then it is taken as a logical process number, and only information about that particular logical process is printed. This command is available in all simulator modes. See example. |
lpstats [LP#] | Prints detailed report of performance statistics for the logical processes in the simulation. If the argument is present, then it is taken as a logical process number, and only information about that particular logical process is printed. This command is available in all simulator modes. See example. |
* LP# args | Submits args to the command processor routine of the logical process specified by LP#. This feature can be used by the application LPs, for example, to print a state variable specified by args. This command is available only when the simulator is in paused mode. |
pollfreq [nloops] | Changes the frequency with which the simulator polls to see if there is any input from the user. If the argument is specified, the frequency is set to the specified value. Otherwise the current value is printed. The default frequency value is 10. This command is available in all simulator modes. |
haven 1% phold 4 10000 -I -A 8 100 Using 100 messages on 8 LPs Paused at GVT = 0 PAUSED> help Commands: help, or h pause, or p step, or s resume, or r exit, or x quit, or q breakat [< time >] removebreak trace[+] [< filename-prefix >] stoptrace gvt endtime [< new-endtime >] fel [< pe# >] [< file >] peinfo [< pe# >] pestats [< pe# >] lpinfo [< lp# >] lpstats [< lp# >] * < lp# > ... pollfreq [< integer >] PAUSED> peinfo Number of PEs = 4 -------------------------------------------------- PE# #LPs #Events Processed RolledBack -------------------------------------------------- 0 2 0 (100.0%) 0 ( 0.0%) 1 2 0 (100.0%) 0 ( 0.0%) 2 2 0 (100.0%) 0 ( 0.0%) 3 2 0 (100.0%) 0 ( 0.0%) -------------------------------------------------- PAUSED> step RUNNING> Paused at GVT = 0 PAUSED> peinfo Number of PEs = 4 -------------------------------------------------- PE# #LPs #Events Processed RolledBack -------------------------------------------------- 0 2 1 (100.0%) 0 ( 0.0%) 1 2 1 (100.0%) 0 ( 0.0%) 2 2 1 (100.0%) 0 ( 0.0%) 3 2 1 (100.0%) 0 ( 0.0%) -------------------------------------------------- PAUSED> resume RUNNING> pause Paused at GVT = 1988.17 PAUSED> peinfo Number of PEs = 4 -------------------------------------------------- PE# #LPs #Events Processed RolledBack -------------------------------------------------- 0 2 52454 ( 94.8%) 2883 ( 5.2%) 1 2 68556 ( 79.9%) 17221 ( 20.1%) 2 2 68744 ( 79.1%) 18132 ( 20.9%) 3 2 69861 ( 78.4%) 19282 ( 21.6%) -------------------------------------------------- PAUSED> gvt Current GVT = 1988.17. PAUSED> breakat 2500 Break-point set at T = 2500. PAUSED> resume RUNNING> Paused at GVT = 2525.12 PAUSED> trace Tracing into "trace.out.PE_[0-3]". PAUSED> resume RUNNING> pause Paused at GVT = 2637.55 PAUSED> stoptrace Tracing stopped. PAUSED> resume RUNNING> pause Paused at GVT = 5002.28 PAUSED> pestats Number of PEs = 4 See "lpstats" for description of output. -------------------------------------------------------------------------------- PE# #LPs #Prcsd Effcy #Abort #Cncel #Strgl #RBSt #Secnd #RBScd LongRB -------------------------------------------------------------------------------- 0 2 132327 94.6% 0 422 3404 6688 224 797 57 1 2 172963 79.6% 0 2456 14693 40001 1530 4409 63 2 2 173185 79.1% 0 2470 15087 41319 1561 4431 60 3 2 175112 78.6% 0 2512 15612 43279 1568 4522 68 -------------------------------------------------------------------------------- PAUSED> lpstats Number of LPs = 8 Prcsd==Events processed, Abort==Events aborted, Cncel==Events canceled Effcy==Efficiency: Prcsd / (Prcsd+RBSt+RBScd) Strgl==Stragglers/Time-faults, RBSt==Events rolled back due to stragglers Secnd==Secondary rollbacks, RBScd==Events rolled back due to cancellations LongRB==Most number of events rolled back in a single stretch -------------------------------------------------------------------------------- LP# PE# #Prcsd Effcy #Abort #Cncel #Strgl #RBSt #Secnd #RBScd LongRB -------------------------------------------------------------------------------- 0 0 66149 94.7% 0 221 1685 3285 115 399 46 1 1 86694 79.5% 0 1227 7383 19991 792 2307 63 2 2 86184 79.2% 0 1223 7566 20374 772 2227 60 3 3 87470 78.6% 0 1259 7739 21541 789 2297 52 4 0 66178 94.6% 0 201 1719 3403 109 398 57 5 1 86269 79.6% 0 1229 7310 20010 738 2102 41 6 2 87001 79.0% 0 1247 7521 20945 789 2204 38 7 3 87642 78.5% 0 1253 7873 21738 779 2225 68 -------------------------------------------------------------------------------- PAUSED> resume RUNNING> *** Summary Time Warp Statistics*** No. of PEs 4 No. of LPs 8 Events processed 1315462 ( RG 1315462, OP 0, EX 0, NB 0, BL 0 ) No of Blocked Events 0 (0, 0) Events Aborted 0 ( RG 0, OP 0, EX 0, NB 0, BL 0 ) Processed Events Cncl'd 16628 ( RG 16628, OP 0 ) Straggler Induced RBs 99005 ( RG 99005, OP 0, EX 0, NB 0, BL 0 ) Processed Events RB'd 269018 ( RG 269018, OP 0 ) Cncl. Evnt Induced RBs 20842 Processed Events RB'd 59950 ( RG 59950, OP 0) Delayed RB 0 (0) Longest rollback 68 FossilCollect attempts 277 State Reclamation attempts 0.00 Net Events processed 969866 ( 73.73 %) Aborted Events 0 ( 0.00 %) Number of rollbacks 119847 Proc. Evnts RB'd 328968 ( 25.01 %) Proc. Evnts Cncl'd 16628 ( 1.26 %) Average RB Distance 2.74 Event Rate (Evnts/Sec) 4594.34 Execution time (Sec) 211.10 haven 2% head trace.out.PE_0 Execute:PE=0:LP=4:T=2525.23: Event:PE=0:LP=4:T=2525.23: thread = 8 State:PE=0:LP=4:T=2525.23: count = 31507 Execute:PE=0:LP=4:T=2525.27: Event:PE=0:LP=4:T=2525.27: thread = 67 State:PE=0:LP=4:T=2525.27: count = 31508 Execute:PE=0:LP=4:T=2525.34: Event:PE=0:LP=4:T=2525.34: thread = 95 haven 3% head trace.out.PE_1 Execute:PE=1:LP=1:T=2525.26: Event:PE=1:LP=1:T=2525.26: thread = 32 State:PE=1:LP=1:T=2525.26: count = 31795 Execute:PE=1:LP=1:T=2525.35: Event:PE=1:LP=1:T=2525.35: thread = 55 State:PE=1:LP=1:T=2525.35: count = 31796 Execute:PE=1:LP=1:T=2525.47: Event:PE=1:LP=1:T=2525.47: thread = 74 haven 5%
Kalyan Perumalla,
10 February 1998
Last updated 20 March 1999