Hi all,
I did check for the conditions.txt file and created a dummy one [I
think it should work even if the file is not present, because it is
opened in write mode and not in read mode, so it should be created
ideally], and this error did go away, but I'm getting a different
error that says:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$ ns tcl/ex/wireless.tcl -sc mit/uAMPS/sims/100nodescen -rp leach -x
1000 -y 1000 -nn 101 -stop 100 -eq_energy 1 -init_energy 2 -filename
leach_file -dirname leach_dir -num_clusters 5 -bs_x 0 -bs_y 0
can't read "env(RCA_LIBRARY)": no such variable
while executing
"source $env(RCA_LIBRARY)/ns-ranode.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 9)
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)
[EMAIL PROTECTED] ~/ns-allinone-2.27/ns-2.27
$ echo $RCA_LIBRARY
/home/abc/ns-allinone-2.27/ns-2.27/mit/rca
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
As can be seen, the env variable RCA_LIBRARY is set. So i'm not sure
why I get this error. What can I do now? I'm sure I'll get a different
error once I get rid of this one too...so something must be
fundamentally wrong with my setup.But the installation was without
errors and the 'test' file for LEACH too went through successfully
[atleast, no errors]. So I do not know how to check if everything's
all right and if not what i'm doing wrong or how to debug it further.
Can anyone please help me?
Sincerely.
On Nov 17, 2007 2:47 PM, Fred Twistleton <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to run LEACH on NS2. I've installed NS2.27 and the mit
> package over it [on windows, using cygwin]. The installation is all
> fine, but when i run the test scripts so as to run/test LEACH, all of
> them fail. For instance, when i run:
>
> ./ns tcl/ex/wireless.tcl -sc mit/uAMPS/sims/100nodescen -rp leach -x
> 1000 -y 1000 -nn 101 -stop 100 -eq_energy 1 -init_energy 2 -filename
> leach_file -dirname leach_dir -num_clusters 5 -bs_x 0 -bs_y 0
>
>
> This gives me the following errors:
>
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> couldn't open "leach_dir/conditions.txt": no such file or directory
> while executing
> "open "$opt(dirname)/conditions.txt" w"
> invoked from within
> "set outf [open "$opt(dirname)/conditions.txt" w]"
> (file "tcl/mobility/leach.tcl" line 14)
> 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)
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Can anyone please help me out on this? What am I doing wrong?
>
> Thanks so much!!
>
> Regards.
>