LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to patch GPSR routing protocol to ns-2.35 (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-patch-gpsr-routing-protocol-to-ns-2-35-a-4175431318/)

knudfl 07-28-2016 09:51 AM

Re post #30, @alwaleed16 : Welcome to LQ.

Ubuntu 12.04.5 - 32bits : Using "ns235-gpsr-hls", built today.
Code:

ns235-gpsr-hls ssoumayaa.tcl
num_nodes is set 2
INITIALIZE THE LIST xListHead
Starting Simulation...
radiorange 250, x 2000 y 500
length : 3.000000 , cellperline 12 , heigth 1.000000
maxlevel 3
radiorange 250, x 2000 y 500
length : 3.000000 , cellperline 12 , heigth 1.000000
maxlevel 3
SORTING LISTS ...DONE!

... But then again, I didn't update yesterday. Last update = Jun 19.
So maybe a new update made Ubuntu 12.04 ns2 hostile ?

There is a possible solution : You can use an older executable 'ns-hls'.
Provided by the package gpsr-hls-2.33-ubuntu10_i386.deb, once made with Ubuntu 10.10
https://drive.google.com/file/d/0B7S...ew?usp=sharing
... Download the package, and 1) cd Downloads/
2) sudo gdebi ./gpsr-hls-2.33-ubuntu10_i386.deb

The command 'ns-hls ssoumayaa.tcl' works perfect here too.

Latest examples, gpsr-hls-examples-05.15.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing


-

alwaleed16 07-29-2016 03:20 AM

Dear knudfl,

I re-patched GPSR in ns 2.35 and now it works fine after execute ssoumayaa.tcl

num_nodes is set 2
INITIALIZE THE LIST xListHead
Starting Simulation...
radiorange 250, x 2000 y 500
length : 3.000000 , cellperline 12 , heigth 1.000000
maxlevel 3
radiorange 250, x 2000 y 500
length : 3.000000 , cellperline 12 , heigth 1.000000
maxlevel 3
SORTING LISTS ...DONE!
khalid@khalid-VirtualBox:~/hls-utils_05.15$

But when I executed 130sec-1f-hls-1.tcl and tried to calculate the PDF, NRL, and e2e-delay from awk#perl#python__scripts-10.2015 for the trace file in the link below, the awk scripts didn't work property and give zero.

http://www.megafileupload.com/7fb7/1f-gpsr20_2.tr

Please, how can I get an awk scripts work with GPSR trace file.

Thanks

alwaleed16 07-30-2016 02:00 AM

Dear knudfl,

Please I need help regarding post #32.

Thanks

knudfl 07-30-2016 05:44 AM

Re #32.

"130sec-1f-hls-1.tcl" :
Seems the old version must be used, see post #31.
I.e. /usr/local/bin/ns-hls → → $ ns-hls 130sec-1f-hls-1.tcl
... I get a 13.4MB trace file = 1f-gpsr20_2.tr

Analyzing : I edited 'evaluate.pl', (typo´s edited) → new version = evaluate-2016.pl
$ perl evaluate-2016.pl -f 1f-gpsr20_2.tr
Saving the result :
perl evaluate-2016.pl -f 1f-gpsr20_2.tr 2>&1 | tee evaluate-2016__1f-gpsr20_2.tr.txt

The files evaluate-2016.pl, evaluate-2016__1f-gpsr20_2.tr.txt :
gpsr-hls-evaluate2016.tar.gz https://drive.google.com/file/d/0B7S...ew?usp=sharing

Note : No guaranties for the examples in hls-utils_05.15/ to work in a particular way.
You are welcome to add / upload your own improved simulation examples.


-

alwaleed16 07-30-2016 04:10 PM

Dear knudfl,

Please, how can I execute the 130sec-1f-hls-1.tcl in the following manner

I.e. /usr/local/bin/ns-hls → → $ ns-hls 130sec-1f-hls-1.tcl

The name of gpsr-hls-examples-05.15.tar.gz after extract it is hls-utils_05-15. where I should put the file?

Thanks

knudfl 07-31-2016 04:36 AM

Re #35.
Quote:

Please, how can I execute the 130sec-1f-hls-1.tcl
The folder hls-utils_05-15/ can have any location in /home/.
Example location : /home/[name]/ns2/gpsr-hls/hls-utils_05-15/


