LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-02-2014, 11:14 PM   #796
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled

@mittal

there will no error on terminal

If there is any error , it will be on leach.err file which is located in leach_sims folder.
 
Old 03-03-2014, 10:25 AM   #797
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Aah.. Ok !
Then, there is no real use of the "mit" folder in ns-2.34 if the MayTamer package is being used.

Quote:
Originally Posted by knudfl View Post
# 788 .

This structure origins from the "@MayTamer leach package" :
Unpacks to a directory by name "ns-234-leach".

"The other copy" of the MayTamer files, `leach-ns234-patching.tar.gz',
https://drive.google.com/file/d/0B7S...it?usp=sharing
... unpacks to "ns-2.34/" , which is much more convenient :
$ cd ns-allinone-2.34/ && tar xvf leach-ns234-patching.tar.gz
... and all the added files will have the right locations.

-
 
Old 03-03-2014, 10:28 AM   #798
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Please refer the blog link I pasted a few posts ago, v.i.z., http://ns2.blogspot.com/.
It talks about the same issue you face.

Quote:
Originally Posted by Aska123 View Post
Hello every one
when I run mte algo.
mte.out always has data =0 why?

why it is not showing transfer of data from nodes to Base station?

@Deepa please reply
 
1 members found this post helpful.
Old 03-03-2014, 11:04 PM   #799
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Thanks deepa

Blog refered by you has
Code:
The mte (dsdv or dsr) code won't run, because it's dependent on the variable $bs.
 however, $bs is only set in /mit/uAMPS/sim/uamps.tcl, which is sourced in leach.tcl. 
When leach.tcl is not being used, uamps.tcl is never run.

its solution
The MTE does run now, for whatever reason, but dsdv and dsr doesn't. mte does source uamps.tcl, but the other two don't

mte.tcl file include uAMPS.tcl file . But data is still 0

Also ns-2.35 package which you have uploaded also has data=0 for mte.

I did not get idea from this solution.

Please explain

Last edited by Aska123; 03-03-2014 at 11:12 PM.
 
Old 03-04-2014, 12:36 AM   #800
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Hello everyone

There is a file wireless.tcl in tcl/ex

There is a proc
Code:
proc getopt {argc argv} {
	global opt
	lappend optlist cp nn seed sc stop tr x y

	for {set i 0} {$i < $argc} {incr i} {
		set arg [lindex $argv $i]
		if {[string range $arg 0 0] != "-"} continue

		set name [string range $arg 1 end]
		set opt($name) [lindex $argv [expr $i+1]]
	}
}
what is the meaning of this procedure?
 
Old 03-04-2014, 01:32 AM   #801
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
In the wireless.tcl file we have
set opt(sc) "scen-670x670-50-600-20-2" ;# scenario file

but in ./leach_test file we have 100nodes.txt.

sc file has number of nodes 50 while 100nodes.txt file has number of nodes 100.

In leach.out there are 100 nodes with x,y coordinated as defined in 100nodes.txt

Then what is the purpose of taking "scen-670x670-50-600-20-2" ;# scenario file ?

Please reply
 
Old 03-04-2014, 08:57 AM   #802
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
You should not use the wireless.tcl file in the ex folder.
You have to replace that wireless.tcl file with LEACH's wireless.tcl file.

Quote:
Originally Posted by Aska123 View Post
In the wireless.tcl file we have
set opt(sc) "scen-670x670-50-600-20-2" ;# scenario file

but in ./leach_test file we have 100nodes.txt.

sc file has number of nodes 50 while 100nodes.txt file has number of nodes 100.

In leach.out there are 100 nodes with x,y coordinated as defined in 100nodes.txt

Then what is the purpose of taking "scen-670x670-50-600-20-2" ;# scenario file ?

Please reply

Last edited by deepa_2111; 03-07-2014 at 10:06 AM.
 
2 members found this post helpful.
Old 03-04-2014, 11:39 PM   #803
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Quote:
Originally Posted by deepa_2111 View Post
You should not use the wireless.tcl file in the ex folder.
You have to rename replace that wireless.tcl file with LEACH's wireless.tcl file.
please tell me how to do this?
in file leach_test
we have
ns tcl/ex/wireless.tcl \
-sc mit/uAMPS/sims/nodescen \

you are talking about which file?
leach_test file call wireless.tcl which have rp as dsdv but in leach_test we are using leach protocol.

actually which protocol is running?

Last edited by Aska123; 03-05-2014 at 12:04 AM.
 
Old 03-05-2014, 06:20 AM   #804
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
It you see leach_test, you have
Code:
ns tcl/ex/wireless.tcl  \
-sc mit/uAMPS/sims/nodescen \
-rp $alg \
and in wireless.tcl you have

Code:
#
#  Create the specified number of nodes $opt(nn) and "attach" them
#  the channel.
#  Each routing protocol script is expected to have defined a proc
#  create-mobile-node that builds a mobile node and inserts it into the
#  array global $node_($i)
#

if { [string compare $opt(rp) "dsr"] == 0} { 
	for {set i 0} {$i < $opt(nn) } {incr i} {
		dsr-create-mobile-node $i
	}
} elseif { [string compare $opt(rp) "dsdv"] == 0} { 
	for {set i 0} {$i < $opt(nn) } {incr i} {
		dsdv-create-mobile-node $i
	}
} elseif { [string compare $opt(rp) "leach"] == 0} { 
	for {set i 0} {$i < $opt(nn) } {incr i} {
		leach-create-mobile-node $i
	}
} elseif { [string compare $opt(rp) "leach-c"] == 0} { 
	for {set i 0} {$i < $opt(nn) } {incr i} {
		leach-create-mobile-node $i
	}
} elseif { [string compare $opt(rp) "stat-clus"] == 0} { 
	for {set i 0} {$i < $opt(nn) } {incr i} {
		leach-create-mobile-node $i
	}
} elseif { [string compare $opt(rp) "mte"] == 0} { 
	for {set i 0} {$i < $opt(nn) } {incr i} {
		leach-create-mobile-node $i
	}
}
Hence, the wireless.tcl takes the leach protocol and not the dsdv.

Quote:
Originally Posted by Aska123 View Post
please tell me how to do this?
in file leach_test
we have
ns tcl/ex/wireless.tcl \
-sc mit/uAMPS/sims/nodescen \

you are talking about which file?
leach_test file call wireless.tcl which have rp as dsdv but in leach_test we are using leach protocol.

actually which protocol is running?
 
1 members found this post helpful.
Old 03-05-2014, 06:25 AM   #805
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
Thanks deepa

is there any way that I can use AODV protocol with in cluster and DSDV between clusters

Also what is ADV_SCH
set ADV_SCH 2

in file ns-leach.tcl file

Last edited by Aska123; 03-05-2014 at 06:39 AM.
 
Old 03-05-2014, 10:34 AM   #806
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
saurabh@saurabh-Satellite-C850:~/ns-allinone-2.34/ns-2.34$ make
g++-4.3 -c -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -DMIT_uAMPS -I. -I. -I/home/saurabh/ns-allinone-2.34/tclcl-1.19 -I/home/saurabh/ns-allinone-2.34/otcl-1.13 -I/home/saurabh/ns-allinone-2.34/include -I/home/saurabh/ns-allinone-2.34/include -I/home/saurabh/ns-allinone-2.34/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -I./mit/rca -I./mit/uAMPS -o tools/random.o tools/random.cc
make: g++-4.3: Command not found
make: *** [tools/random.o] Error 127


When m doing make then got this error in the last....
also after this when tried to install g++-4.3 then got the below given error

sudo apt-get install g++ g++-3.4
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'clang-3.4-doc' for regex 'g++-3.4'
Note, selecting 'clang-3.4' for regex 'g++-3.4'
Note, selecting 'libclang-3.4-dev' for regex 'g++-3.4'
g++ is already the newest version.
clang-3.4 is already the newest version.
clang-3.4-doc is already the newest version.
libclang-3.4-dev is already the newest version.
The following packages were automatically installed and are no longer required:
linux-headers-3.11.0-14 linux-headers-3.11.0-14-generic
linux-image-3.11.0-14-generic linux-image-extra-3.11.0-14-generic
openjdk-7-jre-lib
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Quote:
Originally Posted by deepa_2111 View Post
@ Vaan (#54),

This is fine. It indicates that your code was 'made'. You can now run your simulation.

If you want to me doubly sure your code has compiled, do a 'make clean' and then a 'make'
 
Old 03-05-2014, 10:40 AM   #807
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
Quote:
Originally Posted by helyos View Post
@deepa_2111 : Yes, they are the same as before!
I am getting errors in ns-2.34/mit/leach_sims/leach.err file as given below
Do you have any idea of what can be done to remove them.........Please help

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 "/home/saurabh/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/saurabh/ns-allinone-2.34/ns-2.34/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 /home/saurabh/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 29)
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)
 
Old 03-06-2014, 10:15 AM   #808
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
This issue has been discussed many, many times in this thread already. Please read all the posts in this thread.

Quote:
Originally Posted by mittal_saurabhin View Post
I am getting errors in ns-2.34/mit/leach_sims/leach.err file as given below
Do you have any idea of what can be done to remove them.........Please help

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 "/home/saurabh/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/saurabh/ns-allinone-2.34/ns-2.34/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 /home/saurabh/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 29)
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)
 
Old 03-06-2014, 10:33 AM   #809
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
Quote:
Originally Posted by deepa_2111 View Post
This issue has been discussed many, many times in this thread already. Please read all the posts in this thread.
@deepa
I know the issue has been discussed many times in this thread.
But I have compared the errors of helyos and other persons and want to say that my errors are different.
Also as per your tag I have already set the path in uamps.tcl as you suggested to helyos few tags back.
So that means my errors are still there in my leach.err file and I am asking because of difference in my errors and others.

So please help me out if you have any idea about errors coming in my leach.err
although when I am executing ./test or ./leach_test file it is running and exiting properly without any warnings.........
 
Old 03-06-2014, 11:20 AM   #810
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
Quote:
Originally Posted by keepwalking View Post
@helyos and deepa2111

thank you for assisting to solve my problems now if i'm trying to run the ./test the leach.out does not have anything in it and on the other side the leach.err is having the following errors:

[
can you please tellme how you got rid of above mentioned error...........
 
  


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 09:39 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