LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-15-2018, 03:04 AM   #1
likeyu
LQ Newbie
 
Registered: Apr 2018
Posts: 4

Rep: Reputation: Disabled
Unhappy Leach installion on ns-2.34, only have data in 1.0999s,no time 10、20 to 500


Hello,everyone!

I insatll leach on ns-2.34 (ubuntu14.04,gcc-4.47). When i start ./leach_test i get no err in leach.err.

But there are only one TDMASchedule named DMASchedule.0.txt,and only one time 1.0999s in leach.alive、leach.data、leach.energy and leach.out.

i think the output is invalid.
Many thanks for helping me with this problem.
Code:
-----------------./test-----------------------

/home/ns-allinone-2.34/ns-2.34# ./test
num_nodes is set 3
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Loading connection pattern...
Loading scenario file...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 89.8
SORTING LISTS ...DONE!
NS EXITING...
Code:
------------------leach.err-------------------

INITIALIZE THE LIST xListHead
SORTING LISTS ...DONE!
Code:
------------------TDMASchedule.0.txt----------
42
71
82
Code:
------------------leach.alive-----------------

1.0999999999999999 0 0
1.0999999999999999 1 0
1.0999999999999999 2 0
1.0999999999999999 3 0
1.0999999999999999 4 0
.................... 0
1.0999999999999999 91 0
1.0999999999999999 92 0
1.0999999999999999 93 0
1.0999999999999999 94 0
1.0999999999999999 95 0
1.0999999999999999 96 1
1.0999999999999999 97 1
1.0999999999999999 98 1
1.0999999999999999 99 1
Code:
-------------------leach.out------------------

Creating sensor nodes...
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 (100 == BS)
*** NOTE: no connection pattern specified.
Loading scenario file...
Node 0: (65.745973803916002,92.581722416254564)
Node 1: (21.008649990432268,92.380389195112684)
...
Node 99: (44.071560420129238,10.71598111219517)
Max Distance for this Simulation is 139.0
Load complete...
Starting Simulation...
THRESH = 0.050000000000000003
0: *******************************************
THRESH = 0.050000000000000003
1: *******************************************
...
42: Is a cluster head at time 0
...
71: Is a cluster head at time 0
...
82: Is a cluster head at time 0
...
THRESH = 0.050000000000000003
99: *******************************************
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
0: Warning!!! No Cluster Head ADVs were heard!
Data being sent to the Base Station
Data was sent to the base station
1: Warning!!! No Cluster Head ADVs were heard!
Data being sent to the Base Station
Data was sent to the base station
2: Warning!!! No Cluster Head ADVs were heard!
Data being sent to the Base Station
Data was sent to the base station
3: Warning!!! No Cluster Head ADVs were heard!
Data being sent to the Base Station
Data was sent to the base station
...
42: Current cluster-head is 42, code is 1,  dist is 139.0
...
71: Current cluster-head is 71, code is 1,  dist is 139.0
...
82: Current cluster-head is 82, code is 1,  dist is 139.0
...
98: Warning!!! No Cluster Head ADVs were heard!
Data being sent to the Base Station
Data was sent to the base station
99: Warning!!! No Cluster Head ADVs were heard!
Data being sent to the Base Station
Data was sent to the base station
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
...
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning!  There are no nodes in this cluster (42)!
Data being sent to the Base Station
Data was sent to the base station
Warning!  There are no nodes in this cluster (71)!
Data being sent to the Base Station
Data was sent to the base station
Warning!  There are no nodes in this cluster (82)!
Data being sent to the Base Station
Data was sent to the base station
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Node 0 is DEAD!!!!
Node 1 is DEAD!!!!
Node 2 is DEAD!!!!
Node 3 is DEAD!!!!
Node 4 is DEAD!!!!
Node 5 is DEAD!!!!
...
Node 91 is DEAD!!!!
Node 92 is DEAD!!!!
Node 93 is DEAD!!!!
Node 94 is DEAD!!!!
Node 95 is DEAD!!!!

At 1.0999999999999999:
		Total Energy = 29733.168491379263
		Total Data = 0
		Total Alive = 4

Simulation complete.

num_nodes is set 101
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 222.8
the time=1.099/data=0/energy=29733 all seems to be wrong. need help
 
Old 04-16-2018, 02:43 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,321

Rep: Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581
Answered here https://www.linuxquestions.org/quest...4175463324/#12
 
  


Reply

Tags
leach, ns2


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
[SOLVED] NS2: leach no data sent to BS vip2442 Linux - Software 20 03-01-2019 10:11 AM
How to solve error in leach.err file while running leach code in ns-2.35? Kausha LinuxQuestions.org Member Intro 1 01-18-2016 04:07 AM
LXer: Data on 500,000 open source projects available LXer Syndicated Linux News 0 07-20-2012 09:32 PM
pavucontol、alsamixer... lkd Linux - Newbie 1 06-04-2012 02:46 AM
why i am unable to go to next screen at the time of "Disk Druid" during installion? sat_satishv Linux - Hardware 1 02-21-2006 11:24 AM

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

All times are GMT -5. The time now is 03:15 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration