LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 05-14-2012, 05:47 AM   #1
arica
Member
 
Registered: May 2012
Posts: 50

Rep: Reputation: Disabled
Unhappy z-mac installation on ns2.34


-Aspire-5745:/usr/local/ns-allinone-2.34/ns-2.34/zmacTcl# ns simZMAC.tcl -to 8 -tno 32 -nn 21 -maxX 120 -maxY 120 -sinknode 20 -numsources 3 -ack 1 -zmacMode 1 -timeSyncErrorFlag false -timeSyncErrorValue 10 -valuefile zmac
Setting slot size to 0.001328
num_nodes is set 21
INITIALIZE THE LIST xListHead
values-file lookup failed

(_o20 cmd line 1)
invoked from within
"_o20 cmd values-file zmac"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o20" line 2)
(SplitObject unknown line 2)
invoked from within
"$mac_($i) values-file $valuefile"
("for" body line 6)
invoked from within
"for {set i 0} {$i < $numNodes } {incr i} {
set node_($i) [$ns_ node $i]
$node_($i) random-motion 0 ;# disable random motion
$god_ new_node $nod..."
(file "multiHopTopoGen.tcl" line 1)
invoked from within
"source.orig multiHopTopoGen.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 "multiHopTopoGen.tcl""
(file "simZMAC.tcl" line 99)
This is the error i m getting in last step run of zMAc..no files missing..i dnt able to get whats the problem..please help me..
 
Old 05-14-2012, 05:52 AM   #2
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
one more i m geetting in make of ns2.34..this is because i have copied some externl files in it..so some chenges occur..is it compulsory to make ns after coping external files????or for running ne new protocol????the above error can be due the this ????everything messed up...m not getting ne thing.......

the error is..
Aspire-5745:/usr/local/ns-allinone-2.34/ns-2.34# make
g++ -c -Wall -Wno-write-strings -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -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 -I. -I. -I/usr/local/ns-allinone-2.34/tclcl-1.19 -I/usr/local/ns-allinone-2.34/otcl -I/usr/local/ns-allinone-2.34/include -I/usr/local/ns-allinone-2.34/include -I/usr/local/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 -o mac/smac.o mac/smac.cc
mac/smac.cc: In member function ‘bool SMAC::sendRTS()’:
mac/smac.cc:2217: error: expected primary-expression before ‘;’ token
mac/smac.cc: In member function ‘bool SMAC::sendCTS(double)’:
mac/smac.cc:2260: error: expected primary-expression before ‘;’ token
mac/smac.cc: In member function ‘bool SMAC::sendACK(double)’:
mac/smac.cc:2317: error: expected primary-expression before ‘;’ token
mac/smac.cc: In member function ‘bool SMAC::sendSYNC()’:
mac/smac.cc:2352: error: expected primary-expression before ‘;’ token
make: *** [mac/smac.o] Error 1


pls do help..
 
Old 05-14-2012, 06:43 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
Welcome to LQ. .. ..
ZMAC http://www4.ncsu.edu/~rhee/export/zm.../zmac/zmac.htm

Your post #1 : Please see this other example, that works ..
http://www.linuxquestions.org/questi...738/page3.html
> post # 37
$ ./ns simZMAC.tcl -numsources 3 -zmacMode 1 -interval 10 -sinknode 83 -valuefile salida.tr -maxX 300 -maxY 300 -nn 84 -ack 0 -to 3 -tno 6 -timeSyncErrorFlag 0 -timeSyncErrorValue 100


