LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-22-2013, 04:00 PM   #541
nik.dan
LQ Newbie
 
Registered: Oct 2013
Posts: 10

Rep: Reputation: Disabled

require help...

http://www.linuxquestions.org/questi...41#post5050541

thanks and regards
 
Old 10-30-2013, 04:17 AM   #542
Do Tuan Anh
LQ Newbie
 
Registered: Apr 2013
Posts: 4

Rep: Reputation: Disabled
Hi all,
I want to implement Leach protocol on ns-2.34.
I installed n-2.34 on Ubuntu 12.04 with GCC 4.6.3. It works ok.
But when i do ./leach_test command in /opt/ns-allinone-2.34/ns-2.34 directory then check the leach.err. It shows that:

Code:
couldn't read file "tcl/lib/ns-mobilenode.tcl": no such file or directory
    while executing
"source.orig tcl/lib/ns-mobilenode.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel source.orig[list $fileName]"
    invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
    (procedure "source" line 8)
    invoked from within
"source tcl/lib/ns-mobilenode.tcl"
    (file "tcl/ex/wireless.tcl" line 184)
And there is empty in leach.out.
Please help me resolved this issue.
Sorry about my English.
Thanks in advance.

Last edited by Do Tuan Anh; 10-30-2013 at 04:40 AM.
 
Old 10-30-2013, 04:33 AM   #543
nik.dan
LQ Newbie
 
Registered: Oct 2013
Posts: 10

Rep: Reputation: Disabled
@Do Tuan Anh

change the addresses (after source) like: /location/of/file/file.tcl for example you have file in the folder say "/usr/local/ns-allinone2.34/ns2.34/tcl/lib/ns-mobilenode.tcl" then put the whole address...
do follow the previous posts... same and similar problems are mentioned in the same thread itself ... search thoroughly and you'll get almost all the solution for running leach in the same thread.

regards
 
Old 10-30-2013, 04:50 AM   #544
Do Tuan Anh
LQ Newbie
 
Registered: Apr 2013
Posts: 4

Rep: Reputation: Disabled
@nik.dan
I've changed the absolute link like "source /opt/ns-allinone-2.34/ns-2.34/tcl/lib/ns-mobilenode.tcl" in wireless.tcl line 184 (/opt/ns-allinone-2.34/ns-2.34/tcl/ex/wireless.tcl) then retype ./leach_test but the leach.out and leach.err have no change.
Plz help me.
 
Old 10-30-2013, 07:23 AM   #545
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 544 .

Running "leach_test" should be possible. Discussion somewhere here
http://www.linuxquestions.org/questi...2-27-a-785379/
.. or in this thread.

However : The main way of running "leach_test" is : $ ./test .
**** Please read both text files : test and leach_test.

-
 
1 members found this post helpful.
Old 10-30-2013, 07:26 AM   #546
nik.dan
LQ Newbie
 
Registered: Oct 2013
Posts: 10

Rep: Reputation: Disabled
@do tuan anh
please check the previous posts in the same thread, this has been a very common problem and has been solved in this thread itself...
copy paste your problem in google, it'll give results of this thread and you can directly look at the post... rather my advise is to go through all of it n u wont get any problem what so ever in doing leach...
 
2 members found this post helpful.
Old 10-30-2013, 10:03 PM   #547
Do Tuan Anh
LQ Newbie
 
Registered: Apr 2013
Posts: 4

Rep: Reputation: Disabled
Haha. Many many many thanks knudfl and nik.dan.
Today, i restart test leach and have a issue the same as #55 and following #56 to solve it.
At last, the leach.out file have:
Code:
At 1.0999999999999999:
                Total Energy = 30125.042791162676
                Total Data = 0
                Total Alive = 4

Simulation complete.
Now i have to change some parameters and re-simulate.
Once more, thanks u guys.
 
Old 10-31-2013, 06:55 PM   #548
toprix
LQ Newbie
 
Registered: Aug 2013
Posts: 3

Rep: Reputation: Disabled
to all users facing with the following error in their leach.out
Code:
Warning!!! No Cluster Head ADVs were heard!
the problem is with the GCC version.
after many test and tries, I've solved this problem by downgrading my Ubuntu (and consequently my GCC version).

