I am trying to run CRCN protocol in ns2.31 but every time i am getting this error,
Hello guys. When ever i tried to run CRCN protocol i am getting following error:
harsh@ubuntu:~/ns3/test$ ns test1.tcl num_nodes is set 10 missing operator at _@_ in expression "$i < $val(ni) _@_$val(channum) " (parsing expression "$i < $val(ni) $val(cha...") invoked from within "for {set i 0} {$i < $val(ni) $val(channum) } {incr i} { $ns_ add-channel $i $chan_($i) }" (file "test1.tcl" line 48) Can someone guide me how to correct this error?? Thank you |
Welcome to LQ.
»test1.tcl« : Unknown file. Please attach `test1.tcl´ as test1.tcl.txt * Attachments : The paper clip tool in the 'Advanced Editor'. CRCN simulation examples : crcn-examples_05.2014.tar.gz Link https://drive.google.com/file/d/0B7S...ew?usp=sharing CRCN info http://www.linuxquestions.org/questions/tags/crcn/ ? Any questions ? Then please specify your OS : a) Please show the reply from the command $ uname -m b) OS name and version. P.S. : CRCN isn't going to have full functionality on a contemporary OS. Oldish OS´s for CRCN : CentOS 6 and may be Ubuntu 10.04 ... . http://www.linuxquestions.org/questi...-4175503601/#2 . http://www.linuxquestions.org/questi...-4175499622/#7 - |
CRCN issue
1 Attachment(s)
Thank you knudfl for replying on my issue.
Output for uname -m command is i686 And my Test1 file is below: set val(chan) Channel/WirelessChannel ; #Channel Type set val(prop) Propagation/TwoRayGround ; #Radio propagation model set val(netif) Phy/WirelessPhy ; #Network interface type set val(ant) Antenna/OmniAntenna ; #Antenna model set val(rp) WCETT ;#Routing Protocol set val(ifq) Queue/DropTail/PriQueue ;# interface queue type set val(ifqlen) 50 ;# max packet in ifq set val(mac) Mac/802_11 ;# MAC type set val(ll) LL ;# link layer type set val(nn) 10 ;# number of mobilenodes set val(ni) 2 set val(channum) 4 ;# number of interfaces set val(cp) /home/harsh/ns3/test/ranm1.tcl ; # topology traffic file set val(stop) 50 ;# simulation time # ================================================================== # Main Program # ====================================================================== # Initialize Global Variables set ns_ [new Simulator] set tracefd [open /home/harsh/ns3/test/test1.tr w] $ns_ trace-all $tracefd # set up topography object set topo [new Topography] $topo load_flatgrid 1000 1000 #create nam set namtrace [open /home/harsh/ns3/test/test1.nam w] $ns_ namtrace-all-wireless $namtrace 1000 1000 # Create God set god_ [create-god $val(nn)] # configure node $ns_ node-config -adhocRouting $val(rp) -llType $val(ll) -macType $val(mac) -ifqType $val(ifq) -ifqLen $val(ifqlen) -antType $val(ant) -propType $val(prop) -phyType $val(netif) -topoInstance $topo -agentTrace ON -routerTrace ON -macTrace ON -movementTrace ON for {set i 0} { $i < $val(ni)} {incr i} { set chan_($i) [new $val(chan)] } #configure for interface and channel $ns_ node-config -ifNum $val(ni) -channel $chan_(0) for {set i 0} {$i < $val(ni) $val(channum) } {incr i} { $ns_ add-channel $i $chan_($i) } for {set i 0} {$i < $val(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) set recordIfall 1 $node_($i) random-motion 0 ;# disable random motion } source $val(cp) ; #source topology and traffic file generated by others # Tell nodes when the simulation ends for {set i 0} {$i < $val(nn) } {incr i} { $ns_ at $val(stop).0 "$node_($i) reset"; } $ns_ at $val(stop).0002 "puts \"NS EXITING...\" ; $ns_ halt " proc stop {} { global ns_ tracefd $ns_ flush-trace close $tracefd exec nam /home/harsh/ns3/test/test1.nam & exit 0 } puts "Starting Simulation..." $ns_ run Sorry knudfl its a big file and i am really appriciated your help. Thanking you in advance. |
Repeat, from post #2 :
" b) OS version ..." please → → $ cat /etc/issue * About test1.tcl : The file `ranm1.tcl´ is missing. * Please attach as "ranm1.tcl.txt". - |
CRCN issue
2 Attachment(s)
Sorry i miss that second thing you asked.
uname: i686 Version: Ubuntu 14.04.1 LTS \n \l Test and random file i have attached with this. These files are new files which i created just few hours ago. Here Test file is executing properply but when i am trying to run random file it is generating error. I am really appriciating your help knudfl. Thank you so much |
← #5 .
The attached random.tcl.txt is a copy of the original CRCN random.tcl. "random.tcl" is not a simulation tcl file. Is a "movement file" to be used by a CRCN <simulation>.tcl file. Quote:
$ ns-crcn test.tcl.txt : No issues here. - |
CRCN Issue
Thank you for reply,
But i want a graphical representation of Throughput and interference measurement. How can i get that?? Is TEXT.tr file working fine ?? Thanking you Harsh Vaidya |
1 Attachment(s)
← #7 .
Quote:
Please test and read some examples which can generate graphical output : 1) xgraph_ns2-files-tcl_11.2014.tar.gz → https://drive.google.com/file/d/0B7S...ew?usp=sharing .... and read the included documentation → example4.tcl → Marc Greis, VIII. Creating Output Files for Xgraph. 2) crcn-wcett Xgraph examples : crcn-wcett.tar.bz2 3) ns-allinone-2.3x/ns-2.3x/tcl/ex/red-pd/ → $ ./runall.sh ... which will show how to generate formats other than xgraph. * Required : $ sudo apt-get install csh gnuplot - |
Continue Error
2 Attachment(s)
Hi kundlf,
Now try this program. When i am trying to add interface and channel, it is giving me the same error. I attaching necessary programs. please help me with this. I am running low on my deadlines. I really appreciate your help. Thanking you, Harsh |
← #9 .
The file attached to post #9 works OK here : $ ns-crcn CRCN.tcl .. the files CRCN.nam 41.7 MB, CRCN.tr 33.5 MB are created. |
what is the command :
Is it $ns CRCN.tcl or $ns-crcn CRCN.tcl |
And what system you are using ??
It is giving me the same error that i've pasted in first post. |
← #12 .
$ ns-crcn : That's the [ns-2.31 + crcn] executable built with Ubuntu 10.10 - 32bits. Can be installed as a package, crcn-ns-2.31-ubuntu10_i386.deb https://drive.google.com/file/d/0B7S...ew?usp=sharing * Will work OK with most 32bits (i686) OS. ( Not WCETT on Ubuntu 14.04). Or $ ns231-crcn : Also OK with your `CRCN.tcl´ Output files : Same sizes, 41.7 MB and 33.5 MB. The executable was built with a contemporary OS, 27 Aug 2014. OS = PCLinuxOS, probably version 2014.08 . I will test if a build of [ns-2.31 + crcn] is OK with Ubuntu 14.04 - 32. ... Later. - |
← #12, #13.
Ubuntu 14.04.01 - i686 with CRCN. $ tar xvf ns-allinone-2.31.tar.gz $ cd ns-allinone-2.31/ $ patch -p0 crcn_ns231.patch https://drive.google.com/file/d/0B7S...ew?usp=sharing $ export CC=gcc41 CXX=g++41 && ./install $ cd ns-2.31/ $ cp ns ns-crcn1404 $ sudo cp ns-crcn1404 /usr/local/bin/ .. Then only use 'ns-crcn1404' for the simulation. I.e. plain $ ns is not to be used. I.e. i.e. you may have another executable 'ns' on your OS. $ ns-crcn1404 CRCN.tcl : OK. The default examples https://drive.google.com/file/d/0B7S...ew?usp=sharing The WCETT examples cannot be used. ( Example 5-*, 7-* ). ! And as your "test1.tcl" is WCETT : No good : the reply is → Code:
$ ns-crcn2014 test1.tcl http://www.linuxquestions.org/questi...532/page4.html - |
Conclusion : You will have to use another OS to achieve full crcn functionality.
Even the 'ns-crcn' from "crcn-ns-2.31-ubuntu10_i386.deb" isn't working fully with Ubuntu 14.04 : $ ns-crcn test1.tcl → → Segmentation fault. Please read post #2 about recommended OS´s. |
All times are GMT -5. The time now is 02:51 PM. |