Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-02-2014, 12:45 AM
|
#1
|
LQ Newbie
Registered: Jun 2014
Posts: 2
Rep:
|
Tcl file is not taking input
Hello, I am total new bee for linux and ns2. I have successfully added the patch um-olsr-2.34_v0.8.8.patch , And also the um-olsr examples.
However, When I run olsr_example.tcl every time I get the output
num_nodes is set 5
INITIALIZE THE LIST xListHead
*** NOTE: no connection pattern specified.
*** NOTE: no scenario file specified.
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
NS EXITING...
I tried to give input to it like ns olsr_example.tcl set-mode 3
Some code i added to OLSR.cc.
For example the code below:
else if(strcmp(argv[1], "set-mode")==0)
{
int mode = atoi(argv[2]);
if(mode==0)
is_on=0;
else
is_on=1;
return TCL_OK;
}
Link to olsr_example.tcl http://masimum.inf.um.es/fjrm/wp-upl...sr_example.tcl
Please tell me where I am wrong.
Last edited by kanugeete; 06-02-2014 at 01:36 AM.
|
|
|
06-02-2014, 09:45 AM
|
#2
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
Welcome to LQ.
OLSR examples, "umolsr-examples-04.2014.tar.gz" →
→ https://drive.google.com/file/d/0B7S...it?usp=sharing
Quote:
$ ns olsr_example.tcl set-mode 3
|
Yes, you can usually do that.
And : The output you show in post #1 in the normal one.
* So what's your issues ? ?
-
|
|
|
06-02-2014, 04:47 PM
|
#3
|
LQ Newbie
Registered: Jun 2014
Posts: 6
Rep:
|
hello sir
ive already done the simultaion and it worked for 150 node. when i changed the node to 185, it got "segmentation fault" error. then ichanged the max node in olsr_pkt.h to be 185. the error has gone but the simulation never finish. it takes 18 hours since i running it and now its still running and the simulation not finish yet.
can anybody tell me why this happened?
is it the way to increase spedd of simulation? because it takes too long time. thks for the reply
|
|
|
06-02-2014, 09:53 PM
|
#4
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
# 3 .
NS2 limitations : Some simulations have a maximum of 14 nodes, some 100+.
http://www.cs.binghamton.edu/~kliu/r...2code/#speedup
"The implementation of the Packet data structure of NS2 does not math the realities.
The packet in ns2 simulation keeps all packet headers for any protocols implemented in NS2.
For example, a DSR routing packet may keep DSDV, AODV, or even a PING application header.
For this reason, till today, a packet used in ns2 simulation, would have a header size around 40~64KB.
And NO packet would be deleted to release the memory it holds until the end of the simulation.
So for a typical simulation with 100 nodes in ns2 around 1M packets exchanged (of course,
you may reuse the packets already being freed through Packet::free(Packet*).
To learn the implementation of it, please check file common/packet{.h,.cc} ),
you may hold 10% of it, 100K packets, and you may use a memory at least 100K*64KB -> 6.4GB,
which definitely would crash your computer (even it is a super server)."
http://network-simulator-ns-2.7690.n...36.html#a26937
"NS2 does not have automatic garbage collection, thus warrants a manual
freeing of allocated memory once an object is no longer needed."
* OLSR is also available with ns3 http://www.nsnam.org/
* OLSR, OMNeT++ http://inet.omnetpp.org/doc/INET/doxy/files.html
-
|
|
|
06-03-2014, 05:43 AM
|
#5
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
# 3 : Some more information.
Ref. http://ramakrishnamundugar.blogspot....or-solved.html :
→ ""The segmentation is due to memory allocation related issue.
As an example you are trying to store 11th value in as array of 10 values.""
Ref. http://network-simulator-ns-2.7690.n...80.html#a26929 :
Quote:
Code:
#$ns_ at $val(stop) "stop"
$ns_ at [expr $val(stop) + 0.1] "puts \"NS EXITING...\" ; $ns_ halt"
proc stop {} {
global ns_ tracefd namtrace opt
$ns_ flush-trace
close $tracefd
close $namtrace
}
... commented the line that was calling this stop function and the crash was gone.
|
-
Last edited by knudfl; 06-03-2014 at 05:46 AM.
|
|
|
06-03-2014, 05:44 AM
|
#6
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
Sorry ....... Browser hiccup
-
Last edited by knudfl; 06-03-2014 at 05:46 AM.
|
|
|
06-03-2014, 10:56 AM
|
#7
|
LQ Newbie
Registered: Jun 2014
Posts: 6
Rep:
|
# 4
even i used the node made by SUMO,the ns2 cannot run for more 100 node..?
http://www.mediafire.com/view/m08gtm...way_(copy).txt
i followed the instruction.indeed it made the simulation finish,but i got "segmentation fault" error..
can you look at my tcl? so you can see whats wrong with it.thks.
# 5
i used it.and it still error.
thanks a lot
|
|
|
06-03-2014, 11:52 AM
|
#8
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
# 7 .
"100+" means 100 or more than 100.
I have seen suggestions with 500 nodes. (Not olsr.)
It all depends on the conditions.
All values / numbers / parameters must be considered.
At certain conditions, some simulations have a maximum
of e.g. 14 nodes.
So what are you doing wrong ?
? May be you added something impossible code to OLSR.cc ?
A failed build of ns-2.34 + olsr ? ?
*** You haven't told which OS you are using :
a) $ uname -m ( Will reply with `architecture´ : i686 or x86_64.)
b) OS name and version, please.
*** Which compilers gcc/g++ did you use for the build ?
Also : There are olsr packages, that you can install.
Examples
1) um-olsr-ns-2.34-ubuntu10_i386.deb for all Ubuntu 10.xx .. 14.06 -i686
https://drive.google.com/file/d/0B7S...it?usp=sharing
2) um-olsr-ns-2.34-1.fc17.x86_64.rpm
https://drive.google.com/file/d/0B7S...it?usp=sharing
3) um-olsr-ns-2.35-ubuntu12_amd64.deb
https://drive.google.com/file/d/0B7S...it?usp=sharing
4) umolsr+zrp-ns-2.33-ubuntu12_amd64.deb
https://drive.google.com/file/d/0B7S...it?usp=sharing
-
|
|
|
06-03-2014, 11:58 AM
|
#9
|
LQ Newbie
Registered: Jun 2014
Posts: 6
Rep:
|
i use ubuntu 10.04 and gcc-4.3. i used SUMO 0.12.3 and MOVE
i dont know what iam doing wrong, please look at my tcl, so i know which part that have been wrong ?
thanks a lot
|
|
|
06-04-2014, 06:59 AM
|
#10
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
# 9 .
OK, Ubuntu 10.04 <unknown version>, <unknown architecture>.
! Please show the the output from these commands :
a) $ uname -m
b) $ cat /etc/issue
* Do not use gcc-4.3 :
$ sudo apt-get install g++-4.1
... then start from scratch in a new folder with
$ tar xvf ns-allinone-2.34.tar.gz
... and when you have added {um-olsr- 1.0.tgz, um-olsr_ns-2.34_v 1.0.patch}
http://sourceforge.net/projects/um-olsr/
... use this command to build "ns-allinone-2.34 + olsr" :
$ export CC=gcc-4.1 CXX=g++-4.1 && ./install
* umolsr-examples-04.2014.tar.gz :
https://drive.google.com/file/d/0B7S...it?usp=sharing
-
|
|
|
06-05-2014, 03:29 AM
|
#11
|
LQ Newbie
Registered: Jun 2014
Posts: 6
Rep:
|
a: uname -m
i686
b: cat /etc/issue
ubuntu 10.04.4 LTS \n \l
my tcl script node 185 still segmentation fault.
thanks a lot
Last edited by uthaathu; 06-05-2014 at 03:30 AM.
|
|
|
06-05-2014, 11:47 AM
|
#12
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
# 11 .
Didn't you answer that yourself :
The maximum number of nodes is 150 in OLSR ?
|
|
|
06-05-2014, 03:25 PM
|
#13
|
LQ Newbie
Registered: Jun 2014
Posts: 6
Rep:
|
so the maximum node in OLSR just 150 ?
thanks a lot
|
|
|
All times are GMT -5. The time now is 10:34 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|