LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-22-2013, 04:27 AM   #1
leki
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Rep: Reputation: Disabled
ns2.31 CRCN patch problem


Once i patch CRCN and do make in cd ns-allinone-2.31/ns-2.31/ directory it shows the following error:
In function `hdr_wcett::access(Packet const*)':
cmu-trace.cc.text._ZN9hdr_wcett6accessEPK6Packet[_ZN9hdr_wcett6accessEPK6Packet]+0x7): undefined reference to `hdr_wcett:ffset_'
collect2: error: ld returned 1 exit status
make: *** [ns] Error 1

what should i do?
 
Old 11-22-2013, 04:33 AM   #2
leki
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
Once i patch CRCN and do make in cd ns-allinone-2.31/ns-2.31/ directory it shows the following error:
In function `hdr_wcett::access(Packet const*)':
cmu-trace.cc.text._ZN9hdr_wcett6accessEPK6Packet[_ZN9hdr_wcett6accessEPK6Packet]+0x7): undefined reference to `hdr_wcett:ffset_'
collect2: error: ld returned 1 exit status
make: *** [ns] Error 1

what should i do?
 
Old 11-22-2013, 01:37 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,267

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
Welcome to LQ.

Please read http://www.linuxquestions.org/questions/tags/crcn/

If you have done the patching correctly :
$ cd ns-allinone-2.31/ && tar xvf crcn-ns2.31.tar.gz
https://drive.google.com/file/d/0B7S...it?usp=sharing
... I guess you are using the wrong compiler.
ns-allinone-2.31 requires gcc/g++ version 4.1.2 .
Or version 3.4.6 if it's a Fedora OS.

