LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
 
LinkBack Search this Thread
Old 04-16-2013, 09:50 PM   #451
@lavender
LQ Newbie
 
Registered: Feb 2013
Posts: 15

Rep: Reputation: Disabled
Question help__Please_The_Time


Hello

please when i run the simulation of leach the output was


At 524.60000000005073:
Total Energy = 199.88864065249675
Total Data = 53086
Total Alive = 4

Simulation complete.
even if in the PhD thesis by Heinzelman the time was more than this could you tell me what is the problem please ?
 
Old 04-17-2013, 05:15 AM   #452
zo0olalao0oz
LQ Newbie
 
Registered: Apr 2013
Posts: 2

Rep: Reputation: Disabled
Hello! I have run "ns wireless.tcl -sc mit/uAMPS/sims/nodescen -rp leach -x 1000 -y 1000 -nn 101 -stop 100 -eq_energy 1 -init_energy 2 -filename leach_file -dirname leach_dir -num_clusters 5 -bs_x 0 -bs_y 0" but error:
Code:
couldn't open "leach_dir/conditions.txt": no such file or directory
    while executing
"open "$opt(dirname)/conditions.txt" w"
    invoked from within
"set outf [open "$opt(dirname)/conditions.txt" w]"
    (file "/home/gz/ns-allinone-2.34/ns-2.34/tcl/mobility/leach.tcl" line 14)
    invoked from within
"source.orig /home/gz/ns-allinone-2.34/ns-2.34/tcl/mobility/leach.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 /home/gz/ns-allinone-2.34/ns-2.34/tcl/mobility/$opt(rp).tcl"
    (file "wireless.tcl" line 187)
Anyone help me solve this problem? Thanks so much!
 
Old 04-17-2013, 06:46 AM   #453
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,186

Rep: Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368
# 452 .

Easier : You can use a modified version of "leach_test", like leach_test2
for your simulation settings, "stop 100" etc.
And run an edited "test" : test2 that calls leach_test2.
Then the most of the "directory settings" will be in place.
 
1 members found this post helpful.
Old 04-17-2013, 10:48 AM   #454
littleroot
LQ Newbie
 
Registered: Apr 2013
Posts: 6

Rep: Reputation: Disabled
sir knudfl...i tried to run the pegasis, but in the pegasis.out it said that :
......
BS received: 99 - mit/uAMPS/ns-bsapp.tcl
BS received info: (98.747841361327033 38.908460754392884 2) from Node 99 a nodik je 100 - mit/uAMPS/ns-bsapp.tcl
BS received: 100 - mit/uAMPS/ns-bsapp.tcl

At 10: - mit/uAMPS/stats.tcl
Total Energy = 0.0059307213061996289
Total Data = 0
Total Alive = 100


At 20: - mit/uAMPS/stats.tcl
Total Energy = 0.0059307213061996289
Total Data = 0
Total Alive = 100
....and all of my data = 0, all enery have same point, do you know why? what's my mistake sir? tq sir
 
Old 04-24-2013, 04:09 AM   #455
Anurag31d
LQ Newbie
 
Registered: Apr 2013
Posts: 2

Rep: Reputation: Disabled
@deepa_2111
hello... i could install leach successfully but how do i get the results?
 
Old 04-27-2013, 04:34 AM   #456
questforleach
LQ Newbie
 
Registered: Apr 2013
Posts: 3

Rep: Reputation: Disabled
still leach.out file is same

its not working

Quote:
Originally Posted by exidus View Post
@deepa_2111
I still can not find values of amount in leach.out.

@helyos
1. You can create a new topology file with a file mit/uAmps/genscen. Change these lines in this file
Code:
set outf [open "your_new_file.txt" w]
set num_nodes 100 // set number what you want. E.g 50
2. Then run command ns genscen and you will see new topology file your_new_file.txt
3. Change lines in the file leach_test
Code:
topology_file="mit/uAMPS/sims/your_new_file.txt"
and

Code:
# Number of nodes.  WARNING!  This should be 1 higher then the number
#  of nodes generated in the scenario.
nn=51
4. Now you can run simulation with 50 nodes.
 
Old 04-27-2013, 06:49 AM   #457
questforleach
LQ Newbie
 
Registered: Apr 2013
Posts: 3

Rep: Reputation: Disabled
Mr. knudfl, Can you tell me why there is no effect of changing number of cluster heads (nn) in leach_test file?? I am stuck in between.
 
Old 05-14-2013, 02:11 PM   #458
lintreesa
LQ Newbie
 
Registered: Apr 2013
Posts: 7

Rep: Reputation: Disabled
Hi Deepa

I installed leach in ns-allinone-2.34 on ubuntu 10.10..
i got the result in leach.out file..I have same issue with energy consumption..i made the suggested by you..but the result is the same..and also i changed leach_test file to execute leach-c , after that i executed ./leach_test..i am getting the same result..is there any problem..? can u help me
 
Old 05-17-2013, 05:08 AM   #459
SimK
LQ Newbie
 
Registered: May 2013
Posts: 2

