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

Re: [ns] Problems with MAKE-LAN



does this error appear if you run 'nam out.nam' separately?

- difa

On Wed, 7 Nov 2001, Jorge Lores wrote:

> When I try to run a tcl with LANS, the following error messages is dispalyed :
>
> "error while reading last line of out.nam".
>
> Does anybody knows what have I done wrong ??
>
> Here is my tcl
> #
>
> # Created using Matthew B. Doar's `tiers` topology generator with parameters:
>
> # tiers 1 1 1 1 1 10 1 1 1 1 1 856566616
>
> #
>
> #
>
> proc create_net {} {
>
> global ns_
>
> global nodes_
>
> global rt_
>
> set ns_ [new Simulator]
>
> set i 0
>
> while {$i < 2} {
>
> set nodes_($i) [$ns_ node]
>
> incr i
>
> }
>
>
> $ns_ make-lan "$nodes_(0) $nodes_(1) " 1000 0 LL Queue/DropTail Mac/802_3
>
>
> }
>
> create_net
>
>
>
> #Open the nam trace file
>
> set nf [open out.nam w]
>
> $ns_ namtrace-all $nf
>
>
>
> proc finish {} {
>
> global ns_ nf
>
> $ns_ flush-trace
>
> #Close the trace file
>
> close $nf
>
> #Execute nam on the trace file
>
> exec nam out.nam &
>
> exit 0
>
> }
>
> #Call the finish procedure after 2 seconds of simulation time
>
> $ns_ at 2.0 "finish"
>
> #Run the simulation
>
> $ns_ run
>
>