but I'm still facing another problem:
as mentioned in Heinzelman thesis, in leach algorithm the first node dies after about 450 seconds. (figure 4.7-a page 101)
but in all leach.out samples published in this thread or other websites or even in ns234.leach.tar.gz, the first node dies after 20 seconds (the first round).
can anyone explain the cause? or does anybody experienced expected results?
 
Old 11-01-2013, 10:01 AM   #549
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Hi,

Usually the node dies after 20 sec when none of the nodes receive broadcasts, and each node has to send data directly to the BS. This also leads to increased probability of collisions.
As you can see, in this thread, most users had a problem with the nodes not receiving ADV, and thereby they send their directly to the BS directly.


Quote:
Originally Posted by toprix View Post
to all users facing with the following error in their leach.out
Code:
Warning!!! No Cluster Head ADVs were heard!
the problem is with the GCC version.
after many test and tries, I've solved this problem by downgrading my Ubuntu (and consequently my GCC version).

but I'm still facing another problem:
as mentioned in Heinzelman thesis, in leach algorithm the first node dies after about 450 seconds. (figure 4.7-a page 101)
but in all leach.out samples published in this thread or other websites or even in ns234.leach.tar.gz, the first node dies after 20 seconds (the first round).
can anyone explain the cause? or does anybody experienced expected results?
 
Old 11-01-2013, 10:08 AM   #550
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
@knudfl,

Just FYI, I ran LEACH on ns-2.35. I used the ns2.34 files that Tarik had uploaded (about 2 years ago), and modified them to run on ns2.35.
I had to use ns2.35 and no other ns version as I was running ns on cyqwin.
So, the compatibility of Windows7 + cyqwin + ns meant that I could have only a certain version of cywin, and ns2.35 was the only one that installed successfully for me.

So, I had to modify the LEACH code to run on ns2.35

Mentioned this just to let you know that LEACH can be made to run on ns2.35


Quote:
Originally Posted by knudfl View Post
# 532 .

The "May Tamer leach" files that you are using are for ns-2.34 .
May not work in ns-2.35 .

Ubuntu 13.04 , ns-2.35 : Please use gcc-4.4 / g++-4.4 :
$ sudo apt-get install g++-4.4

Building ns-allinone-2.35 :
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install

-
 
1 members found this post helpful.
Old 11-01-2013, 11:06 AM   #551
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 550 .
Quote:
Mentioned this just to let you know that LEACH can be made to run on ns2.35
Yes we know that, and I have referred several times to your original post,
where you told about ns-2.35.
And advised the members to contact you for the ns235 patch.

Is it possible that you still have the files ?
It would be very nice if you could upload the
"patch package" / {the edited ns235 files}.

Alternatively the edited ns-2.35/ : Can be made to about 12 MB,
with 'make clean', and with the "tcl/test/" folder deleted.
I.e. as a bzip2 compressed package "leach-ns235-patched.tar.bz2".

You can also mail the files to me, and I will upload to 'Google Drive'.

-
 
Old 11-04-2013, 01:30 PM   #552
toprix
LQ Newbie
 
Registered: Aug 2013
Posts: 3

Rep: Reputation: Disabled
Hi;
Here is some of my experiences with leach.out results:
1- when the BS is located at 50,175 (75 meters from the last node), the first node dies after 20~40 seconds, and the whole simulation continues for about 400 seconds.
2- when the BS is located at 50,50, the first node dies after 330~420 seconds, and the whole simulation continues for about 600 seconds.

but I think these results are far away from heinzelman thesis results. the expected results are as the following:
BS location: 50,175 - nn: 100 - Size of field: 100*100 - first node dies: 410~450 sec - last node dies: 620~650 sec

so anybody else that demonstrated leach protocol successfully; please run your code with referred settings and share results with others.
thank you.
 
Old 11-05-2013, 09:11 AM   #553
eng_mohamed_sc
Member
 
Registered: Jul 2013
Posts: 49

Rep: Reputation: Disabled
Leach-C Protocol Energy file output

Dears

After run Leach_test for Leach-C Protocol The output of Energy file divided into three columns first one for time,second one for node number and the third one for the amount of dissipated Energy

