LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem with running tcl script under ns 2.33 (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-running-tcl-script-under-ns-2-33-a-843581/)

manjunath11 03-16-2011 12:13 PM

hi,when i ran mipv6_scenarios.tcl on ns 2.33 patched mobiWan, i got segmentation fault, please somebody me help to remove

manju@manju-desktop:~/Desktop$ ns mipv6_simu_scenario1.tcl
num_nodes is set 8
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl (except for MobiWAN simulations)
200 200 0
INITIALIZE THE LIST xListHead
300 200 0
400 200 0
500 200 0
600 300 0

>-------------------- NS Addressing --------------------<
Domains (domain_num) : 2
Clusters (cluster_num) : 1 6
Nodes (nodes_num) : 1 1 3 1 1 1 1
>-------------------------------------------------------<

SORTING LISTS ...DONE!
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
39.1023 get_coa for BS 1.5.0:4204544
39.1041 get_coa for BS 1.2.0:4198400
39.1052 get_coa for BS 1.4.0:4202496
39.108 get_coa for BS 1.3.0:4200448
66.2224 get_coa for BS 1.4.0:4202496
67.3702 get_coa for BS 1.3.0:4200448
68.9498 get_coa for BS 1.2.0:4198400
95.9646 get_coa for BS 1.4.0:4202496
98.6051 get_coa for BS 1.5.0:4204544
107.523 get_coa for BS 1.4.0:4202496
108.321 get_coa for BS 1.3.0:4200448
109.023 get_coa for BS 1.2.0:4198400
Segmentation fault

knudfl 03-17-2011 05:54 AM

# 46, @ manjunath11 : Please edit post 46 to use 'Code tags' :
I.e. write [/code] at code text end, and [code] at start.

mipv6_scenarios.tcl and mipv6_simu_scenario1.tcl are unknown file names.

Please upload the code to a pastebin site, or attach the file(s) by using
the "paper clip button" in the 'Advanced Editor'.
Files with suffix .txt can be attached : mipv6_simu_scenario1.tcl.txt

..

abhishek majumder 05-06-2011 05:16 AM

after installation of ns2.33 to install mobiwan the following link will be very much useful:
http://techsolns4u.blogspot.com/search/label/Mobiwan

abhishek majumder 05-06-2011 05:40 AM

The following link may be useful for you.
http://techsolns4u.blogspot.com/search/label/Mobiwan

yotta15 06-27-2012 01:13 PM

Error segmentation default when runnin a script
 
Quote:

Originally Posted by rochd (Post 4258024)
I'm still stuck in this error please help me
*************
rochd@rochd-laptop:~/ns-allinone-2.33/ns-2.33$ ns simple-mipv6.tcl
num_nodes is set 5
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl (except for MobiWAN simulations)
INITIALIZE THE LIST xListHead

>-------------------- NS Addressing --------------------<
Domains (domain_num) : 2
Clusters (cluster_num) : 1 5
Nodes (nodes_num) : 1 1 3 1 1 1
>-------------------------------------------------------<

Erreur de segmentation
**************

Hello knudfl,
I'm facing the same error "Segmentation Default" when running the same script "simple-mipv6.tcl " .
I installed n2.33 in ubunutu 10.10.
Bureau/Install-NS2.33/ns-allinone-2.33/ns-2.33/tcl/mobiwan# ns simple-mipv6.tcl
num_nodes is set 5
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl (except for MobiWAN simulations)
INITIALIZE THE LIST xListHead

>-------------------- NS Addressing --------------------<
Domains (domain_num) : 2
Clusters (cluster_num) : 1 5
Nodes (nodes_num) : 1 1 3 1 1 1
>-------------------------------------------------------<


Erreur de segmentation

Can you help me plz ??

rkpsb 10-23-2012 03:31 AM

Have a problem with compiling the tcl file
 
Hi i have encountered a problem while compiling a .tcl file using ns. It is showing an error as shown below;

num_nodes is set 2
INITIALIZE THE LIST xListHead
can't read "udp0": no such variable
while executing
"$cbr0 attach-agent $udp0"
(file "wireless.tcl" line 84)

The tcl file is generated using NSG2 simulator. Please so help me in this problem asap.

OS: Ubuntu 12.10 64-bit

knudfl 10-23-2012 04:36 AM

Welcome to LQ.

example1b.tcl http://www.isi.edu/nsnam/ns/tutorial.../example1b.tcl
from http://www.isi.edu/nsnam/ns/tutorial/nsscript1.html
Code:

.
.
27 set udp0 [new Agent/UDP]
28 $ns attach-agent $n0 $udp0
.
30 # Create a CBR traffic source and attach it to udp0
.
34 $cbr0 attach-agent $udp0
.
41 $ns connect $udp0 $null0
.
.

I.e. the variable "udp0" must be defined before it can be used ...

→ → Some of the scripts generated with NSG2.1 may need editing before they are usable.

NSG2.1.jar https://fe91046d-a-62cb3a1a-s-sites....attredirects=0


.

abenmariem 02-10-2014 07:01 PM

Problem when running simple-mipv6.tcl file
 
Hello,
I am on ubuntu 13.10 and i installed ns2.33 using this link:
http://techsolns4u.blogspot.com/2011...on-in-ns2.html
After finishing the installation, i tryed the tcl file simple-mipv6.tcl: i copied it into ns2.33 directory and i taped the command ns simple-mipv6.tcl.
Then i got this error: invalid command name "Agent/MN" while executing "Agent/MN set bs_forwarding_ 0 "file "simple-mipv6.tcl" line 13)
I put these lines in the top of the tcl file and the problem persists:
source /home/abderrahmen/repo3/ns-allinone-2.33/ns-2.33/tcl/lib/proc-mipv6-config.tcl
source /home/abderrahmen/repo3/ns-allinone-2.33/ns-2.33/tcl/lib/proc-tools.tcl
source /home/abderrahmen/repo3/ns-allinone-2.33/ns-2.33/tcl/lib/proc-topo.tcl
source /home/abderrahmen/repo3/ns-allinone-2.33/ns-2.33/tcl/lib/ns-topoman.tcl
source /home/abderrahmen/repo3/ns-allinone-2.33/ns-2.33/tcl/lib/proc-mobi-global.tcl
source /home/abderrahmen/repo3/ns-allinone-2.33/ns-2.33/tcl/lib/proc-mobi-config.tcl
source /home/abderrahmen/repo3/ns-allinone-2.33/ns-2.33/tcl/mobility/timer.tcl
Does you have any suggestions about the cause of the problem ?

knudfl 02-11-2014 05:35 AM

1 Attachment(s)
# 53 .
http://techsolns4u.blogspot.com/2011...on-in-ns2.html
.. would work in a very old OS.

This has worked from Ubuntu 10.10, and with all later versions :
Post #37 http://www.linuxquestions.org/questi...304/page3.html
$ cd ns-allinone-2.33/ns-2.33/ && patch -p1 < ns-233-mobiwan-1.patch
$ cd ../ && export CC=gcc41 CXX=g++41 && ./install

All mobiwan info http://www.linuxquestions.org/questions/tags/mobiwan/

The edited file "simple3_mipv6.tcl" can be run from ns-allinone-2.33/ns-2.33/simple3_mipv6.tcl.
-

abenmariem 02-11-2014 05:36 AM

@Elenka
Can you share your solution for the problem :
invalid command name "Agent/MN" while executing "Agent/MN set bs_forwarding_ 0 "file "simple-mipv6.tcl" line 13)

knudfl 02-11-2014 08:06 AM

# 55 .
Quote:

invalid command name "Agent/MN"
That's a failed build of "ns-allinone-2.33 + ns-233-mobiwan-1.patch".

Or you could be using a wrong executable 'ns'.

The proof method is : Rename or copy the right 'ns' to 'ns-mobiwan',
and then $ sudo cp ns-mobiwan /usr/local/bin/
... Then you can do $ ns-mobiwan simple3_mipv6.tcl

.

abenmariem 02-11-2014 08:26 AM

Solution to invalid command name "Agent/MN" problem
 
1 Attachment(s)
I am on ubuntu 13.10 32bits
Hello i managed to solve the problem using the commands from this link:http://www.linuxquestions.org/questi...304/page3.html

For an existing ns-2.33 :
cd /usr/local/bin
rm *

cd ns-allinone-2.33/ns-2.33/ ;
patch -p1 < ns-233-mobiwan-1.patch ;sudo make clean;
./configure ;make ;
cd ns-allinone-2.33/bin ;
cp ns ns-mobiwan ( To have a backup, and to be sure the right ns is used.)
sudo cp ns-mobiwan /usr/local/bin/ ;
cd ns-2.33;
./ns-mobiwan simple3_mipv6.tcl.txt : Works perfectly, and nam opens.
The file simple3_mipv6.tcl.txt is attached to this post.
the used patch file is ns-233-mobiwan-1.patch.txt:


All times are GMT -5. The time now is 06:51 PM.