Post # 2 : Interesting that you use ns-2.34. The known ZMAC is for ns-2.26.
Please tell us, how you installed into ns-2.34.
( The install for ns-allinone-2.26 is here, post # 29 :
http://www.linuxquestions.org/questi...738/page2.html )
( CentOS 6 / Scientific Linux SL 6 ).
A first guess about the cause of your errors : Wrong compiler ?
What is smac.cc ?


And please specify the name and version of your Linux OS,
like CentOS 6, Ubuntu 10.04 ..
http://www.linuxquestions.org/linux/...Ask_a_Question
http://linuxsilo.net/docs/smart-questions_en.html


.

Last edited by knudfl; 05-14-2012 at 07:03 AM.
 
Old 05-14-2012, 08:57 AM   #4
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
Thanks @knudfl for the reply..m using ubuntu 10.10..and installing z-mac in it is same as steps...with insatlling ns or amking after every step of . .. ..
ZMAC http://www4.ncsu.edu/~rhee/export/zm.../zmac/zmac.htm

and the ../ns2.34/mac/smac.cc..file..in which some error i.e #2 is showing..and why my last step not working i.e simulating simZMAc.tcl????
 
Old 05-14-2012, 09:25 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
#1, #4, this is what I get with ns-2.26, Scientific Linux SL6.
$ ns simZMAC.tcl <your options>
""can't read "interval": no such variable"" ( + another 18 lines ..).

Then I added '-interval 10' to the command ...
Code:
[knudfl@localhost zmacTcl]$ ./ns-zmac simZMAC.tcl -interval 10 -to 8 -tno 32 -nn 21 -maxX 120 -maxY 120 -sinknode 20 -numsources 3 -ack 1 -zmacMode 1 -timeSyncErrorFlag false -timeSyncErrorValue 10 -valuefile zmac
Setting slot size to 0.001328
num_nodes is set 21
... and the trace file 'out.tr' was created.

.

Last edited by knudfl; 05-14-2012 at 09:31 AM.
 
Old 05-14-2012, 10:59 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 2, # 4.

'ns-allinone-2.34' : The g++-4.1 compiler must be used.

sudo apt-get install g++-4.1

( cd ns-allinone-2.34/ && export CC=gcc-4.1 CXX=g++-4.1 && ./install )
cd ns-allinone-2.34/ns-2.34/ && export CC=gcc-4.1 CXX=g++-4.1 &&
./configure && make clean && make

.
 
Old 05-14-2012, 11:16 AM   #7
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
m using gcc-4.3.....and u use ./ns-zmac and i use ns simZMAC ....if i use urs i get the error...Aspire-5745:/usr/local/ns-allinone-2.34/ns-2.34/zmacTcl# ./ns-zmac simZMAC.tcl -nn 21 -maxX 120 -maxY 120 -sinknode 20 -numsources 3 -ack 1 -to 8 -tno 32 -timeSyncErrorFlag false -timeSyncErrorValue 100 -a 0.5 -zmacMode 1 -valuefile zmac.tr
bash: ./ns-zmac: No such file or directory
 
Old 05-14-2012, 11:24 AM   #8
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
from ...http://www4.ncsu.edu/~rhee/export/zm...c/zmac.htm...i have made the new-scen-N-X-Y..i.e new-scen-6-60-60...using ./setdest....then next step running simple-wireless.tcl..as...Aspire-5745:/usr/local/ns-allinone-2.34/ns-2.34/drandTcl# ns simple-wireless.tcl 4 new-scen-6-60-60 ...gives error.
num_nodes is set 4
INITIALIZE THE LIST xListHead
can't read "node_(4)": no such element in array
while executing
"$node_(4) set X_ 26.199793878374"
(file "new-scen-6-60-60" line 16)
invoked from within
"source.orig new-scen-6-60-60"
("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 $scenarioFile"
(file "simple-wireless.tcl" line 38)


yy so???
 
Old 05-14-2012, 11:31 AM   #9
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
output file simple.tr is created for above..but it is empty....and

tell me...
whether it is compulsory to build ns everytime u copy new code into it???tas there are many files to copied for z-mac.but inlast step of..http://www4.ncsu.edu/~rhee/export/zm...c/zmac.htm...ie tramsmission schedule for z-mac..
all files requires as input to simZMAC are given....and when i copy these folder into ns...i first have to build ns agian???before also???

running it again...empty ouput file out.tr is only created..
Aspire-5745:/usr/local/ns-allinone-2.34/ns-2.34/zmacTcl# ns simZMAC.tcl -nn 21 -maxX 120 -maxY 120 -sinknode 20 -numsources 3 -ack 1 -to 8 -tno 32 -timeSyncErrorFlag false -timeSyncErrorValue 100 -a 0.5 -zmacMode 1 -valuefile zmac.tr
Setting slot size to 0.001328
num_nodes is set 21
INITIALIZE THE LIST xListHead
values-file lookup failed

(_o20 cmd line 1)
invoked from within
"_o20 cmd values-file zmac.tr"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o20" line 2)
(SplitObject unknown line 2)
invoked from within
"$mac_($i) values-file $valuefile"
("for" body line 6)
invoked from within
"for {set i 0} {$i < $numNodes } {incr i} {
set node_($i) [$ns_ node $i]
$node_($i) random-motion 0 ;# disable random motion
$god_ new_node $nod..."
(file "multiHopTopoGen.tcl" line 1)
invoked from within
"source.orig multiHopTopoGen.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 "multiHopTopoGen.tcl""
(file "simZMAC.tcl" line 99)
 
Old 05-14-2012, 12:59 PM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 9
Quote:
whether it is compulsory to build ns everytime you copy new code into it ?
Yes, if you mean files.cc, files.h . They must be compiled into a new 'ns'.
Warning :
A new 'ns' may not work with the files.tcl meant for another patching.
Always save an ns copy to a different file name. Hence 'ns-zmac'.


Quote:
running it again...empty ouput file out.tr is only created..
1) I get an out.tr with 7011 lines. A 1.3 MB file !

2) You are still using the wrong command. Option -interval must be used.
3) Your output looks suspicious. Probably a failed build of ns-2.34.

