LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-27-2015, 08:49 PM   #886
tuongpx
LQ Newbie
 
Registered: Feb 2015
Posts: 8

Rep: Reputation: Disabled

Hi all,
I have a issues when run the "./test" command. It's show error "bash: ./test: Permission denied
".
Please help me.
Thanks
 
Old 02-28-2015, 11:21 AM   #887
Rizwanamalek
Member
 
Registered: Jan 2015
Posts: 56

Rep: Reputation: Disabled
Code:
[root@localhost ex]# ns wireless-demo-csci694.tcl 
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_ = 89.8
SORTING LISTS ...DONE!
NS EXITING...
[root@localhost ex]#
What you mean by starting command in test and leach_test ?

Last edited by Rizwanamalek; 02-28-2015 at 11:24 AM.
 
Old 02-28-2015, 08:17 PM   #888
tuongpx
LQ Newbie
 
Registered: Feb 2015
Posts: 8

Rep: Reputation: Disabled
Quote:
tuongpx@ubuntu:~/ns-allinone-2.34/ns-2.34/tcl/ex$ ns wireless.tcl
couldn't read file "tcl/lib/ns-mobilenode.tcl": no such file or directory
while executing
"source.orig tcl/lib/ns-mobilenode.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/lib/ns-mobilenode.tcl"
(file "wireless.tcl" line 184)
Hi I have fixed that issue, but then i got problem with "ns wireless.tcl" command. Please help me.
 
Old 03-01-2015, 02:48 AM   #889
emprit
Member
 
Registered: Feb 2015
Location: jl. bogor 1 no 91, malang, jawa timur, indonesia
Distribution: any linux
Posts: 81

Rep: Reputation: Disabled
Code:
tuongpx@ubuntu:~/ns-allinone-2.34/ns-2.34/tcl/ex$ ns wireless.tcl
couldn't read file "tcl/lib/ns-mobilenode.tcl": no such file or directory
while executing
"source.orig tcl/lib/ns-mobilenode.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/lib/ns-mobilenode.tcl"
(file "wireless.tcl" line 184)
dont use ns wireless.tcl
but use ./test
why ? because ./test will start scrip leach_test
on leach_test include
Code:
#This is the algorithm that we are going to run. Type leach, leach-c, stat-clus or pegasis
alg=leach-c
#dirname, filename =  
#   The directory and filename that we want our output to be written.
dirname="mit/leach_sims"
filename=$alg
and
Code:
ns tcl/ex/wireless.tcl  \
-sc mit/uAMPS/sims/nodescen.tcl \
-rp $alg \
-x $x \
-y $y \
-nn $nn \
-stop $stop \
-eq_energy $eq_energy \
-init_energy $init_energy \
-filename $filename \
-dirname $dirname \
-topo $topology_file \
-num_clusters $num_clusters \
-bs_x $bs_x \
-bs_y $bs_y 2>$dirname/$filename.err 1>$dirname/$filename.out &
u see $filename=$alg , so if u start wireless.tcl alone this mean $filename is empty

so almost at all value in wireless.tcl include from leach_test in ./test

Last edited by emprit; 03-01-2015 at 02:52 AM.
 
Old 03-07-2015, 04:55 AM   #890
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Again facing Resource/Energy problem

Quote:
Originally Posted by knudfl View Post
Welcome to LQ.

Add 'hardy' to /etc/apt/sources.list : g++-3.3....gcc-4.2((g++-4.2)) will be available.
sudo gedit /etc/apt/sources.list ; sudo apt-get update
Code:
deb http://76.73.4.58/ubuntu/ hardy-updates main
deb http://76.73.4.58/ubuntu/ hardy universe
deb http://security.ubuntu.com/ubuntu hardy-security main
deb http://security.ubuntu.com/ubuntu hardy-security universe
A missing "Resource/Energy" : It was not compiled into ns.
All new objects must be added to 'Makefile' ( Makefile.in ).
Patch ns234-leach.tar.bz2 https://docs.google.com/uc?id=0B7S25...CJzYt5QP&hl=en
May be compare the Makefile with the original ns-2.27 LEACH Makefile :
https://docs.google.com/uc?id=0B7S25...CNPCuaYP&hl=en

EDIT : See post # 22

