LinuxQuestions.org
Review your favorite Linux distribution.
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 09-15-2011, 08:37 AM   #166
jimctu
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Rep: Reputation: Disabled

I guess you are right, but the comsumption level will depend on the total time of simulation. The test file probably executes the transmission events until almost the depletion of the network.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-22-2011, 09:12 AM   #167
exidus
LQ Newbie
 
Registered: Jun 2011
Posts: 14

Rep: Reputation: Disabled
Quote:
Originally Posted by farab View Post
guys it seems leach protocol dont work well on ns2.34
there is much differences in results and its hard to setup completly.
I suggest to try leach on ns2.1b or ns2.27.
I have solved all your errors above. but the final result is not satsifying...
now Im trying to install earlier versions of ns.
What differences do you mean. You have successfully installed an older version?
What results did you get? Thanks
 
Old 10-01-2011, 03:58 PM   #168
linux_ubuntu
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Rep: Reputation: Disabled
hi

At the end ,when I execute ./test I face "permission denied"

Could you help me?

Thanks.
 
Old 10-01-2011, 04:22 PM   #169
jimctu
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Rep: Reputation: Disabled
@linux_ubuntu

try sudo ./test
 
Old 10-12-2011, 02:05 AM   #170
skimence
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Rep: Reputation: Disabled
Hello Everybody

I setup ns2.34 on ubuntu10.04 for my term project and trying to run leach.
but I encountered these mistakes, Would you please someone there help me with this.

leach.tcl error:

can't read "opt(num_clusters)": no such element in array
while executing
"expr 1.5*$opt(num_clusters)"
invoked from within
"expr int([expr 1.5*$opt(num_clusters)])+1"
invoked from within
"set opt(spreading) [expr int([expr 1.5*$opt(num_clusters)])+1]"
(file "leach.tcl" line 12)


leach-c.tcl error :

can't read "env(uAMPS_LIBRARY)": no such variable
while executing
"source $env(uAMPS_LIBRARY)/ns-leach.tcl"
(file "leach-c.tcl" line 7)
 
Old 10-12-2011, 04:19 AM   #171
skimence
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Rep: Reputation: Disabled
Hello again
I have two more errors while running the codes "bash leach-setup.sh"

ERROR IN bash leach-setup.sh