Rep: Reputation: Disabled
Hi Deepa
I am installing leach in NS2.34 on ubuntu10.04.I got the result in leach.out file.
but while running leach-c by command ns ns-leach-c.tcl , I got error. Please help me to solve this.
 
Old 05-20-2013, 01:03 PM   #460
zo0olalao0oz
LQ Newbie
 
Registered: Apr 2013
Posts: 2

Rep: Reputation: Disabled
Hello, Anyone can help me plot topo in LEACH? Like this figure.
http://i927.photobucket.com/albums/a...psaec3a653.jpg
And I simulated LEACH and LEACH-C, but the result show LEACH alive longer than LEACH-C. This's comand I used:
LEACH:
Quote:
ns /home/gz/ns-allinone-2.34/ns-2.34/tcl/ex/wireless.tcl \
-sc /home/gz/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/nodescen \
-rp leach \
-x 100 \
-y 100 \
-nn 101 \
-stop 3600 \
-eq_energy 1 \
-init_energy 2 \
-filename leach_sim_2 \
-dirname /home/gz/Desktop/Leach \
-topo /home/gz/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/100nodes.txt \
-num_clusters 5 \
-bs_x 50 \
-bs_y 175 2>/home/gz/Desktop/Leach/leach_sim_2.err 1>/home/gz/Desktop/Leach/leach_sim_2.out &
LEACH-C:
Quote:
ns /home/gz/ns-allinone-2.34/ns-2.34/tcl/ex/wireless.tcl \
-sc /home/gz/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/nodescen \
-rp leach-c \
-x 100 \
-y 100 \
-nn 101 \
-stop 3600 \
-eq_energy 1 \
-init_energy 2 \
-filename leach-c_2 \
-dirname /home/gz/Desktop/Leach-C \
-topo /home/gz/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/100nodes.txt \
-num_clusters 5 \
-bs_x 50 \
-bs_y 175 2>/home/gz/Desktop/Leach-C/leach-c_2.err 1>/home/gz/Desktop/Leach-C/leach-c_2.out &
 
Old 05-30-2013, 02:08 AM   #461
thirukp
LQ Newbie
 
Registered: May 2013
Posts: 1

Rep: Reputation: Disabled
Hi

how to create nam file for leach protocol.. please provide any sample tcl for create nam file and graph
but in leach.nam file i am getting following output and its not working or showing simulation in nam(just empty window)

V -t * -v 1.0a5 -a 0
W -t * -x 1000 -y 1000
A -t * -n 1 -p 0 -o 0xffffffff -c 31 -a 1
A -t * -h 1 -m 2147483647 -s 0
 
Old 06-03-2013, 11:09 AM   #462
abbasnozari
LQ Newbie
 
Registered: May 2012
Posts: 6

Rep: Reputation: Disabled
cmu-trace.h

Hi,
I can't find "cmu-trace.h" file.
where is the cmu-trace.h file?
where is its directory?
 
Old 06-03-2013, 11:31 AM   #463
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,186

Rep: Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368
# 462, @abbasnozari : Welcome to LQ.

$ cd ns-allinone-2.34/ns-2.34
$ find ns-2.34/ -name "cmu-trace.h"
→ → ns-2.34/trace/cmu-trace.h

An example of an edited "cmu-trace.h" : Post #9 here
http://www.linuxquestions.org/questi...ra13-907076/#9

? There may be another example in "exidus-pegasis_ns-234-leach.tar.gz" ?
http://www.linuxquestions.org/questi...-ns2-940394/#6
All pegasis http://www.linuxquestions.org/questions/tags/pegasis/
( Leach-pegasis-ns234 is the latest leach for ns-2.34 ).

-
 
1 members found this post helpful.
Old 06-03-2013, 01:11 PM   #464
abbasnozari
LQ Newbie
 
Registered: May 2012
Posts: 6

Rep: Reputation: Disabled
thank you very much knudfl.
 
Old 06-03-2013, 01:56 PM   #465
abbasnozari
LQ Newbie
 
Registered: May 2012
Posts: 6

Rep: Reputation: Disabled
Hi,
I followed the steps in post number 7 but after running make command finally i see these lines:

for i in indep-utils/cmu-scen-gen/setdest indep-utils/webtrace-conv/dec indep-utils/webtrace-conv/epa indep-utils/webtrace-conv/nlanr indep-utils/webtrace-conv/ucb; do ( cd $i; make all; ) done
make[1]: Entering directory `/home/anmk/ns-allinone-2.34/ns-2.34/indep-utils/cmu-scen-gen/setdest'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/anmk/ns-allinone-2.34/ns-2.34/indep-utils/cmu-scen-gen/setdest'
make[1]: Entering directory `/home/anmk/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/dec'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/anmk/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/dec'
make[1]: Entering directory `/home/anmk/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/epa'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/anmk/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/epa'
make[1]: Entering directory `/home/anmk/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/nlanr'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/anmk/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/nlanr'
make[1]: Entering directory `/home/anmk/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/ucb'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/anmk/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/ucb'

what is the problem?
 
  


Reply

Tags
leach, leach-deepa#774, leach-warning50, ns2 ns234, pegasis


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 10:50 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration