LinuxQuestions.org
Visit Jeremy's Blog.
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 01-31-2014, 11:42 AM   #706
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0

hi deepa


can you pla tell that m having makefile.in file in non modifiable state. How can I make changes for gcc and g++ in that file.
Alo the version of gcc --version
gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

and g++ --version
g++ (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE


How can I change these versions to gcc-4.3 and g++-4.3
 
Old 01-31-2014, 05:49 PM   #707
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
@ deepa

Thanks

when i run my simulation in ns-234-leach directory it goes up to 280 .

But when I run it in ns-2.34 Dir it runs up to 320 sec.

Thanks

---------- Post added 01-31-14 at 06:50 PM ----------

@mittal
try run chmod command

chmod 777 -R ns-allinone-2.34
 
Old 02-01-2014, 11:13 AM   #708
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@ deepa
hi deepa..thanx for ur help..i m getting code now..can u plz tell me how could i get distance (communication) of base station from every node?? plzz..
 
Old 02-02-2014, 02:29 AM   #709
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
@keepwalking123

you can calculate distance refer file extra.tcl

I think this is in uAMPS folder.
 
Old 02-02-2014, 07:33 AM   #710
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@ASKA123
hi, extras.tcl already contain one procedure called nodeToBSDist to calculate distance of node from base station, but where it actually return and print that distance? i mean i didn't find file or function from that this procedure is called..can u help me please..thank you for ur reply..
 
Old 02-03-2014, 02:52 AM   #711
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@deepa and ASKA123
hi..while modifying code i got this error..

ns: _o50 findBestCluster: invalid command name "6"
while executing
"$l"
("foreach" body line 11)
invoked from within
"foreach element $clusterChoices_ {

set chID [lindex $element 0]
set clustID [lindex $element 2]
set ind [lsearch $clusterChoices_ $..."
invoked from within
"if [$self isClusterHead?] {
# If node is CH, determine code and create a TDMA schedule.
set dist_ $opt(max_dist)
set currentCH_ $nodeID
..."
(procedure "_o50" line 11)
(Application/LEACH findBestCluster line 11)
invoked from within
"_o50 findBestCluster"

and my modified code is

foreach element $clusterChoices_ {

set chID [lindex $element 0]
set clustID [lindex $element 2]
set ind [lsearch $clusterChoices_ $element]
puts "cluster choices are $clusterChoices_ "
set l [lindex $clusterChoices_ 0]
puts "l=$l"
set d [lindex $clusterDist_ $ind]
puts "distance of $element in $clusterDist_ is = $d and min dist = $min_dist"
set bdist_ [nodeToBSDist [$l] $bs]
puts "dist to BS is $bdist_"

It prints upto distance of element in $clusterDist_..and after that it gives this error..can u tell me what is wrong in last two lines.i want dist between CH and BS..please help..
 
Old 02-03-2014, 08:44 AM   #712
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
@ keepwalking,

your error is in line
Code:
set bdist_ [nodeToBSDist [$l] $bs]
I think you can use "element" instead of "l".



Quote:
Originally Posted by keepwalking123 View Post
@deepa and ASKA123
hi..while modifying code i got this error..

ns: _o50 findBestCluster: invalid command name "6"
while executing
"$l"
("foreach" body line 11)
invoked from within
"foreach element $clusterChoices_ {

set chID [lindex $element 0]
set clustID [lindex $element 2]
set ind [lsearch $clusterChoices_ $..."
invoked from within
"if [$self isClusterHead?] {
# If node is CH, determine code and create a TDMA schedule.
set dist_ $opt(max_dist)
set currentCH_ $nodeID
..."
(procedure "_o50" line 11)
(Application/LEACH findBestCluster line 11)
invoked from within
"_o50 findBestCluster"

and my modified code is

foreach element $clusterChoices_ {

set chID [lindex $element 0]
set clustID [lindex $element 2]
set ind [lsearch $clusterChoices_ $element]
puts "cluster choices are $clusterChoices_ "
set l [lindex $clusterChoices_ 0]
puts "l=$l"
set d [lindex $clusterDist_ $ind]
puts "distance of $element in $clusterDist_ is = $d and min dist = $min_dist"
set bdist_ [nodeToBSDist [$l] $bs]
puts "dist to BS is $bdist_"

It prints upto distance of element in $clusterDist_..and after that it gives this error..can u tell me what is wrong in last two lines.i want dist between CH and BS..please help..

Last edited by deepa_2111; 02-03-2014 at 08:45 AM.
 
1 members found this post helpful.
Old 02-03-2014, 11:13 AM   #713
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
@deepa

@Aska123
I got the following error while using make clean command after ./configure command for leach

saurabh@saurabh-Satellite-C850:~/ns-allinone-2.34/ns-2.34$ make clean
Makefile.in is newer than Makefile.
You need to re-run configure.
false
make: *** [Makefile] Error 1
 
Old 02-03-2014, 11:17 AM   #714
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
@deepa @aska123

also at the last of ./configure command I got


checking for tclcl.h... no
checking for libtclcl... no
checking for tcl2c++... no
configure: error: tclcl is required but could not be completely found.
Please correct the problem by telling configure where tclcl is
using the argument --with-tclcl=/path/to/package,
or the package is not required, disable it with --with-tclcl=no.
 
Old 02-04-2014, 12:25 AM   #715
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@ deepa
hi deepa..i changed "l" by "element" but still error remains same..i.e.
ns: _o26 findBestCluster: invalid command name "8"
while executing
"$element"
("foreach" body line 10)
invoked from within
"foreach element $clusterChoices_ {

set chID [lindex $element 0]
set clustID [lindex $element 2]
set ind [lsearch $clusterChoices_ $..."
invoked from within
"if [$self isClusterHead?] {
# If node is CH, determine code and create a TDMA schedule.
set dist_ $opt(max_dist)
set currentCH_ $nodeID
..."
(procedure "_o26" line 11)
(Application/LEACH findBestCluster line 11)
invoked from within
"_o26 findBestCluster"
num_nodes is set 11
mac/channel.cc: sendUp - Calc highestAntennaZ_ and distCST_
mac/channel.cc: highestAntennaZ_ = 1.5, distCST_ = 197.1

i think it is not getting CH node in clusterchoices coz it is showing error as "invalid command name "8""..here 8 is CH..but may be it is CH_ID..i want CH node..how can i get node?? please help..
 
Old 02-04-2014, 08:38 AM   #716
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
@Deepa
@Asma123


Can you please provide me the solution of two of my problems.......................
 
Old 02-04-2014, 11:30 PM   #717
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Try using "nodeID" instead of "l"

Quote:
Originally Posted by keepwalking123 View Post
@ deepa
hi deepa..i changed "l" by "element" but still error remains same..i.e.
ns: _o26 findBestCluster: invalid command name "8"
while executing
"$element"
("foreach" body line 10)
invoked from within
"foreach element $clusterChoices_ {

set chID [lindex $element 0]
set clustID [lindex $element 2]
set ind [lsearch $clusterChoices_ $..."
invoked from within
"if [$self isClusterHead?] {
# If node is CH, determine code and create a TDMA schedule.
set dist_ $opt(max_dist)
set currentCH_ $nodeID
..."
(procedure "_o26" line 11)
(Application/LEACH findBestCluster line 11)
invoked from within
"_o26 findBestCluster"
num_nodes is set 11
mac/channel.cc: sendUp - Calc highestAntennaZ_ and distCST_
mac/channel.cc: highestAntennaZ_ = 1.5, distCST_ = 197.1

i think it is not getting CH node in clusterchoices coz it is showing error as "invalid command name "8""..here 8 is CH..but may be it is CH_ID..i want CH node..how can i get node?? please help..
 
Old 02-05-2014, 06:07 AM   #718
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Sorry .. I cannot help with this.
I can help with LEACH but not with ns2 installation on Linux ... My guess is maybe your ns2 installation package is not complete, or it cannot be installed on the OS you are using.

Google your error and see. You might find the solution online.
Also, try doing the hints that have been provided along with your error message .. Maybe that will help ?
Try downloading a different installation package.

Quote:
Originally Posted by mittal_saurabhin View Post
@Deepa
@Asma123


Can you please provide me the solution of two of my problems.......................

Last edited by deepa_2111; 02-05-2014 at 06:10 AM.
 
Old 02-05-2014, 07:08 AM   #719
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,383

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
#714, #716 .

Which version of Ubuntu are you using ? Like "Ubuntu 12.04 - i686"
http://www.linuxquestions.org/linux/...Ask_a_Question
http://linuxsilo.net/docs/smart-questions_en.html

The latest "leach" patch is `exidus-pegasis-leach-ns234-patch.2.tar.gz'
https://docs.google.com/file/d/0B7S2...it?usp=sharing
... and it "never" fails.

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

Actually your issues / questions have been answered multiple times at LQ.
Please read http://www.linuxquestions.org/questions/tags/pegasis/
And http://www.linuxquestions.org/questions/tags/leach/

-
 
Old 02-05-2014, 10:57 AM   #720
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
gcc --version
gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

saurabh@saurabh-Satellite-C850:~/ns-allinone-2.34/ns-2.34$ g++ --version
g++ (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


I got upside versions of gcc and g++ installed in my Pc with ubuntu 13.10

Can anybody tell how to modify them to gcc4.3 and g++4.3 for making leach work for my ns2.34
 
  


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

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

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