LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 11-05-2014, 12:45 AM   #1
Mehedi Hasan
LQ Newbie
 
Registered: Aug 2014
Posts: 11

Rep: Reputation: Disabled
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
 
Old 11-05-2014, 06:15 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
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

-
 
Old 11-05-2014, 06:31 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
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

-

Last edited by knudfl; 11-05-2014 at 11:51 AM.
 
Old 12-20-2014, 08:44 AM   #4
nadine01
Member
 
Registered: Oct 2014
Posts: 62

Rep: Reputation: Disabled
hi

i have install ns2.34

but i can't add leach

help me plz
 
Old 12-20-2014, 09:21 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
← #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


-
 
1 members found this post helpful.
Old 12-20-2014, 09:33 AM   #6
nadine01
Member
 
Registered: Oct 2014
Posts: 62

Rep: Reputation: Disabled
$ 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/
 
Old 12-20-2014, 10:35 AM   #7
nadine01
Member
 
Registered: Oct 2014
Posts: 62

Rep: Reputation: Disabled
i make this step but don't work

plz help me
 
Old 12-20-2014, 10:55 AM   #8
nadine01
Member
 
Registered: Oct 2014
Posts: 62

Rep: Reputation: Disabled
this is the problem
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2014-12-20 16:52:33.png
Views:	77
Size:	175.3 KB
ID:	17166  
 
Old 12-20-2014, 12:11 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
← 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.


-
 
Old 12-31-2014, 10:05 AM   #10
fusionzhang
LQ Newbie
 
Registered: Jun 2014
Posts: 9

Rep: Reputation: Disabled
@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?
 
1 members found this post helpful.
Old 12-31-2014, 05:15 PM   #11
nadine01
Member
 
Registered: Oct 2014
Posts: 62

Rep: Reputation: Disabled
Sir fusionzhang can you help me to add it?
 
Old 12-31-2014, 09:10 PM   #12
fusionzhang
LQ Newbie
 
Registered: Jun 2014
Posts: 9

Rep: Reputation: Disabled
see #180

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

Quote:
Originally Posted by nadine01 View Post
Sir fusionzhang can you help me to add it?
 
Old 01-01-2015, 04:21 AM   #13
nadine01
Member
 
Registered: Oct 2014
Posts: 62

Rep: Reputation: Disabled
i have ubuntu12.04
it the same?
 
Old 01-01-2015, 05:53 AM   #14
fusionzhang
LQ Newbie
 
Registered: Jun 2014
Posts: 9

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

Quote:
Originally Posted by nadine01 View Post
i have ubuntu12.04
it the same?
 
Old 02-09-2015, 02:29 AM   #15
kumrawat
LQ Newbie
 
Registered: Jan 2015
Posts: 3

Rep: Reputation: Disabled
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
 
1 members found this post helpful.
  


Reply

Tags
leach, ns2, pegasis, pegasis#2


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
leach.out total energy increase leach ns2.34 linuxUser123linux Linux - Software 1 07-13-2013 05:54 AM
[SOLVED] cfdisk : FATAL ERROR: Bad logical partition 10: enlarged logical partitions overlap riller Fedora 8 05-31-2012 09:17 AM
I got an error while running leach package in ns2.. help me to get out of this error. rkgowrishankar Linux - Software 1 02-07-2012 05:51 AM


All times are GMT -5. The time now is 12:56 AM.

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