LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-28-2013, 04:34 AM   #16
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

# 15.

No reason to worry about the Makefile.in : Is included in the patches.

And do not do any changes to the Makefile :
The proof Makefile is automatically generated from `Makefile.in'.

P.S. : Some of your issues may appear from the Makefile,
that's included in the leach patch.
Solution : Delete ns-2.34/Makefile, before running `./install'.

-

Last edited by knudfl; 12-28-2013 at 04:47 AM.
 
Old 12-30-2013, 12:12 AM   #17
senthiya
LQ Newbie
 
Registered: Aug 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
hello knudfl sir,

again i have the same error

invalid resource energy while executing in leach.err file

i use 12.04 ubuntu version
newly install ns2.34
then i put the gcc41compat g++41compat as your instruction
finally install leach
no error produce when installing above process

when i ns2.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_ = 550.0
SORTING LISTS ...DONE!
NS EXITING...

but the leach.err shows
invalid resource energy
while exeuting

what im do next?
please help me sir
 
Old 12-31-2013, 02:47 AM   #18
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
# 17 .

The solution I know, is to use the LEACH patch by @exidus.

See post #14 : exidus-pegasis-leach-ns234-patch.2.tar.gz
You will also get "pegasis", but you can very well use leach only.

-
 
Old 01-01-2014, 11:20 PM   #19
senthiya
LQ Newbie
 
Registered: Aug 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 17 .

The solution I know, is to use the LEACH patch by @exidus.

See post #14 : exidus-pegasis-leach-ns234-patch.2.tar.gz
You will also get "pegasis", but you can very well use leach only.

-
hello sir,
1) i newly installed ns2.34
2) then put $ cd ns-allinone-2.34/ && tar xvf exidus-pegasis-leach-ns234-patch.2.tar.gz

3) i download the gcc g++ compatfile and put it into ns-allinone-2.34/ directory
4) senthiya@senthiya-Lenovo-G580:~/ns2/ns-allinone-2.34$ sudo dpkg -i gcc41-compat-4.1.2.ubu1204_i386.deb g++41-compat-4.1.2_i386.deb
5) sudo reboot
6)senthiya@senthiya-Lenovo-G580:~/ns2/ns-allinone-2.34$ export CC=gcc41 CXX=g++41 && ./install

but it shows the following error
Code:
In file included from mac/mac-802_11.cc:54:
mac/mac-802_11.h:52:27: error: CommonUtility.h: No such file or directory
mac/mac-802_11.h:539: error: ISO C++ forbids declaration of ‘CommonUtility’ with no type
mac/mac-802_11.h:539: error: expected ‘;’ before ‘*’ token
mac/mac-802_11.cc: In constructor ‘Mac802_11::Mac802_11()’:
mac/mac-802_11.cc:198: error: class ‘Mac802_11’ does not have any field named ‘utility’
mac/mac-802_11.cc: In member function ‘virtual int Mac802_11::command(int, const char* const*)’:
mac/mac-802_11.cc:310: error: ‘utility’ was not declared in this scope
mac/mac-802_11.cc:310: error: ‘CommonUtility’ was not declared in this scope
mac/mac-802_11.cc:310: error: expected primary-expression before ‘)’ token
mac/mac-802_11.cc:310: error: expected `;' before ‘TclObject’
mac/mac-802_11.cc: In member function ‘int Mac802_11::check_pktTx()’:
mac/mac-802_11.cc:1060: error: ‘utility’ was not declared in this scope
make: *** [mac/mac-802_11.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
i hit this command sir
Code:
 senthiya@senthiya-Lenovo-G580:~$ uname -m
i686
how to install pegasis sir
leach-setup.sh file need or not for installing pegasis?
is the leach and pegasis have the same steps for installing?

what do next?
pls help me sir?
 
Old 01-02-2014, 04:14 AM   #20
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
# 19 .
Quote:
mac/mac-802_11.h:52:27: error: CommonUtility.h: No such file or directory
The "mac-802_11.h" with a line 49, #include "CommonUtility.h"
.. is not from a leach / pegasis patch.
Is known from "clustering-2.29.patch" only.

What are you trying to do ? Mixing patches ?
The ns-2.29 clustering patch cannot directly be mixed with another patch.
The same is valid for the leach patches.
 
Old 01-02-2014, 10:35 PM   #21
senthiya
LQ Newbie
 
Registered: Aug 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 19 .

The "mac-802_11.h" with a line 49, #include "CommonUtility.h"
.. is not from a leach / pegasis patch.
Is known from "clustering-2.29.patch" only.

What are you trying to do ? Mixing patches ?
The ns-2.29 clustering patch cannot directly be mixed with another patch.
The same is valid for the leach patches.
hi
thank for replying
sir my requirement
1) cluster formation
2) CH create ant for finding path information
3) ACO(Ant Colony Optimization) algorithm is applied in the search for multiple paths between the CH and sink node.
and CH transmit data selected shortest path(mutihop communication)
this is my project concept sir
for that just i want cluster formation

in my home directory i installed ns229/ns2.29 and ns227/ns2.27 and ns2.34
in nsleach/ns2.34 im trying to run leach within its but its not working
so i install another ns2/ns2.34 in home directory and trying to run exidus-pegasis-leach

sir im confused
when installing leach, leach_setup.sh used for installing leach
but exidus-pegasis-leach ==> sh file need or not for installing pegasis?
pls send step-by-step procedure for installing pegasis sir

i delete the content present in bash_aliases sir.

in #572 http://www.linuxquestions.org/questi...68/page39.html
in this thread you said rename the executable 'ns' to e.g. ns-pegasis
where the ns executable present.
sir im new to ns2 please guide me sir

Last edited by senthiya; 01-02-2014 at 10:39 PM.
 
Old 01-04-2014, 12:04 AM   #22
senthiya
LQ Newbie
 
Registered: Aug 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by knudfl View Post
# 19 .

The "mac-802_11.h" with a line 49, #include "CommonUtility.h"
.. is not from a leach / pegasis patch.
Is known from "clustering-2.29.patch" only.

What are you trying to do ? Mixing patches ?
The ns-2.29 clustering patch cannot directly be mixed with another patch.
The same is valid for the leach patches.
knudfl sir,
$ cd ns-allinone-2.34/ && tar xvf exidus-pegasis-leach-ns234-patch.2.tar.gz
$ export CC=gcc41 CXX=g++41 && ./install
$ cd ns-2.34/ && sudo make install
..ns-allinone-2.34/ns-2.34$ ./configure
..ns-allinone-2.34/ns-2.34$ ./make clean
..ns-allinone-2.34/ns-2.34$ ./make
..ns-allinone-2.34/ns-2.34$ ./leach_test

pegasis.err file shows
Code:
couldn't read file "/home/tomas/ns-allinone-2.34/ns-2.34/mit/uAMPS/ns-pegasis.tcl": no such file or directory
while executing
and then edit path as my location...
finally i run $./leach_test

again pegasis.err file shows the same error as shown in leach
Code:
invalid command name "Resource/Energy"
    while executing
"Resource/Energy instproc setParams {args} {
    $self instvar energyLevel_ alarmLevel_
    set energyLevel_ [lindex $args 0]
    set alarmLevel_ [lind..."
    (file "/home/senthiya/Desktop/ns234/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
    invoked from within
"source.orig /home/senthiya/Desktop/ns234/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
    ("uplevel" body line 1)
what i do next sir?

please help and guide me sir
pls pls pls...
 
Old 01-07-2014, 11:21 PM   #23
senthiya
LQ Newbie
 
Registered: Aug 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
hello knudfl sir,
im waiting for your reply sir...
 
Old 01-08-2014, 11:38 AM   #24
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
#23, #22 :
What's to answer ? You already got the build / test sequence in other pegasis posts,
#17 http://www.linuxquestions.org/questi...219/page2.html → →
→ 1) tar xvf ns-allinone-2.34.tar.gz
2) cd ns-allinone-2.34/
3) tar xvf exidus-pegasis-leach-ns234.patch.2.tar.gz
4) export CC=gcc41 CXX=g++41
5) ./install
6) cd ns-2.34/ && sudo make install

#584 http://www.linuxquestions.org/questi...68/page39.html → →
→ ... run leach with e.g. :
$ export RCA_LIBRARY=/home/<name>/ns-allinone-2.34/ns-2.34/mit/rca && export uAMPS_LIBRARY=/home/<name>/ns-allinone-2.34/ns-2.34/mit/uAMPS && ./test

All pegasis http://www.linuxquestions.org/questions/tags/pegasis/

-
 
Old 01-17-2014, 07:06 AM   #25
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
hello knudfl sir,I m using ubuntu 12.04 with ns2.34 for leach protocol.I have done all the steps as your post#24. but my leach.err contains this error

couldn't read file "../../rca/ns-ranode.tcl": no such file or directory
while executing
"source.orig ../../rca/ns-ranode.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 ../../rca/ns-ranode.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 18)
invoked from within
"source.orig mit/uAMPS/sims/uamps.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 mit/uAMPS/sims/uamps.tcl"
(file "tcl/mobility/leach.tcl" line 18)
invoked from within
"source.orig 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 tcl/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 187)
please help.
i have changed path in uAMPS.tcl also.but still error persists.
 
Old 01-17-2014, 07:28 AM   #26
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
# 25, @keepwalking123
Quote:
couldn't read file "../../rca/ns-ranode.tcl": no such file or directory
? You have probably done the command $ ./test

... The right command : See post #24 : export RCA_LIBRARY=/home/<name>/... etc.

-
 
Old 01-17-2014, 08:29 AM   #27
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@26, thanx for reply sir,
initially i have run only ./test.
but after that,i have done export RCA_LIBRARY=/home/<name>/... etc. and again run ./test but still error persists.
please help me..m totally stucked..
 
Old 01-17-2014, 09:31 AM   #28
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
# 27 : Ref. #25 :
Quote:
I have changed path in uAMPS.tcl also.but still error persists.
The edited file(s) must be replaced with the original ones.

And :
If you are using the proof patch = exidus-pegasis-leach-ns234.patch.2.tar.gz,
no errors should appear.

-
 
Old 01-18-2014, 12:09 AM   #29
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@knudfl (#28)
sir what do u mean by edited file.What i actually did is i installed ubuntu 12.04 and ns2.34 freshly.After that i patch exidus-pegasis-leach-ns234.patch.2.tar.gz this file as your post in #26(step 6).and at last i type commands export RCA_LIBRARY=.... and run ./test and also leach_test..was it not required to run leach_test file? please help..i m not getting solution..
 
Old 01-18-2014, 01:16 AM   #30
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@knudfl
hello sir, i successfully run leach protocol by fixing that error.thank u..but my leach.out file is different.i think results are somewhat wrong.The nodes are getting dead.please check these leach.out and leach.tr files n tell me what is problem sir..thank u..awaiting for your reply..
Attached Files
File Type: pdf leach.out.pdf (164.1 KB, 23 views)
File Type: pdf leach.tr.pdf (192.4 KB, 34 views)
 
1 members found this post helpful.
  


Reply

Tags
leach_c, ns2, 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
[SOLVED] Teach(.)"Moved non-related post to a new thread"<Moderator Response below>. jamison20000e Linux - General 36 08-03-2013 01:35 PM
Enable did you find this post useful for first post of thread also vharishankar LQ Suggestions & Feedback 40 12-13-2011 12:13 PM

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

All times are GMT -5. The time now is 07:06 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