Not quite clear what you write. And please edit the links in your posts.
You cannot copy / paste a link. Please use right click,
and choose "Copy Link Location" when a link is copied.

Quote:
files requires as input to simZMAC are given..and when I copy these folder into ns
Which files ? ?
Like #29 ? http://www.linuxquestions.org/questi...738/page2.html ?
.

Last edited by knudfl; 05-14-2012 at 01:32 PM.
 
Old 05-15-2012, 12:19 AM   #11
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
#10 You are still using the wrong command. Option -interval must be used.
same error with -interval..

Your output looks suspicious. Probably a failed build of ns-2.34.
..yess..the problem is this only..i m sure....building it again gives the error...#2

Yes, if you mean files.cc, files.h . They must be compiled into a new 'ns'.
Warning :
A new 'ns' may not work with the files.tcl meant for another patching.
Always save an ns copy to a different file name. Hence 'ns-zmac'.
howww??

tanks for ur reply but till now everything is going wrong..
 
Old 05-15-2012, 12:37 AM   #12
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
can u please guide me..from the first step to rum z-mac...i will again dowmload ns-2.26 ..for it....or ns-2.34 is okk??
 
Old 05-15-2012, 01:32 AM   #13
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
its important for me to run z-mac....so pls help and suggest...
 
Old 05-15-2012, 01:33 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
#12 .... Good news : ns-allinone-2.26+ZMAC works OK in Ubuntu 10.10.
( It is no go for zmac and ns-2.34 ( Any OS.))

Install : Like the referred post # 29. Except for the export command.
Must be : export CC=gcc41 CXX=g++41

But first you must download and install gcc41, g++41 :
gcc41-compat https://docs.google.com/open?id=0B7S...RjNjJhOTZjNjI2
g++41-compat https://docs.google.com/open?id=0B7S...hjMjljN2M2MGU4

sudo dpkg -i gcc41-compat-4.1.2_i386.deb g++41-compat-4.1.2_i386.deb
.. Then reboot, and the new compilers can be used.

.

Last edited by knudfl; 05-15-2012 at 01:52 AM.
 
1 members found this post helpful.
Old 05-15-2012, 03:58 AM   #15
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
again installedns2.34 and then again followed the steps for running z-mac..as given here....
1..http://www4.ncsu.edu/~rhee/export/zm.../zmac/zmac.htm .....
and for drand as here..
2...http://www4.ncsu.edu/~rhee/export/zm...rand/drand.htm...

now in second in running the simple-wireless.tcl...as
Aspire-5745:~/Desktop/ns-allinone-2.34/ns-2.34# ns simple-wireless.tcl 6 new-scen-6-60-60
num_nodes is set 6
INITIALIZE THE LIST xListHead
invalid command name "Agent/DRAND"
while executing
"Agent/DRAND create _o123 "
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new Agent/DRAND"
("for" body line 2)
invoked from within
"for { set i 0} { $i < $numNodes } { incr i} {
set drand($i) [new Agent/DRAND]
$drand($i) set randomSeed_ [ns-random]
$ns_ attach-agent $no..."
(file "simple-wireless.tcl" line 38)


gets this error again...my make after insatllation of files IS GOING CORRECT BUT SIMULATION IS NOT WORKING....AND THE CODE FOR simple-wireless.tcl is provided in the link above 2....is Agent/DRAND...
 
  


Reply

Tags
drand, g++41-compat, zmac


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
NS2 S-MAC Sleep Time Query ulyssues.fam Linux - Newbie 1 11-24-2012 04:18 PM
NS2 S-MAC Protocol Sleep Time Query ulyssues.fam Linux - Newbie 0 04-14-2012 09:01 AM
ns2.29.3 installation on fedora 15 , nam installation problem Narges Linux - Networking 5 10-31-2011 11:09 AM
Need help in NS2 installation maneshmotts Ubuntu 5 09-10-2011 05:47 AM
NS2 installation eby83 Linux - Newbie 2 06-11-2007 01:08 AM


All times are GMT -5. The time now is 12:46 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