LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to solve this logical error of LEACH? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-solve-this-logical-error-of-leach-4175524367/)

Mehedi Hasan 11-04-2014 11:45 PM

How to solve this logical error of LEACH?
 
Hello,
I have installed LEACH in NS-2.34 (ubunto-14.04)

I could run it successfully..

But it always stopped in a few seconds without sending data

i.e. Total Data=0

And it consumed a large energy!!!!

It didn't show any error in leach.error

Is it a logical error or others?

thanks

knudfl 11-05-2014 05:15 AM

Quote:

I have installed LEACH in NS-2.34 (ubunto-14.04)

I could run it successfully..
"successfully" ..
.. is when you install to an OS where the output files are OK.

I think the only supported OS for an OK leach is CentOS 6.6 - i386
http://mirror.nl.leaseweb.net/centos/6.6/isos/i386/

$ tar xvf ns-allinone-2.34.tar.gz
$ cd ns-allinone-2.34/
$ patch -p0 < otcl_ns234_gcc-4.4.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ tar xvf leach+pegasis-ns234-files-2.tar.gz (The updated "patch package")
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ ./install
$ cd ns-2.34/
# make install && exit

Run the simulation :
$ export RCA_LIBRARY=/home/<name>/ns-allinone-2.34/ns-2.34/mit/rca && export uAMPS_LIBRARY=/home/<name>/ns-allinone-2.34/ns-2.34/mit/uAMPS && ./test

-

knudfl 11-05-2014 05:31 AM

Example output files from CentOS 6 - i386/i686 :

leach.out https://drive.google.com/file/d/0B7S...ew?usp=sharing

leach.alive.txt https://drive.google.com/file/d/0B7S...ew?usp=sharing

leach.alive.txt from Ubuntu 10.10 - i686 :
https://drive.google.com/file/d/0B7S...ew?usp=sharing

leach.alive.txt "other"
https://drive.google.com/file/d/0B7S...ew?usp=sharing

.. And a leach.alive.txt from the discontinued PCLinuxOS 2012 :
https://drive.google.com/file/d/0B7S...ew?usp=sharing
"leach.alive.txt" : $ xgraph leach.alive.txt

Xgraph for CentOS 6 - i686 : xgraph-12.1-7pclos2011.i586.rpm
https://drive.google.com/file/d/0B7S...ew?usp=sharing

-

nadine01 12-20-2014 07:44 AM

hi

i have install ns2.34

but i can't add leach

help me plz

knudfl 12-20-2014 08:21 AM

← #4 .

Ubuntu ( ref. the example in post #2 ) :
$ sudo apt-get install g++-4.4
$ tar xvf ns-allinone-2.34.tar.gz
$ cd ns-allinone-2.34/
$ patch -p0 < otcl_ns234_gcc-4.4.patch
$ tar xvf leach+pegasis-ns234-files-2.tar.gz
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install
$ cd ns-2.34/
$ sudo make install


-

nadine01 12-20-2014 08:33 AM

$ patch -p0 < otcl_ns234_gcc-4.4.patch
$ tar xvf leach+pegasis-ns234-files-2.tar.gz

make it in
$ cd ns-allinone-2.34/
or
$ cd ns-2.34/

nadine01 12-20-2014 09:35 AM

i make this step but don't work

plz help me

nadine01 12-20-2014 09:55 AM

1 Attachment(s)
this is the problem

knudfl 12-20-2014 11:11 AM

← Post #8 .

Looks like a generic error output, that any faulty file.tcl can do.

Please read http://linuxsilo.net/docs/smart-questions_en.html
. http://www.linuxquestions.org/linux/...Ask_a_Question
I.e. you are supposed to tell what you are doing :
Show the exact command used for the simulation.
And the name of the file with the error output.

HOWTO run the leach simulation : Read post #2.


-

fusionzhang 12-31-2014 09:05 AM

@knudfl Hello,I installed the leach-pegasis ns234-patch as you mentioned,the number of the cluster-head is five and the base station is (50,175).I found a problem,the first node died at 20s, but the simulation of the original author of the leach, the first node died at about 400 sencond. Do you know why?

nadine01 12-31-2014 04:15 PM

Sir fusionzhang can you help me to add it?

fusionzhang 12-31-2014 08:10 PM

see #180

http://www.linuxquestions.org/questi...68/page13.html

Quote:

Originally Posted by nadine01 (Post 5293417)
Sir fusionzhang can you help me to add it?


nadine01 01-01-2015 03:21 AM

i have ubuntu12.04
it the same?

fusionzhang 01-01-2015 04:53 AM

see #719
http://www.linuxquestions.org/questi...68/page48.html

Quote:

Originally Posted by nadine01 (Post 5293546)
i have ubuntu12.04
it the same?


kumrawat 02-09-2015 01:29 AM

LEACH protocol coding generate
 
[QUOTE=knudfl;5288037]← #4 .

Ubuntu ( ref. the example in post #2 ) :
$ sudo apt-get install g++-4.4
$ tar xvf ns-allinone-2.34.tar.gz
$ cd ns-allinone-2.34/
$ patch -p0 < otcl_ns234_gcc-4.4.patch
$ tar xvf leach+pegasis-ns234-files-2.tar.gz
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install
$ cd ns-2.34/
$ sudo make install

I have flowed this steps, i have done leach protocol patching using NS2.34 and getting output but can you explain how to generate coding part


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