[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run ns-2 simu a second time?



Chris,

> can anybody give me a hint how to invoke a second simulation within the same 
> tcl-script? After destroying the (all?) objects for the first simulation, ns 
> crashes when invoking

As you have probably realised by now, ns does not have a clean way
to run multiple simulation scripts in sequence from a single tcl script.

Ahmed suggested ways in which you can accomplish this in a limited context,
in which you run multiple different simulations over a single topology.

My solution is to use a shell script wrapper to accomplish this goal.
I have a script called runq (that is available on my web page at
http://www.isi.edu/~kannan/code/srm-scripts.tar.gz).  runq takes a
workload file, containing a list of commands, and executes them one
after the other.  One added feature is that you can runq from multiple
machines simultaneously (nobody told me you cannot run a sequential
simulator in parallel :-) on the same workload file.  Each machine
will pick up and execute the next command in the file, execute it
to completion, and then pick up the next command.  The commands need
not be ns specific.  runq ensures that no two machines will pick up
the same job, and no machine is idle until the workload is completed.
(Think of the Linda process model (I hope I have got my OS facts right
in that statement :-)).

In the expectation that there might be general interest in this program,
I am also putting it in http://www.isi.edu/~kannan/code/runq.sh.


Kannan

--
[email protected]
http://www.isi.edu/~kannan