LinuxQuestions.org
Visit the LQ Articles and Editorials section
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-24-2014, 12:27 AM   #1
daidrohit
LQ Newbie
 
Registered: Jan 2014
Posts: 18

Rep: Reputation: Disabled
ns2


m new to ns2
m working with LEACH protocol and m finding errors while executing leach_test file





couldn't read file "tcl/mobility/leach-c.tcl": no such file or directory
while executing
"source.orig tcl/mobility/leach-c.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 186)



can anyone help me please........
plz reply if anyone find any solution to thi error
 
Old 01-24-2014, 03:25 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,982

Rep: Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610
How to use the "leach_test" file, example :

1) $ cd ns-allinone-2.xx/ns-2.xx/

2) $ 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

** The files `test' and `leach_test' are text files. Please read them.
*** "test" is a 5 line script, that will run the "leach_test".

Leach info http://www.linuxquestions.org/questions/tags/leach/
And http://www.linuxquestions.org/questions/tags/pegasis/

-
 
Old 01-24-2014, 04:54 AM   #3
daidrohit
LQ Newbie
 
Registered: Jan 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
ns2

thanks sir for ur reply...very much but again the same error is coming....
is there any other alternative....
 
Old 01-24-2014, 06:44 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,982

Rep: Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610
# 3 .
Quote:
but again the same error is coming
Which command are you using ? ?
 
Old 01-27-2014, 12:14 AM   #5
daidrohit
LQ Newbie
 
Registered: Jan 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
ns2

i am using command ./leach_test
 
Old 01-27-2014, 07:34 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,982

Rep: Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610
# 5 .

.. Then instead please use the command suggested in post #2 :
$ 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

If you want to run least_test as a standalone command,
you will need a very complex setup, for all the connected files to be found.

? And why run leach_test alone, when `test' can run leach_test so clever ? ?

-
 
Old 01-30-2014, 11:18 PM   #7
daidrohit
LQ Newbie
 
Registered: Jan 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
ns2

thanks very much for the reply......... its somewhat working
but when after runnig test file on teminal i got half of the output file and i dont get anytype of data in leach.energy, leach.data, leach.ch..
these files are totally blank....


i got error in LEACH.err file and error is INITIALIZE THE LIST xListHead



please help .........waiting for your reply.............
 
Old 02-02-2014, 02:06 AM   #8
daidrohit
LQ Newbie
 
Registered: Jan 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
ns2

plz plz reply for the above post
 
Old 02-03-2014, 11:18 PM   #9
daidrohit
LQ Newbie
 
Registered: Jan 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
ns2

I got error in LEACH.err file and error is
INITIALIZE THE LIST xListHead

what does it mean can anyone tell me please?????????????????
 
Old 02-04-2014, 03:16 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,982

Rep: Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610
# 7 :
Then please read the leach posts http://www.linuxquestions.org/questions/tags/leach/

# 9 : Doesn't look like an error.
Most simulations will start with "INITIALIZE THE LIST xListHead"


How to avoid errors : Use the proof patch = exidus-pegasis-leach-ns234.patch.2.tar.gz
All leach-pegasis http://www.linuxquestions.org/questions/tags/pegasis/
Install example, post #24 here
http://www.linuxquestions.org/questi...656/page2.html

-
 
Old 02-05-2014, 04:38 AM   #11
daidrohit
LQ Newbie
 
Registered: Jan 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
ns2

thak u very much sir for ur reply...........


but sir i got half of the output in leach.err and i am not getting any thing in leach.energy,leach.alive and leach.data...file
they all are empty....



plz plz plz reply soon...m waiting for ur reply
 
Old 02-05-2014, 07:12 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,982

Rep: Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610
# 11 .

Well, then start from scratch, and use `exidus-pegasis-leach-ns234-patch.2.tar.gz'
https://docs.google.com/file/d/0B7S2...it?usp=sharing

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

-
 
Old 02-05-2014, 11:40 PM   #13
daidrohit
LQ Newbie
 
Registered: Jan 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
ns2

sir m using ns-2.27
is the procesure is same for ns-2.27
????
 
Old 02-06-2014, 03:31 AM   #14
daidrohit
LQ Newbie
 
Registered: Jan 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
ns2

sir i am getting error in terminal in test file: ns command not found

in 3 line of test file

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

cd ../../
./leach_test


plz help...
 
Old 02-06-2014, 07:28 AM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,982

Rep: Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610
# 13 .
You can have as many versions of ns-allinone-2.xx as you want,
installed at the same time. But do not add any *PATH test to .bashrc.


# 14 .
Quote:
ns command not found
? Did you forget to do $ cd ns-2.34/ && sudo make install
... And please check that ns is present as /usr/local/bin/ns
... also : delete any ns2 *PATH text added to .bashrc . Never required !

-
 
  


Reply


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
Differences between LEACH results on ns2.1b5 and ns2.35 deepa_2111 Linux - Software 15 05-16-2013 05:53 PM
NS2: Require eap-sim authentication code for simulation in ns2.24 noamankhatib Linux - Software 0 04-29-2013 12:03 PM
Make command not found in ns2.34 and ns2.29 Aska123 Linux - Software 11 04-09-2013 11:58 AM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM


All times are GMT -5. The time now is 12:42 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration