Hi,
I am using ns-allinone-2.30. I was running the following example.tcl from
ns-allinone-2.30 using the command /home/where_i_installed ns/ns-
allinone-2.30/ns-2.30/ns example.tcl but I am getting the following error

ns: finish: couldn't execute "nam": no such file or directory
    while executing
"exec nam out.nam &"
    (procedure "finish" line 5)
    invoked from within
"finish"

I had set by PATH variable as

/home/louhaki/NS/ns-allinone-2.28/bin:/home/louhake/NS/ns-allinone-2.28/ns-
2.30:/home/louhaki/NS/ns-allinone-2.28/nam-1.12:/usr/j2se/bin:/home/louhaki/bin:/usr/local/bin:/usr/local/gnu/bin:/usr/bin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin:/usr/sbin:/opt/SUNWspro/bin:/usr/sfw/bin:/usr/sbin:/usr/local/teTeX/bin
I also included the line
export PATH=/home/louhaki/NS/ns-allinone-2.28/nam-1.12
export PATH=$PATH:/home/louhaki/NS/ns-allinone-2.30/ns-2.30
/bin:/home/louhaki/NS/ns-allinone-2.30/tcl8.4.13/unix:/home/louhaki/NS/ns-
allinone-2.30/tk8.4.13/unix
 in .bashrc. Yet the problem persists.....Can anybody help

The file is
set ns [new Simulator]

set nf [open out.nam w]
$ns namtrace-all $nf

proc finish {} {
     global ns nf
     $ns flush-trace
     close $nf
     exec nam out.nam &
     exit 0
     }

set n0 [$ns node]
set n1 [$ns node]

$ns duplex-link $n0 $n1 1Mb 10ms DropTail

$ns at 5.0 "finish"
$ns run


-

Reply via email to