LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   leach in NS-2.27 (http://www.linuxquestions.org/questions/fedora-35/leach-in-ns-2-27-a-930803/)

kinjal_patel 02-23-2012 12:39 AM

leach in NS-2.27
 
I have installed NS-2.27 successfully. Then installed LEACH. When I execute ./test I got following error in leach.err

couldn't read file "mit/rca/resources/ns-resources-manager.tcl " : no such file or directory

corp769 02-23-2012 12:43 AM

Look in the parent directory where you ran ./test from, and try to find the location that it is giving you. If the file is not really present, then you may need to either redownload that package, and/or get online and find the resources need.

kinjal_patel 02-23-2012 02:40 AM

reply to this
 
Quote:

Originally Posted by corp769 (Post 4609816)
Look in the parent directory where you ran ./test from, and try to find the location that it is giving you. If the file is not really present, then you may need to either redownload that package, and/or get online and find the resources need.

this file is already present in that folder than also it gives this error

corp769 02-23-2012 02:45 AM

Could you verify that you have the permissions to read that file?

knudfl 02-23-2012 02:52 AM

Welcome to LQ.

The file "test" has a typo, please see post #6 here
( The ns-2.27 LEACH thread )
http://www.linuxquestions.org/questi...27-a-785379/#6


Other useful info ( ns-2.34 LEACH )
http://www.linuxquestions.org/questi...2-34-a-870368/

And : LQ Search, keyword = leach
LQ Search, Tag = leach

.

kinjal_patel 02-23-2012 02:53 AM

In reference to previous question I got Error during testing of leach protocol in NS-2.27 in leach.err even though that file is present in that folder

error
couldn't read file "mit/rca/resources/ns-resources-manager.tcl " : no such file or directory

kinjal_patel 02-23-2012 02:56 AM

Quote:

Originally Posted by knudfl (Post 4609883)
Welcome to LQ.

The file "test" has a typo, please see post #6 here
( The ns-2.27 LEACH thread )
http://www.linuxquestions.org/questi...27-a-785379/#6


Other useful info ( ns-2.34 LEACH )
http://www.linuxquestions.org/questi...2-34-a-870368/

And : LQ Search, keyword = leach
LQ Search, Tag = leach

.


yes I have done test as given below as shown in post #6 but still error is there

kinjal_patel 02-23-2012 03:03 AM

#!/bin/bash
cd tcl/ex
ns wireless-demo-csci694.tcl
sleep 2

cd ../../
./leach_test


I have done this in test file but can not solve the problem i get error like this



couldn't read file "mit/rca/resources/ns-resource-manager.tcl*": no such file or directory
while executing
"source.orig mit/rca/resources/ns-resource-manager.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/rca/resources/ns-resource-manager.tcl*"
(file "mit/uAMPS/sims/uamps.tcl" line 22)
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)

kinjal_patel 02-23-2012 03:06 AM

Quote:

Originally Posted by knudfl (Post 4609883)
Welcome to LQ.

The file "test" has a typo, please see post #6 here
( The ns-2.27 LEACH thread )
http://www.linuxquestions.org/questi...27-a-785379/#6


Other useful info ( ns-2.34 LEACH )
http://www.linuxquestions.org/questi...2-34-a-870368/

And : LQ Search, keyword = leach
LQ Search, Tag = leach

.


#!/bin/bash
cd tcl/ex
ns wireless-demo-csci694.tcl
sleep 2

cd ../../
./leach_test


I have done this in test file but can not solve the problem i get error like this



couldn't read file "mit/rca/resources/ns-resource-manager.tcl*": no such file or directory
while executing
"source.orig mit/rca/resources/ns-resource-manager.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/rca/resources/ns-resource-manager.tcl*"
(file "mit/uAMPS/sims/uamps.tcl" line 22)
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)

knudfl 02-23-2012 03:26 AM

Please edit posts #8 and #9 to use CODE tags :
Write [/code] at code text end, and [code] at text start.
Or use the # button in the 'Advanced Editor'.
http://www.linuxquestions.org/questi....php?do=bbcode


Quote:

"mit/rca/resources/ns-resource-manager.tcl*": no such file or directory
? Did you check if the file is present ? ?
> ns-allinone-2.27/ns-2.27/mit/rca/resources/ns-resource-manager.tcl

kinjal_patel 02-23-2012 06:08 AM

when I run ./test for leach testing I get following error in leach.err file


couldn't read file "/mit/rca/ns-ranode.tcl": no such file or ..
while executing
"source.orig /mit/rca/ns-ranode.tcl"

meeraj 09-13-2012 11:26 AM

leach problem
 
Hi all,
Please help me,urgent !
When i've installed LEACH (mit.tar.gz) with ns-2.27,and i type ./test to test
LEACH protocol but it show error:



"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 "mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig mit/rca/resources/ns-energy-resource.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 $env(RCA_LIBRARY)/resources/ns-energy-resource.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)"

knudfl 09-13-2012 01:51 PM

Post # 12, @meeraj : Welcome to LQ.

Looks like your build went wrong.
mit.tar.gz alone makes no "LEACH". A new Makefile.in is required.
Please download it here, post #4
http://www.linuxquestions.org/questi...each-862835/#4

And : cp Makefile.in ns-allinone-2.27/ns-2.27/
cd ns-allinone-2.27/ns-2.27/
cp ns ns-orig
make clean
./configure
make : And you get a new "ns -leach".

Good luck !

.


All times are GMT -5. The time now is 08:14 PM.