it suppose that all node has init_energy=2 # Each node has 2 joul of energy
so why I see some nodes have energy dissipated more than 2 like 10 and 13 and so on
 
Old 11-11-2013, 12:27 PM   #554
mhmdmahdi
Member
 
Registered: Nov 2013
Location: Indonesia
Distribution: Ubuntu 12.04
Posts: 41

Rep: Reputation: 22
hi all, i'm trying to install leach for my research.
i'm using ubuntu 12.04..

when i used "make" command i got an error just like post #26 and solved the error with the solution given by our friend deepa_2111 on post #29.
but when i used "make" command again, i got another error.

Quote:
trace/cmu-trace.cc:1531:9: error: stray ‘\342’ in program
trace/cmu-trace.cc:1531:9: error: stray ‘\200’ in program
trace/cmu-trace.cc:1531:9: error: stray ‘\230’ in program
trace/cmu-trace.cc:1531:9: error: stray ‘\342’ in program
trace/cmu-trace.cc:1531:9: error: stray ‘\200’ in program
trace/cmu-trace.cc:1531:9: error: stray ‘\231’ in program
trace/cmu-trace.cc:1535:9: error: stray ‘\342’ in program
trace/cmu-trace.cc:1535:9: error: stray ‘\200’ in program
trace/cmu-trace.cc:1535:9: error: stray ‘\230’ in program
trace/cmu-trace.cc:1535:9: error: stray ‘\342’ in program
trace/cmu-trace.cc:1535:9: error: stray ‘\200’ in program
trace/cmu-trace.cc:1535:9: error: stray ‘\231’ in program
trace/cmu-trace.cc:1539:9: error: stray ‘\342’ in program
trace/cmu-trace.cc:1539:9: error: stray ‘\200’ in program
trace/cmu-trace.cc:1539:9: error: stray ‘\230’ in program
trace/cmu-trace.cc:1539:9: error: stray ‘\342’ in program
trace/cmu-trace.cc:1539:9: error: stray ‘\200’ in program
trace/cmu-trace.cc:1539:9: error: stray ‘\231’ in program
trace/cmu-trace.cc: In member function ‘void CMUTrace::format_rca(Packet*, int)’:
trace/cmu-trace.cc:1531:14: error: ‘A’ was not declared in this scope
trace/cmu-trace.cc:1535:14: error: ‘R’ was not declared in this scope
trace/cmu-trace.cc:1539:14: error: ‘D’ was not declared in this scope
make: *** [trace/cmu-trace.o] Error 1
can anybody help me how to solve this problem?
thanks in advance.
 
Old 11-11-2013, 02:09 PM   #555
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Post # 554, @mhmdmahdi : Welcome to LQ.

Looks like you are using the wrong compiler.

About LEACH : Latest is exidus-pegasis-leach-ns234-patch.2.tar.gz
https://drive.google.com/file/d/0B7S...it?usp=sharing

Info http://www.linuxquestions.org/questions/tags/pegasis/
( Pegasis is first mentioned in post # 289 :
http://www.linuxquestions.org/questi...68/page20.html )

Using, Ubuntu example :
Please start from scratch with $ tar xvf ns-allinone-2.34.tar.gz
$ cd ns-allinone-2.34/ && tar xvf exidus-pegasis-leach-ns234-patch.2.tar.gz
$ export CC=gcc41 CXX=g++41 && ./install

** ** Which Ubuntu 12.04 are you using ? i686 ? x86_64 ? : $ uname -m

-

Last edited by knudfl; 11-11-2013 at 02:13 PM.
 
  


Reply

Tags
leach, leach-warning50, ns2, ns2 ns234, pegasis



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
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 04:23 AM
labview stopped at "init tmp resource files" on FC4 baosheng Linux - Software 2 09-28-2007 11:02 AM
ORiNOCO WLAN card not working - "failed to allocate resource" hauneboo Linux - Laptop and Netbook 1 11-29-2005 09:08 AM
What "kernel opts" allow PC to power down with "turning energy off"? kornerr Linux - General 1 03-10-2005 12:07 PM
nvidia insmod: "Device or resource busy" w/GeForce 4 MX KeithSpook Linux - Hardware 4 03-03-2004 12:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:55 PM.

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
Open Source Consulting | Domain Registration