/usr/local/bin/ns-hls is provided by "gpsr-hls-2.33-ubuntu10_i386.deb".
Download and install, see post #31 :
sudo gdebi ./gpsr-hls-2.33-ubuntu10_i386.deb


-

alwaleed16 07-31-2016 09:33 AM

Dear knudfl,

I tried to install compiler version 4.1.2 in ubuntu 10.10 32 bit bu the following error appeared:

khalid@khalid-VirtualBox:~$ sudo apt-get install g++-4.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package g++-4.1
E: Couldn't find any package by regex 'g++-4.1'

Please, how can I overwrite this problem.

Thanks

knudfl 07-31-2016 10:24 AM

Re #37.

What's the purpose of g++-4.1 ? ? And Ubuntu 10.10 ?
Ubuntu 10.10 was usable for ns2 in year 2011. 2012 ?

And : There is no g++-4.1 by default with Ubuntu 10.10 .

alwaleed16 07-31-2016 10:57 AM

Dear knudfl,

The purpose of g++-4.1 is to patch GPSR in ns 2.33 according to the following commands

$ cd ns-allinone-2.33/
$ tar xvf gpsr-hls-ns233-patching.tar.bz2
$ export CC=gcc-4.1 CXX=g++-4.1
$ ./install

Thanks

knudfl 07-31-2016 11:55 AM

Re #39.

Still : You cannot build a version as stable as the old gpsr-hls-2.33-ubuntu10_i386.deb .

The latest available "style gcc-4.1" compilers are gcc-3.4.6 packages :
compat-gcc34_3.4.6-ubuntu10_i386.deb, compat-g++34_3.4.6-ubuntu10_i386.deb

compat-gcc34 https://drive.google.com/file/d/0B7S...ew?usp=sharing
compat-g++34 https://drive.google.com/file/d/0B7S...ew?usp=sharing

cd ns-allinone-2.33/
patch -p0 < GPSR-hls_ns233-2015.patch https://drive.google.com/file/d/0B7S...ew?usp=sharing
export CC=gcc34 CXX=g++34 && ./install


-

alwaleed16 07-31-2016 01:24 PM

Dear knudfl,

Please, how can I install gcc-3.4.6 packages in post #39 and what is the commands.

Thanks

knudfl 07-31-2016 03:04 PM

Re #41.

The install command for downloaded packages :
cd Downloads/
sudo dpkg -i compat-gcc34_3.4.6-ubuntu10_i386.deb compat-g++34_3.4.6-ubuntu10_i386.deb

( Or just : sudo dpkg -i compat-g* )

alwaleed16 08-01-2016 05:44 AM

Dear knudfl,

I installed GPSR in ns 2.33 on ubuntu 10.10 according to post #39 and after that installed the binary package

Binary package : gpsr-hls-2.33-ubuntu10_i386.deb
https://docs.google.com/file/d/0B7S2...pXOTBtZkk/edit
→ $ sudo dpkg -i gpsr-hls-2.33-ubuntu10_i386.deb

but when run ns-hls ssoumayaa.tcl

bash: :/usr/X11R6/lib:/usr/local/lib: No such file or directory
khalid@khalid-VirtualBox:~$ ns-hls ssoumayaa.tcl
couldn't read file "ssoumayaa.tcl": no such file or directory

Please, how can I overwrite this mistake.

Thanks

alwaleed16 08-02-2016 06:06 AM

Dear knudfl,

Finally, I got I a 13.4MB trace file when run 130sec-1f-hls-1.tcl. But when I tried to evaluate the packet delivery fraction for the trace file from the awk#perl#python__scripts-10.2015, I got the received packet larger than the source packet

khalid@khalid-VirtualBox:~$ awk -f pdf.awk 1f-gpsr20_2.tr
cbr s:1116 r:1318, r/s Ratio:1.1810, f:10692

Please, may you help me to get a PDF awk script works property.

Thanks

knudfl 08-02-2016 03:27 PM

Re #44.

Did you read post #34 about evaluate-2016.pl ?

The perl scripts are included with GPSR-hls for a reason.
And may be the only usable tools.


All times are GMT -5. The time now is 01:49 AM.