ns-234-leach/trace/cmu-trace.cc
ns-234-leach/trace/
ns-234-leach/test
ns-234-leach/tcl/mobility/stat-clus.tcl
ns-234-leach/tcl/mobility/mte.tcl
ns-234-leach/tcl/mobility/leach.tcl
ns-234-leach/tcl/mobility/leach-c.tcl
ns-234-leach/tcl/mobility/
ns-234-leach/tcl/ex/wireless.tcl
ns-234-leach/tcl/ex/
ns-234-leach/tcl/
ns-234-leach/package_up
ns-234-leach/mit/uAMPS/stats.tcl
ns-234-leach/mit/uAMPS/sims/uamps.tcl
ns-234-leach/mit/uAMPS/sims/stat-clus.tcl
ns-234-leach/mit/uAMPS/sims/nodescen
ns-234-leach/mit/uAMPS/sims/mte.tcl
ns-234-leach/mit/uAMPS/sims/leach.tcl
ns-234-leach/mit/uAMPS/sims/leach-c.tcl
ns-234-leach/mit/uAMPS/sims/genscen
ns-234-leach/mit/uAMPS/sims/100nodes.txt
ns-234-leach/mit/uAMPS/sims/
ns-234-leach/mit/uAMPS/ns-stat-cluster.tcl
ns-234-leach/mit/uAMPS/ns-mte.tcl
ns-234-leach/mit/uAMPS/ns-leach.tcl
ns-234-leach/mit/uAMPS/ns-leach-c.tcl
ns-234-leach/mit/uAMPS/ns-bsapp.tcl
ns-234-leach/mit/uAMPS/extras.tcl
ns-234-leach/mit/uAMPS/bsagent.o
ns-234-leach/mit/uAMPS/bsagent.h
ns-234-leach/mit/uAMPS/bsagent.cc
ns-234-leach/mit/uAMPS/
ns-234-leach/mit/rca/resources/ns-resource.tcl
ns-234-leach/mit/rca/resources/ns-resource-manager.tcl
ns-234-leach/mit/rca/resources/ns-neighbor-resource.tcl
ns-234-leach/mit/rca/resources/ns-energy-resource.tcl
ns-234-leach/mit/rca/resources/
ns-234-leach/mit/rca/resource.o
ns-234-leach/mit/rca/resource.h
ns-234-leach/mit/rca/resource.cc
ns-234-leach/mit/rca/rcagent.o
ns-234-leach/mit/rca/rcagent.h
ns-234-leach/mit/rca/rcagent.cc
ns-234-leach/mit/rca/rca-ll.o
ns-234-leach/mit/rca/rca-ll.h
ns-234-leach/mit/rca/rca-ll.cc
ns-234-leach/mit/rca/ns-ranode.tcl
ns-234-leach/mit/rca/energy.o
ns-234-leach/mit/rca/energy.h
ns-234-leach/mit/rca/energy.cc
ns-234-leach/mit/rca/
ns-234-leach/mit/leach_sims/startup.energy
ns-234-leach/mit/leach_sims/leach.save2
ns-234-leach/mit/leach_sims/leach.save1
ns-234-leach/mit/leach_sims/leach.out
ns-234-leach/mit/leach_sims/leach.err
ns-234-leach/mit/leach_sims/leach.energy
ns-234-leach/mit/leach_sims/leach.data
ns-234-leach/mit/leach_sims/leach.alive
ns-234-leach/mit/leach_sims/conditions.txt
ns-234-leach/mit/leach_sims/TDMAschedule.80.txt
ns-234-leach/mit/leach_sims/TDMAschedule.60.txt
ns-234-leach/mit/leach_sims/TDMAschedule.480.txt
ns-234-leach/mit/leach_sims/TDMAschedule.460.txt
ns-234-leach/mit/leach_sims/TDMAschedule.440.txt
ns-234-leach/mit/leach_sims/TDMAschedule.420.txt
ns-234-leach/mit/leach_sims/TDMAschedule.400.txt
ns-234-leach/mit/leach_sims/TDMAschedule.40.txt
ns-234-leach/mit/leach_sims/TDMAschedule.380.txt
ns-234-leach/mit/leach_sims/TDMAschedule.360.txt
ns-234-leach/mit/leach_sims/TDMAschedule.340.txt
ns-234-leach/mit/leach_sims/TDMAschedule.320.txt
ns-234-leach/mit/leach_sims/TDMAschedule.300.txt
ns-234-leach/mit/leach_sims/TDMAschedule.280.txt
ns-234-leach/mit/leach_sims/TDMAschedule.260.txt
ns-234-leach/mit/leach_sims/TDMAschedule.240.txt
ns-234-leach/mit/leach_sims/TDMAschedule.220.txt
ns-234-leach/mit/leach_sims/TDMAschedule.200.txt
ns-234-leach/mit/leach_sims/TDMAschedule.20.txt
ns-234-leach/mit/leach_sims/TDMAschedule.180.txt
ns-234-leach/mit/leach_sims/TDMAschedule.160.txt
ns-234-leach/mit/leach_sims/TDMAschedule.140.txt
ns-234-leach/mit/leach_sims/TDMAschedule.120.txt
ns-234-leach/mit/leach_sims/TDMAschedule.100.txt
ns-234-leach/mit/leach_sims/TDMAschedule.0.txt
ns-234-leach/mit/leach_sims/
ns-234-leach/mit/
ns-234-leach/mac/wireless-phy.h
ns-234-leach/mac/wireless-phy.cc
ns-234-leach/mac/phy.h
ns-234-leach/mac/phy.cc
ns-234-leach/mac/mac.cc
ns-234-leach/mac/mac-sensor.h
ns-234-leach/mac/mac-sensor.cc
ns-234-leach/mac/mac-sensor-timers.h
ns-234-leach/mac/mac-sensor-timers.cc
ns-234-leach/mac/ll.h
ns-234-leach/mac/channel.cc
ns-234-leach/mac/
ns-234-leach/leach_test
ns-234-leach/common/packet.h
ns-234-leach/common/packet.cc
ns-234-leach/common/mobilenode.cc
ns-234-leach/common/
ns-234-leach/apps/app.h
ns-234-leach/apps/app.cc
ns-234-leach/apps/
ns-234-leach/Makefile.in
ns-234-leach/Makefile
ns-234-leach/
cp: cannot create directory `/sener/ns-allinone-2.34/ns-2.34': No such file or directory
cp: target `/sener/ns-allinone-2.34/ns-2.34/apps' is not a directory
cp: cannot create regular file `/sener/ns-allinone-2.34/ns-2.34/mac': No such file or directory
cp: cannot create regular file `/sener/ns-allinone-2.34/ns-2.34/mac': No such file or directory
cp: target `/sener/ns-allinone-2.34/ns-2.34/mac' is not a directory
cp: target `/sener/ns-allinone-2.34/ns-2.34/mac' is not a directory
cp: cannot create regular file `/sener/ns-allinone-2.34/ns-2.34/mac': No such file or directory
cp: target `/sener/ns-allinone-2.34/ns-2.34/mac' is not a directory
cp: cannot create regular file `/sener/ns-allinone-2.34/ns-2.34/trace': No such file or directory
cp: target `/sener/ns-allinone-2.34/ns-2.34/common' is not a directory
cp: cannot create regular file `/sener/ns-allinone-2.34/ns-2.34/common': No such file or directory
cp: cannot create regular file `/sener/ns-allinone-2.34/ns-2.34/tcl/mobility': No such file or directory
cp: cannot create regular file `/sener/ns-allinone-2.34/ns-2.34/tcl/mobility': No such file or directory
cp: cannot create regular file `/sener/ns-allinone-2.34/ns-2.34/tcl/mobility': No such file or directory
cp: cannot create regular file `/sener/ns-allinone-2.34/ns-2.34/tcl/mobility': No such file or directory
cp: cannot create regular file `/sener/ns-allinone-2.34/ns-2.34/tcl/ex': No such file or directory
cp: cannot create regular file `/sener/ns-allinone-2.34/ns-2.34': No such file or directory
cp: cannot create regular file `/sener/ns-allinone-2.34/ns-2.34': No such file or directory
cp: cannot create regular file `/sener/ns-allinone-2.34/ns-2.34': No such file or directory
cp: cannot create regular file `/sener/ns-allinone-2.34/ns-2.34': No such file or directory


