LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-20-2014, 11:15 AM   #766
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0

as per blog mentioned by you , I am unable to find solution for the contents of my leach.err file
can you please provide me the solution please...........
 
Old 02-20-2014, 01:47 PM   #767
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
# 766, @mittal_saurabhin

If it's about the error output shown in post #739 :
Quote:
invalid command name "Resource/Energy"
... it's a failed build , or you are using the wrong executable 'ns'.

May be you can't build the old LEACH (ns227..ns234) with your current OS ?
The proof choice for a contemporary OS is still the new patching :
"exidus-pegasis-leach-ns234-patch.2.tar.gz"
https://docs.google.com/file/d/0B7S2...it?usp=sharing

-
 
Old 02-21-2014, 02:47 PM   #768
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
I can help you if you have logical questions but I don't think I have the original LEACH set up anymore... If I can find a version (chances are only 10%), I'll upload it.

However, I'd really advise you to try to learn the code flow yourself.




Quote:
Originally Posted by mittal_saurabhin View Post
@deepa @keepwalking

If possible, can you please provide me the tcl file for leach or higher versions so as to run and analyze LEACH......
else
can you please provide me the details of tcl files available in ex folder so that the same can be used for simulating LEACH..
 
Old 02-22-2014, 10:54 AM   #769
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
dear kdudfl #767

I have used the same patch you are telling for current version of OS.
But still m getting the same contents of leach.err filedear
 
Old 02-22-2014, 09:10 PM   #770
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
If it is not a problem with your OS-ns2 compatibility, please follow the steps in this blog : http://2bytes4u.blogspot.ca/2012/11/...on-ns-234.html.

The author explicitly details the steps to be followed. However, MAKE SURE YOU REPLACE THE PATH WITH YOUR CORRECT PATH. DO NOT BLINDLY DO A COPY-PASTE.



Quote:
Originally Posted by mittal_saurabhin View Post
as per blog mentioned by you , I am unable to find solution for the contents of my leach.err file
can you please provide me the solution please...........
 
Old 02-22-2014, 11:00 PM   #771
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
# 770, @deepa_2111 : Thank you.

Some comments ..
About the blog, #770 : Mostly a copy of post #5 from this very thread ..
http://www.linuxquestions.org/questi...34-a-870368/#5

The new `cmu-trace.h' was added here at LQ, Oct 2011 :
http://www.linuxquestions.org/questi...ra13-907076/#9
.. ref. a post in http://www.linuxquestions.org/questi...2-34-a-870368/

From the blog :
""yourpath/ns-allinone-2.34" for the follwoing ..
- "Makefile.in" : found in the directory "yourpath/ns-allinone-2.34/ns-2.34"."
*** Looks like a typo : No path is ever set in Makefile.in .

And : gcc-3.4/g++-3.4 worked with ns2 for a short time in Ubuntu 10.04 three years ago.
Not used any more : Ubuntu 10.04 got updated, only gcc/g++-4.1.2 worked then.

-
 
Old 02-23-2014, 12:19 AM   #772
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

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

Yes, must be a typo. I don't remember modifying a makefile either.


Quote:
Originally Posted by knudfl View Post
# 770, @deepa_2111 : Thank you.

Some comments ..
About the blog, #770 : Mostly a copy of post #5 from this very thread ..
http://www.linuxquestions.org/questi...34-a-870368/#5

The new `cmu-trace.h' was added here at LQ, Oct 2011 :
http://www.linuxquestions.org/questi...ra13-907076/#9
.. ref. a post in http://www.linuxquestions.org/questi...2-34-a-870368/

From the blog :
""yourpath/ns-allinone-2.34" for the follwoing ..
- "Makefile.in" : found in the directory "yourpath/ns-allinone-2.34/ns-2.34"."
*** Looks like a typo : No path is ever set in Makefile.in .

And : gcc-3.4/g++-3.4 worked with ns2 for a short time in Ubuntu 10.04 three years ago.
Not used any more : Ubuntu 10.04 got updated, only gcc/g++-4.1.2 worked then.

-
 
Old 02-23-2014, 10:42 PM   #773
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

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

I found my copy of LEACH on ns-2.35.
However, after compressing, it is 55 MB. How do I upload it ? Dropbox ?
 
1 members found this post helpful.
Old 02-23-2014, 11:00 PM   #774
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
My LEACH on ns-2.35.

Please find attached my installation of LEACH with ns-2.35.
Here is the google drive link:

https://drive.google.com/file/d/0B8U...it?usp=sharing

Please note: This work was done 2 years ago. Not sure if it'll run with the current Ubuntu and compilers.
Please use for a reference only.


Please note : The file is 55 MB. I no longer have Linux installed on my current PC, and hence unable to make clean etc.
Also, I'll not be able to build or help with build related issues with my installation.

Please let me know if you are able to extract the files. If not, will tar zip and send the files.

Last edited by deepa_2111; 02-24-2014 at 08:34 AM.
 
1 members found this post helpful.
Old 02-24-2014, 12:18 AM   #775
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
hi deepa, i have one doubt, look at in ns-leach.tcl file..in proc SendDataToBS i have not found any procedure to be called but actually it calls the procedure recvData in ns-bsapp.tcl..from where it is called and where it returns??i put some lines to trace also such as entering and leaving fun to trace out but still cant get this one.. actually i want to return some value from this function but i am unable to do it..please help me..also tell me what is meaning of "pp"..please..
 
Old 02-24-2014, 08:30 AM   #776
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
See the last line:
Code:
$ns_ at $random_delay "$self send $mac_dst $link_dst $DATA \
                             $msg $datasize $dist $opt(bsCode)"
The "send" command calls the required C++ (backend) functions for sending the data.
Similarly, there are C++ functions which enable the node to receive the packets. If the packet ID matches that for DATA packets, "recvData" in the tcl files is called.

Like I said earlier, you cannot just put a print statement and get the results. If you want something to be printed when the data packet is sent, you have to do
Code:
$ns_ at $random_delay "puts ..... "
The time (here "random_delay") at which the action is to be performed has to be specified. Else, the action will be performed at the start of the simulation itself.


Quote:
Originally Posted by keepwalking123 View Post
hi deepa, i have one doubt, look at in ns-leach.tcl file..in proc SendDataToBS i have not found any procedure to be called but actually it calls the procedure recvData in ns-bsapp.tcl..from where it is called and where it returns??i put some lines to trace also such as entering and leaving fun to trace out but still cant get this one.. actually i want to return some value from this function but i am unable to do it..please help me..also tell me what is meaning of "pp"..please..

Last edited by deepa_2111; 02-24-2014 at 02:37 PM.
 
Old 02-25-2014, 12:18 AM   #777
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
hi deepa..thanx for your reply..i got what u said..as i am modifying the code, i want the clusters formed during first round..for that i write this code-

proc temp1 {name} {
upvar 1 $name x
global data
set data $name
#puts "Nodes data=$data"
#return $data
temp2
}

proc temp2 {} {
global data
puts "final data=$data"
set data_array [lappend data_array $data]
puts "dt_arr=$data_array"
return $data_array
}
where temp1 is called in bs-app.tcl by call by reference as: temp1 $actual_nodes_data
but the problem is it takes only last cluster nodes in array and previous once are getting flushed or overwritten..can u suggest me any solution to this?? please..
 
Old 02-27-2014, 03:57 AM   #778
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
hello all..
can anybody provide me package of energy leach protocol..as it is required as base of my project..please awaiting for your replies..please..
 
Old 02-27-2014, 04:36 AM   #779
nasgelicvijay
LQ Newbie
 
Registered: Oct 2013
Posts: 12

Rep: Reputation: Disabled
Same Query of Post #438_Please give me suggestions!!

/lib -ltk8.5 -L/home/aruna/aruna/ns-allinone-2.35/lib -ltcl8.5 -lXext -lX11 -lnsl -ldl -lm -lm
tmix/tmix.o: In function `Tmix:icktcp()':
tmix.cc.text+0xc87): undefined reference to `agentFactory(Tmix*, char*, char*)'
tmix/tmix.o: In function `Tmix::setup_connection()':
tmix.cc.text+0x18ea): undefined reference to `typeinfo for TmixOneWayAgent'
tmix.cc.text+0x18f2): undefined reference to `typeinfo for TmixAgent'
tmix.cc.text+0x1999): undefined reference to `typeinfo for TmixOneWayAgent'

collect2: ld returned 1 exit status
make: *** [ns] Error 1


please help me to sort it out this problem.
I m using ns-2.35 in ubuntu 12.04.
 
Old 02-27-2014, 04:42 AM   #780
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Quote:
Originally Posted by deepa_2111 View Post
Hi Aska, a quick question.
In LEACH, nodes are stationary .. So what did you mean by node movement ?
I'm curious about the nam file .. If possible, can you upload a screenshot of the nam file ?
sorry Deepa for late reply

I have not seen your post.

I can show wireless nodes in a nam file I can also show their movements.

To show Movements is easy . There is setdest command for that.

which kind of nam output you want?

Usually I set positions of nodes in tcl file and make exec out.nam.

But in leach protocol leach-test include topology from a .txt file.

I am not able to include it in tcl file.
 
  


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