Linux - NewbieThis 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.
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.
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.
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
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 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)."
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.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 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 ?
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 ?
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 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_v1.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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.