and the error for command "./test" appears as

/ns-allinone-2.34/ns-2.34/ns-234-leach$ ./test
bash: ./test: Permission denied

the reason I write this command in "/ns-allinone-2.34/ns-2.34/ns-234-leach$" is that there is no test file in "/ns-allinone-2.34/ns-2.34"

Can Anyone help me please ?
 
Old 10-12-2011, 08:50 AM   #172
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,652

Rep: Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532
Post # 171, @skimence : Please edit posts #170 #171 to use code tags
http://www.linuxquestions.org/questi....php?do=bbcode
I.e. write [/code] at text end, and [code] at code text start.
Or use the # button in the Advanced Editor : Edit >> Go Advanced.


Where did you get the `/sener/ - word ? Not found in "leach-setup.sh".

Suggest : Start from scratch using /home/<your-name>/ns-allinone-2.34/.
And then use this setup script : leach-HOME-setup234.sh.txt
http://www.linuxquestions.org/questi...6/#post4494091
Other issues : ns-allinone-2.34/ns-2.34/trace/cmu-trace.h
are also described in that thread.

The original files, instructions, post # 5 here
http://www.linuxquestions.org/questi...34-a-870368/#5

..

Last edited by knudfl; 10-12-2011 at 08:57 AM.
 
Old 12-24-2011, 06:26 AM   #173
ayaan
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Rep: Reputation: Disabled
hi
i am working on leach simulation in ubuntu 10.10 and i followed your link "install leach on ns2.34" and
when i typed $make i got the following error
make:g++-4.3:command not found
make:***[tools/random.0]error 127
plz help me in finding the solution as soon as possible.
 
Old 12-24-2011, 07:23 AM   #174
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,652

Rep: Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532
# 173.

Which link ? Suggest : use g++-4.2

Add Hardy in Synaptic :
Settings > Repositories > Other Software
... Tick the 3 Hardy entries, and then "Reload".

Then you can install 'g++-4.2' with Synaptic.

.

Last edited by knudfl; 12-24-2011 at 10:27 AM.
 
Old 12-25-2011, 03:41 AM   #175
ayaan
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Rep: Reputation: Disabled
moin@moin-Inspiron-N5010:~$ bash leach-setup.sh
tar (child): ns-234-leach.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
/home/moin/ns-allinone-2.34/ns-2.34/leach-setup.sh: line 3: cd: ns-234-leach/: No such file or directory
cp: cannot stat `mit': No such file or directory
cp: cannot stat `apps/app.*': No such file or directory
cp: cannot stat `mac/channel.cc': No such file or directory
cp: cannot stat `mac/ll.h': No such file or directory
cp: cannot stat `mac/wireless-phy.*': No such file or directory
cp: cannot stat `mac/phy.*': No such file or directory
cp: cannot stat `mac/mac.cc': No such file or directory
cp: cannot stat `mac/mac-sensor*': No such file or directory
cp: cannot stat `trace/cmu-trace.*': No such file or directory
cp: cannot stat `common/packet.*': No such file or directory
cp: cannot stat `common/mobilenode.cc': No such file or directory
cp: cannot stat `tcl/mobility/leach-c.tcl': No such file or directory
cp: cannot stat `tcl/mobility/leach.tcl': No such file or directory
cp: cannot stat `tcl/mobility/mte.tcl': No such file or directory
cp: cannot stat `tcl/mobility/stat-clus.tcl': No such file or directory
cp: cannot stat `tcl/ex/wireless.tcl': No such file or directory
cp: cannot stat `test': No such file or directory
cp: cannot stat `leach_test': No such file or directory
cp: cannot stat `Makefile': No such file or directory
cp: cannot stat `Makefile.in': No such file or directory
 
Old 12-25-2011, 05:44 AM   #176
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,652

Rep: Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532
# 175.
Quote:
No such file or directory
For a file to be found : It must be present.
Where did you unpack ns-234-leach.tar.gz ?

Suggest : Use the script "leach-HOME-setup234"
http://www.linuxquestions.org/questi...6/#post4494091
And please read that post = #11.

Important : Use the modified cmu-trace.h, post #9 here
http://www.linuxquestions.org/questi...ra13-907076/#9

..
 
Old 01-01-2012, 02:54 AM   #177
rami2007
LQ Newbie
 
Registered: Mar 2011
Posts: 5

Rep: Reputation: 0
I install ns-2.27 on Ubuntu 9.10. and i install leach based on this instructions on this posts ,

but now my problem with the results of energy consumption it is greater than the initial energy
for example if the initial energy of node is 5 J the final results of energy consumption of the same node is 11 J!!!

from where it gain the rest energy ? is it right ?

please if any one have any information please tell me ASAP.

Regards,
Anas Al-Roubaiey
KFUPM
 
Old 01-02-2012, 03:25 AM   #178
CHIDAMBARGURAV
LQ Newbie
 
Registered: Jan 2012
Posts: 1

Rep: Reputation: Disabled
HELLO EVERYONE
i m chidambar.
my post graduation project is related LEACH protocol

Do anybody tell me the detail command list to implement Leach protocol on NS2.34
I am using FEDORA 10
 
Old 01-02-2012, 05:24 AM   #179
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,652

Rep: Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532Reputation: 2532
# 178 @CHIDAMBARGURAV : Welcome to LQ.


Quote:
Quote post #172


Suggest : /home/<your-name>/ns-allinone-2.34/.
And then use this setup script : leach-HOME-setup234.sh.txt
http://www.linuxquestions.org/questi...6/#post4494091
Other issues : ns-allinone-2.34/ns-2.34/trace/cmu-trace.h
are also described in that thread.

The original files, instructions, post # 5 here
http://www.linuxquestions.org/questi...34-a-870368/#5
And please read (all) posts in this thread and the linked threads : Fedora is mentioned.

..

Last edited by knudfl; 01-02-2012 at 03:35 PM.
 
Old 01-07-2012, 11:30 AM   #180
ayaan
LQ Newbie
 
Registered: Dec 2011
Posts: 15

Rep: Reputation: Disabled
hi after make in leach protocol i got this error
moin@moin-Inspiron-N5010:~/ns-allinone-2.34/ns-2.34$ make
g++-4.3 -c -Wall -Wno-write-strings -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -DMIT_uAMPS -I. -I. -I/home/moin/ns-allinone-2.34/tclcl-1.19 -I/home/moin/ns-allinone-2.34/otcl -I/home/moin/ns-allinone-2.34/include -I/home/moin/ns-allinone-2.34/include -I/home/moin/ns-allinone-2.34/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -I./mit/rca -I./mit/uAMPS -o trace/cmu-trace.o trace/cmu-trace.cc
trace/cmu-trace.cc: In member function ‘void CMUTrace::format(Packet*, const char*)’:
trace/cmu-trace.cc:1327: error: ‘format_rca’ was not declared in this scope
trace/cmu-trace.cc: At global scope:
trace/cmu-trace.cc:1523: error: no ‘void CMUTrace::format_rca(Packet*, int)’ member function declared in class ‘CMUTrace’
make: *** [trace/cmu-trace.o] Error 1
plz help me out soon
 
  


Reply

Tags
leach, leach-warning50, ns2, 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


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 05:14 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