..
Hello friends
I am facing Resource/Energy problem when I tried to run ./leach_test in ns-2.34.
I have tried to install
deb http://76.73.4.58/ubuntu/ hardy-updates main
deb http://76.73.4.58/ubuntu/ hardy universe
deb http://security.ubuntu.com/ubuntu hardy-security main
deb http://security.ubuntu.com/ubuntu hardy-security universe

but error 404 no page found.

Some one please help me to install leach on ns-2.34 with ubuntu 10.04

Thanks
 
Old 03-07-2015, 05:28 AM   #891
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Some one please help to install Leach package in ns-2.34 on ubuntu 10.04.

I am getting resource/energy error in leach.err file.
my compiler is 4.4.3

Thanks

Last edited by Aska123; 03-07-2015 at 06:42 AM.
 
Old 03-07-2015, 06:40 AM   #892
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
how to add hardy Heron to ubuntu 10.04?

Quote:
Originally Posted by knudfl View Post
# 182.

The 64bits g++-4.1 compiler from Ubuntu Hardy can be installed:

Synaptic : Settings > Archives > Other Software, and then tick
these entries : "Hardy Heron", + the two "Important security updates"
below the 'Hardy Heron' line.
Next : sudo apt-get update && sudo apt-get install g++-4.1

Note : You will get a reduced result with any ns2, on any 64bits OS :
Some more tests will fail, when you do './validation



#184

? Are you talking about the edited cmu-trace.h in post #9 here ?
http://www.linuxquestions.org/questi...ra13-907076/#9

..
I have tried to add hardy Heron to ubuntu 10.04.I tried with synaptic manager. But it is asking for http:// address. Please help.

Thanks
 
Old 03-07-2015, 06:44 AM   #893
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Hardy problem

Quote:
Originally Posted by knudfl View Post
# 173.

Which link ? Suggest : use g++-4.2

Add Hardy in Synaptic :
Settings > Repositories > Other Software
... Tick the 3 Hardy entries, and then "Reload".

Then you can install 'g++-4.2' with Synaptic.

.
I tried this method but error
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the list directory

Please help
Thanks
 
Old 03-07-2015, 07:03 AM   #894
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
Ref. posts #890 ... #893.
Quote:
resource/energy error in leach.err file
You are using the wrong executable 'ns'.
$ cd ns-2.34/ && sudo make install
And delete any 'ns' PATH settings you may have in .bashrc.

You could also have a failed build.
If you are using old code, like post #5.
The updated code is leach+pegasis-ns234-files-2.tar.gz

gcc-4.4.x should be OK.
( Instructions from 2011 - 2013 are not valid any more.
Better read new posts http://www.linuxquestions.org/questions/tags/pegasis/ )
cd ns-allinone-2.34/
patch -p0 otcl_ns234_gcc-4.4.patch
tar xvf leach+pegasis-ns234-files-2.tar.gz
./install

-
 
1 members found this post helpful.
Old 03-07-2015, 07:09 AM   #895
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Thanks a lot Kundafi.

I was eagerly waiting for your reply.

I am facing problems in downloading Hardy heron to ubuntu 10.04.

I have tried synaptic manager. but error 404, not found appears.
 
Old 03-07-2015, 07:14 AM   #896
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Ref. posts #890 ... #893.

You are using the wrong executable 'ns'.
$ cd ns-2.34/ && sudo make install
And delete any 'ns' PATH settings you may have in .bashrc.

You could also have a failed build.
If you are using old code, like post #5.
The updated code is leach+pegasis-ns234-files-2.tar.gz

gcc-4.4.x should be OK.
( Instructions from 2011 - 2013 are not valid any more.
Better read new posts http://www.linuxquestions.org/questions/tags/pegasis/ )
cd ns-allinone-2.34/
patch -p0 otcl_ns234_gcc-4.4.patch
tar xvf leach+pegasis-ns234-files-2.tar.gz
./install

-
after sudo make install in ns-2.34 I got this
for d in /usr/local/man/man1; do \
if [ ! -d $d ]; then \
mkdir -p $d ;\
fi;\
done
/usr/bin/install -c -m 755 ns /usr/local/bin
/usr/bin/install -c -m 644 ns.1 /usr/local/man/man1
rohini@ubuntu:~/opt/ns-allinone-2.34/ns-
 
Old 03-07-2015, 07:25 AM   #897
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
<<< ref. post #896.

Please do not quote entire posts. A "one word reference" will do.

? Why show the usual / normal / OK output from 'make install' ?

<<< #895 : No Hardy packages are required.
Please stop using outdated information.
Instructions were valid the day the were written.
OSs are updated, old links disappear : New instructions must be used.


-
 
Old 03-07-2015, 09:56 AM   #898
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Ref. posts #890 ... #893.

You are using the wrong executable 'ns'.
$
And delete any 'ns' PATH settings you may have in .bashrc.

-
After deleting ns path from .bashrc, my leach set up is running successfully. I have results in leach.out

Thanks a lot again.

Thanks
 
Old 03-11-2015, 10:56 PM   #899
tuongpx
LQ Newbie
 
Registered: Feb 2015
Posts: 8

Rep: Reputation: Disabled
Quote:
Originally Posted by emprit View Post
Code:
tuongpx@ubuntu:~/ns-allinone-2.34/ns-2.34/tcl/ex$ ns wireless.tcl
couldn't read file "tcl/lib/ns-mobilenode.tcl": no such file or directory
while executing
"source.orig tcl/lib/ns-mobilenode.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/lib/ns-mobilenode.tcl"
(file "wireless.tcl" line 184)
dont use ns wireless.tcl
but use ./test
why ? because ./test will start scrip leach_test
on leach_test include
Code:
#This is the algorithm that we are going to run. Type leach, leach-c, stat-clus or pegasis
alg=leach-c
#dirname, filename =  
#   The directory and filename that we want our output to be written.
dirname="mit/leach_sims"
filename=$alg
and
Code:
ns tcl/ex/wireless.tcl  \
-sc mit/uAMPS/sims/nodescen.tcl \
-rp $alg \
-x $x \
-y $y \
-nn $nn \
-stop $stop \
-eq_energy $eq_energy \
-init_energy $init_energy \
-filename $filename \
-dirname $dirname \
-topo $topology_file \
-num_clusters $num_clusters \
-bs_x $bs_x \
-bs_y $bs_y 2>$dirname/$filename.err 1>$dirname/$filename.out &
u see $filename=$alg , so if u start wireless.tcl alone this mean $filename is empty

so almost at all value in wireless.tcl include from leach_test in ./test
Hi emprit,
I had implemented with your command but I has another issue. Please help me.

Quote:
tuongpx@ubuntu:~/ns-allinone-2.34/ns-2.34/tcl/ex$ ns tcl\ex\wireless.tcl \
> -sc mit/uAMPS/sims/nodescen.tcl \
> -rp $alg \
> -x $x \
> -y $y \
> -nn $nn \
> -stop $stop \
> -eq energy $eq_energy \
> -init _energy $init_energy \
> -filename $filename \
> -dirname $dirname \
> -topo $topology_file \
> -num_clusters $num_clusters \
> -bs_x $bs_x \
> -bs_y $bs_y 2>$dirname/$filename.err 1>$dirname/filename.out &
[1] 2345
tuongpx@ubuntu:~/ns-allinone-2.34/ns-2.34/tcl/ex$ bash: /.err: Permission denied

[1]+ Exit 1 ns tcl\ex\wireless.tcl -sc mit/uAMPS/sims/nodescen.tcl -rp $alg -x $x -y $y -nn $nn -stop $stop -eq energy $eq_energy -init _energy $init_energy -filename $filename -dirname $dirname -topo $topology_file -num_clusters $num_clusters -bs_x $bs_x -bs_y $bs_y 2> $dirname/$filename.err > $dirname/filename.out
tuongpx@ubuntu:~/ns-allinone-2.34/ns-2.34/tcl/ex$
 
Old 03-11-2015, 11:18 PM   #900
tuongpx
LQ Newbie
 
Registered: Feb 2015
Posts: 8

Rep: Reputation: Disabled
Quote:
Originally Posted by Rizwanamalek View Post
Code:
[root@localhost ex]# ns wireless-demo-csci694.tcl 
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_ = 89.8
SORTING LISTS ...DONE!
NS EXITING...
[root@localhost ex]#
What you mean by starting command in test and leach_test ?
Hi Rizwanamalek,

I had try with "ns wireless-demo-csci694.tcl" and the result similar to your result. But when I try with the bellow command, it show "Permission denied". Can you help me !
Quote:

tuongpx@ubuntu:~/ns-allinone-2.34/ns-2.34$ ./test
bash: ./test: Permission denied
 
  


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 07:16 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