Please specify your OS :
1) uname -m <Enter>
2) cat /etc/*release* <Enter>

-
 
Old 11-24-2013, 02:28 AM   #4
leki
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
Thanks for your reply.I am using fedora 17 for ns2.31 and CRCN patch.

As you said.I tried doing and i get :

[lab@localhost ~]$ uname -m
i686
[lab@localhost ~]$ cat/etc/*release*
bash: cat/etc/*release*: No such file or directory
[lab@localhost ~]$

but the question is: i am using CRCN.jar for CRCN GUI .Can both crcn-ns2.31.tar.gz and CRCN.jar be used for CRCN GUI??? am i doing wrong??
 
Old 11-24-2013, 02:41 AM   #5
leki
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
if i say yum install gcc-c++ then it shows the following:


Trying other mirror.
http://mirrors.hustunique.com/rpmfus...ta/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.hustunique.com; Unknown error"
Trying other mirror.

Package gcc-c++-4.7.2-2.fc17.i686 already installed and latest version
Nothing to do
 
Old 11-24-2013, 08:39 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,267

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
Post #5 . Please read post #3 : ".. version 3.4.6 if it's a Fedora OS."

I.e. # yum install compat-gcc-34-c++

The install commands are then ..
1) $ cd ns-allinone-2.31/ && tar xvf crcn-ns2.31.tar.gz
2) $ export CC=gcc34 CXX=g++34 && ./install
.... which you would know if you did what's suggested in #3 :
! ! ! read http://www.linuxquestions.org/questions/tags/crcn/



Post #4 : `CRCN.jar' is a GUI application.
"crcn-ns2.31.tar.gz" is simply the CRCN patch repacked for an easier install.

-
 
1 members found this post helpful.
Old 11-24-2013, 10:43 PM   #7
leki
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
when i do as above and ./install i get the following:


* Build Tk8.4.14
============================================================
./install: line 447: ./configure: Permission denied
tk8.3.2 configuration failed! Exiting ...
Tk is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.
[lab@localhost ns-allinone-2.31]$


I had tk8.4.14 installed previously.what should i do??
 
Old 11-25-2013, 03:13 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,267

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
# 7 .
Quote:
./install: line 447: ./configure: Permission denied
"Permission denied" means that you probably corrupted ns-allinone-2**
at unpack. Did you do tar xvf ns-allinone-2.31.tar.gz as root ?

Solution : Delete ns-allinone-2.31/ and start from scratch in
/home/leki/(<folder>) , and don't use "su" for any command.
`root' permissions are to be used only for 'make install'.

-
 
1 members found this post helpful.
Old 11-25-2013, 01:46 PM   #9
leki
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
hi..I started from beginning as you said.
My ns and nam seems to work fine but i got following error:


validate overall report: some tests failed:
./test-all-newreno ./test-all-tcpOptions ./test-all-tcpVariants ./test-all-aimd ./test-all-frto ./test-all-quickstart ./test-all-diffusion3 ./test-all-smac ./test-all-smac-multihop ./test-all-manual-routing ./test-all-session ./test-all-links ./test-all-wireless-shadowing ./test-all-wireless-lan-aodv ./test-all-wireless-tdma ./test-all-wireless-gridkeeper ./test-all-wireless-diffusion ./test-all-wireless-lan-newnode ./test-all-satellite ./test-all-WLtutorial ./test-all-tagged-trace ./test-all-wpan ./test-all-energy
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
Notice that some tests in webcache will fail on freebsd when -O is turned on.
This is due to some event reordering, which will disappear when -g is turned on.


what should i do??will it lead to any serious problems if i dont correct it???

Last edited by leki; 11-25-2013 at 01:48 PM.
 
Old 11-25-2013, 01:51 PM   #10
leki
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
My CRCN GUI seems to work even but i dont get the throughput graph.Can you help me? Thanks.

And if i run ns test.tcl seperately then it works fine.
I did as below:


[lab@localhost ~]$ java -jar CRCN.jar
Yeah
/home/lab/ns-allinone-2.31/ns-2.31/test.tcl
routing
Multiradio for Routing


jTabbedPane1_stateChanged(ChangeEvent e) called.
java.io.FileNotFoundException: (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
at java.io.FileOutputStream.<init>(FileOutputStream.java:84)
at nsui.CFrame.TopoOK_actionPerformed(CFrame.java:2260)
at nsui.CFrame.access$16(CFrame.java:2113)
at nsui.CFrame$23.actionPerformed(CFrame.java:1077)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6290)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6055)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4653)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2482)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:648)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:621)
at java.awt.EventQueue$2.run(EventQueue.java:619)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
OUTPUT>#
OUTPUT># nodes: 10, max conn: 5, send rate: 0.0, seed: 1
OUTPUT>#
OUTPUT>#
OUTPUT># 1 connecting to 2 at time 2.5568388786897245
OUTPUT>#
OUTPUT>set tcp_(0) [$ns_ create-connection TCP $node_(1) TCPSink $node_(2) 0]
OUTPUT>$tcp_(0) set window_ 32
OUTPUT>$tcp_(0) set packetSize_ 512
OUTPUT>set ftp_(0) [$tcp_(0) attach-source FTP]
OUTPUT>$ns_ at 2.5568388786897245 "$ftp_(0) start"
OUTPUT>#
OUTPUT># 4 connecting to 5 at time 56.333118917575632
OUTPUT>#
OUTPUT>set tcp_(1) [$ns_ create-connection TCP $node_(4) TCPSink $node_(5) 0]
OUTPUT>$tcp_(1) set window_ 32
OUTPUT>$tcp_(1) set packetSize_ 512
OUTPUT>set ftp_(1) [$tcp_(1) attach-source FTP]
OUTPUT>$ns_ at 56.333118917575632 "$ftp_(1) start"
OUTPUT>#
OUTPUT># 4 connecting to 6 at time 146.96568928983328
OUTPUT>#
OUTPUT>set tcp_(2) [$ns_ create-connection TCP $node_(4) TCPSink $node_(6) 0]
OUTPUT>$tcp_(2) set window_ 32
OUTPUT>$tcp_(2) set packetSize_ 512
OUTPUT>set ftp_(2) [$tcp_(2) attach-source FTP]
OUTPUT>$ns_ at 146.96568928983328 "$ftp_(2) start"
OUTPUT>#
OUTPUT># 6 connecting to 7 at time 55.634230382570173
OUTPUT>#
OUTPUT>set tcp_(3) [$ns_ create-connection TCP $node_(6) TCPSink $node_(7) 0]
OUTPUT>$tcp_(3) set window_ 32
OUTPUT>$tcp_(3) set packetSize_ 512
OUTPUT>set ftp_(3) [$tcp_(3) attach-source FTP]
OUTPUT>$ns_ at 55.634230382570173 "$ftp_(3) start"
OUTPUT>#
Process exitValue: 0
OUTPUT># 7 connecting to 8 at time 29.546173154165118
OUTPUT>#
OUTPUT>set tcp_(4) [$ns_ create-connection TCP $node_(7) TCPSink $node_(8) 0]
OUTPUT>$tcp_(4) set window_ 32
OUTPUT>$tcp_(4) set packetSize_ 512
OUTPUT>set ftp_(4) [$tcp_(4) attach-source FTP]
OUTPUT>$ns_ at 29.546173154165118 "$ftp_(4) start"
OUTPUT>#
OUTPUT>#Total sources/connections: 4/5
OUTPUT>#

jTabbedPane1_stateChanged(ChangeEvent e) called.
/home/lab/ns-allinone-2.31/ns-2.31/test.tcl is called by ns
Starting Simulation...
NS EXITING...
num_nodes is set 10
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
Process exitValue: 0
OUTPUT>1.069432572 0
OUTPUT>2.001122665 44
OUTPUT>3.000101431 27560
OUTPUT>4.000151738 66390
OUTPUT>5.000298462 60670
OUTPUT>6.000300708 58960
OUTPUT>7.000458089 64108
OUTPUT>8.000246863 60692
OUTPUT>9.000653651 60104
OUTPUT>10.000031382 63552
Process exitValue: 0
OUTPUT>11.001154221 61820
OUTPUT>12.003238209 63492
OUTPUT>13.001053478 61204
OUTPUT>14.003086717 63492
OUTPUT>15.003161960 61776
OUTPUT>16.003388370 64064
OUTPUT>17.003198792 61776
OUTPUT>18.000309806 61776
OUTPUT>19.000535950 59532
OUTPUT>20.002916713 61230
OUTPUT>21.000248235 61204
OUTPUT>22.002246223 62964
OUTPUT>23.000258231 61776
OUTPUT>24.000264755 62386
OUTPUT>25.000071013 61776
OUTPUT>26.003648519 60104
OUTPUT>27.001521559 62920
OUTPUT>28.000216560 63492
OUTPUT>29.002180489 59532
OUTPUT>30.000045650 61264
OUTPUT>31.000255439 65252
OUTPUT>32.000195023 60692
OUTPUT>33.000268599 60098
OUTPUT>34.004220290 64124
OUTPUT>35.000138147 62920
OUTPUT>36.000316741 61248
OUTPUT>37.000526293 61264
OUTPUT>38.000311786 62980
OUTPUT>39.000131926 57816
OUTPUT>40.000447023 62374
OUTPUT>41.002943557 62920
OUTPUT>42.004569863 58344
OUTPUT>43.003988073 66352
OUTPUT>44.000118902 63492
OUTPUT>45.000168806 58954
OUTPUT>46.000079230 58382
OUTPUT>47.000222088 60104
OUTPUT>48.000564702 59526
OUTPUT>49.004315118 63518
OUTPUT>50.000000000 57772
 
Old 11-26-2013, 12:57 AM   #11
leki
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
Sir i have installed jdk-1.6.0_31-fcs.i586.rpm.But guess mine is i686.Is the java problem because of that?? should i install jdk-1.6.0_31-fcs.i686.rpm??
 
Old 11-26-2013, 04:49 PM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,267

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
# 11 .

* `i586' only means that the package was compiled to work also with i586.

* i386, i486, i586, i686 packages all work equally OK with i686.


-
 
1 members found this post helpful.
Old 11-26-2013, 09:28 PM   #13
leki
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
GUI throughput display problem

Code:

[lab@localhost ~]$ java -jar CRCN.jar
Yeah
/home/lab/ns-allinone-2.31/ns-2.31/test.tcl
routing
Multiradio for Routing


jTabbedPane1_stateChanged(ChangeEvent e) called.
java.io.FileNotFoundException: (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
at java.io.FileOutputStream.<init>(FileOutputStream.java:84)
at nsui.CFrame.TopoOK_actionPerformed(CFrame.java:2260)
at nsui.CFrame.access$16(CFrame.java:2113)
at nsui.CFrame$23.actionPerformed(CFrame.java:1077)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6290)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6055)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4653)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2482)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:648)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:621)
at java.awt.EventQueue$2.run(EventQueue.java:619)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
OUTPUT>#
OUTPUT># nodes: 10, max conn: 5, send rate: 0.0, seed: 1
OUTPUT>#
OUTPUT>#
OUTPUT># 1 connecting to 2 at time 2.5568388786897245
OUTPUT>#
OUTPUT>set tcp_(0) [$ns_ create-connection TCP $node_(1) TCPSink $node_(2) 0]
OUTPUT>$tcp_(0) set window_ 32
OUTPUT>$tcp_(0) set packetSize_ 512
OUTPUT>set ftp_(0) [$tcp_(0) attach-source FTP]
OUTPUT>$ns_ at 2.5568388786897245 "$ftp_(0) start"
OUTPUT>#
OUTPUT># 4 connecting to 5 at time 56.333118917575632
OUTPUT>#
OUTPUT>set tcp_(1) [$ns_ create-connection TCP $node_(4) TCPSink $node_(5) 0]
OUTPUT>$tcp_(1) set window_ 32
OUTPUT>$tcp_(1) set packetSize_ 512
OUTPUT>set ftp_(1) [$tcp_(1) attach-source FTP]
OUTPUT>$ns_ at 56.333118917575632 "$ftp_(1) start"
OUTPUT>#
OUTPUT># 4 connecting to 6 at time 146.96568928983328
OUTPUT>#
OUTPUT>set tcp_(2) [$ns_ create-connection TCP $node_(4) TCPSink $node_(6) 0]
OUTPUT>$tcp_(2) set window_ 32
OUTPUT>$tcp_(2) set packetSize_ 512
OUTPUT>set ftp_(2) [$tcp_(2) attach-source FTP]
OUTPUT>$ns_ at 146.96568928983328 "$ftp_(2) start"
OUTPUT>#
OUTPUT># 6 connecting to 7 at time 55.634230382570173
OUTPUT>#
OUTPUT>set tcp_(3) [$ns_ create-connection TCP $node_(6) TCPSink $node_(7) 0]
OUTPUT>$tcp_(3) set window_ 32
OUTPUT>$tcp_(3) set packetSize_ 512
OUTPUT>set ftp_(3) [$tcp_(3) attach-source FTP]
OUTPUT>$ns_ at 55.634230382570173 "$ftp_(3) start"
OUTPUT>#
Process exitValue: 0
OUTPUT># 7 connecting to 8 at time 29.546173154165118
OUTPUT>#
OUTPUT>set tcp_(4) [$ns_ create-connection TCP $node_(7) TCPSink $node_(8) 0]
OUTPUT>$tcp_(4) set window_ 32
OUTPUT>$tcp_(4) set packetSize_ 512
OUTPUT>set ftp_(4) [$tcp_(4) attach-source FTP]
OUTPUT>$ns_ at 29.546173154165118 "$ftp_(4) start"
OUTPUT>#
OUTPUT>#Total sources/connections: 4/5
OUTPUT>#

jTabbedPane1_stateChanged(ChangeEvent e) called.
/home/lab/ns-allinone-2.31/ns-2.31/test.tcl is called by ns
Starting Simulation...
NS EXITING...
num_nodes is set 10
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
Process exitValue: 0
OUTPUT>1.069432572 0
OUTPUT>2.001122665 44
OUTPUT>3.000101431 27560
OUTPUT>4.000151738 66390
OUTPUT>5.000298462 60670
OUTPUT>6.000300708 58960
OUTPUT>7.000458089 64108
OUTPUT>8.000246863 60692
OUTPUT>9.000653651 60104
OUTPUT>10.000031382 63552
Process exitValue: 0
OUTPUT>11.001154221 61820
OUTPUT>12.003238209 63492
OUTPUT>13.001053478 61204
OUTPUT>14.003086717 63492
OUTPUT>15.003161960 61776
OUTPUT>16.003388370 64064
OUTPUT>17.003198792 61776
OUTPUT>18.000309806 61776
OUTPUT>19.000535950 59532
OUTPUT>20.002916713 61230
OUTPUT>21.000248235 61204
OUTPUT>22.002246223 62964
OUTPUT>23.000258231 61776
OUTPUT>24.000264755 62386
OUTPUT>25.000071013 61776
OUTPUT>26.003648519 60104
OUTPUT>27.001521559 62920
OUTPUT>28.000216560 63492
OUTPUT>29.002180489 59532
OUTPUT>30.000045650 61264
OUTPUT>31.000255439 65252
OUTPUT>32.000195023 60692
OUTPUT>33.000268599 60098
OUTPUT>34.004220290 64124
OUTPUT>35.000138147 62920
OUTPUT>36.000316741 61248
OUTPUT>37.000526293 61264
OUTPUT>38.000311786 62980
OUTPUT>39.000131926 57816
OUTPUT>40.000447023 62374
OUTPUT>41.002943557 62920
OUTPUT>42.004569863 58344
OUTPUT>43.003988073 66352
OUTPUT>44.000118902 63492
OUTPUT>45.000168806 58954
OUTPUT>46.000079230 58382
OUTPUT>47.000222088 60104
OUTPUT>48.000564702 59526
OUTPUT>49.004315118 63518
OUTPUT>50.000000000 57772
 
Old 11-26-2013, 09:31 PM   #14
leki
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
Can you help me with this? If i exexcute as ns test.tcl then it runs ok.But i dont know why the problem is in GUI.My test.tcl and random.tcl files are as follows
 
Old 11-27-2013, 01:21 AM   #15
leki
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
test.tcl

Code:
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)        AODV     ;#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               ;# number of interfaces
set val(cp)        /home/lab/ns-allinone-2.31/ns-2.31/random.tcl     ;      # topology traffic file 
set val(stop)      50                ;# simulation time
# ==================================================================
# Main Program
# ======================================================================


# Initialize Global Variables
set ns_		[new Simulator]
set tracefd     [open /home/lab/ns-allinone-2.31/ns-2.31/test.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/lab/ns-allinone-2.31/ns-2.31/test.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) } {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/lab/ns-allinone-2.31/ns-2.31/test.nam &
    exit 0
}
puts "Starting Simulation..." 
$ns_ run

Last edited by leki; 11-28-2013 at 05:30 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ns2.31 and CRCN patch buptmuye Linux - Wireless Networking 27 01-06-2016 06:27 PM
ns-2 CRCN patch. Testing examples problem cosdag Linux - Software 6 12-09-2015 09:07 PM
[SOLVED] The problem of running the tcl script file in the NS2.31+crcn environment syxcod Linux - Software 16 11-24-2015 04:12 PM
how to solve crcn problem in ns2? lavendar89 Linux - Software 1 09-25-2013 04:57 PM
problem in displaying throughput in crcn patch in ns2 humairaafzal73 Linux - Software 0 02-07-2012 04:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration