LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   z-mac installation on ns2.34 (https://www.linuxquestions.org/questions/linux-software-2/z-mac-installation-on-ns2-34-a-944856/)

arica 05-14-2012 05:47 AM

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..

arica 05-14-2012 05:52 AM

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..

knudfl 05-14-2012 06:43 AM

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


.

arica 05-14-2012 08:57 AM

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????

knudfl 05-14-2012 09:25 AM

#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.

.

knudfl 05-14-2012 10:59 AM

# 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

.

arica 05-14-2012 11:16 AM

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

arica 05-14-2012 11:24 AM

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???

arica 05-14-2012 11:31 AM

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)

knudfl 05-14-2012 12:59 PM

# 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 ?
.

arica 05-15-2012 12:19 AM

#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..

arica 05-15-2012 12:37 AM

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??

arica 05-15-2012 01:32 AM

its important for me to run z-mac....so pls help and suggest...

knudfl 05-15-2012 01:33 AM

#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.

.

arica 05-15-2012 03:58 AM

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...

arica 05-15-2012 04:05 AM

#14...means i have to install ns2.26???

knudfl 05-15-2012 04:09 AM

# 16

Yes.

And please install to /home/<your-username>/ for best convenience.

arica 05-15-2012 05:14 AM

one more question.....we have to installl ns evrytime a new file is copied and it consumes much time....if we want ti installl ony ns ant not all..then make will work??

or some othet procedure???

knudfl 05-15-2012 05:36 AM

#18.

That's why we have the 'ns-allinone' packages :
You will also get the versions of tcl8* tk8* otcl tclcl,
that work with the particular version of ns-2.xx.

Some ns versions can (sometimes with advantage) use later versions of tcl etc.

NS-2.26 can only use the versions in the ns-allinone-2.26 package.

.

arica 05-15-2012 06:14 AM

thanks...@ knudfl....downloaded ns-allinone2.26....now installing on ubuntu 10.10..lets see now it will work or not..fingers crossed...

arica 05-15-2012 06:17 AM

insatlling steps???there are some ???

arica 05-15-2012 07:24 AM

while insatlling ns2.26 on ubuntu 10.10....the error is:--

tk8.3.2 installation succeeded.
============================================================
* Build OTcl-1.0a8
============================================================
No .configure file found in current directory
Continuing with default options...
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for string.h... yes
checking for main in -lXbsd... no
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... yes
checking for dcgettext in -lintl... no
checking for getnodebyname in -ldnet_stub... no
checking that g++ can handle -O2... no
checking standard STL is available... no
checking for tcl.h... -I../include
checking for libtcl8.3... -L../lib -ltcl8.3
checking for init.tcl... ../lib/tcl8.3
checking for tclsh8.3.2... no
checking for tclsh8.3... ../bin/tclsh8.3
checking for tk.h... -I../include
checking for libtk8.3... -L../lib -ltk8.3
checking for tk.tcl... ../lib/tk8.3
checking for X11 header files
checking for X11 library archive
checking for XOpenDisplay in -lX11... yes
checking for XShmAttach in -lXext... yes
checking for ranlib... ranlib
checking for a BSD compatible install... /usr/bin/install -c
checking system version (for dynamic loading)... Linux-2.6.35-22-generic
No explicit static compilation flag; setting V_STATIC to ""
checking for dlopen in -ldl... yes
checking for a BSD compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating Makefile
rm -f libotcl.a otcl.o
gcc -c -g -O2 -DNDEBUG -DUSE_SHM -I. -I/usr/local/ns-allinone-2.26/include -I/usr/local/ns-allinone-2.26/include -I/include otcl.c
ar cq libotcl.a otcl.o
ranlib libotcl.a
rm -f libotcl.so otcl.o so_locations
gcc -c -g -O2 -DNDEBUG -DUSE_SHM -fpic -I. -I/usr/local/ns-allinone-2.26/include -I/usr/local/ns-allinone-2.26/include -I/include otcl.c
ld -shared -o libotcl.so otcl.o
otcl.o: In function `OTclDispatch':
/usr/local/ns-allinone-2.26/otcl-1.0a8/otcl.c:481: undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/usr/local/ns-allinone-2.26/otcl-1.0a8/otcl.c:2266: undefined reference to `__stack_chk_fail_local'
ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Nonrepresentable section on output
make: *** [libotcl.so] Error 1
otcl-1.0a8 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

neone can help resolve it???

arica 05-15-2012 07:25 AM

patching done..gcc-4.1 installed...the y??

arica 05-15-2012 07:31 AM

what about...export CC=gcc34 CXX=g++34 <Enter>..whats this???

arica 05-15-2012 07:34 AM

used ...export CC=gcc34 CXX=g++34 <Enter> and then ./install....again error...
tk8.3.2 installation succeeded.
============================================================
* Build OTcl-1.0a8
============================================================
No .configure file found in current directory
Continuing with default options...
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc34
checking for C compiler default output... configure: error: C compiler cannot create executables
otcl-1.0a8 configuration failed! Exiting ...
Please check http://www.isi.edu/nsnam/ns/ns-problems.html
for common problems and bug fixes.


do resolve this.....

knudfl 05-15-2012 07:40 AM

# 22, # 23
Quote:

gcc -c -g -O2 -DNDEBUG -DUSE_SHM -fpic -I. ...
You are not using gcc version 4.1, but version 4.4.5 .
And : The Ubuntu gcc-4.1 may not work. (Not yet tested with ns-2.26.)

Please go back and read post # 14 about Ubuntu 10.10 :
Download and use the described gcc41-compat / g++41-compat.


And : The install command is not './install', but
export CC=gcc41 CXX=g++41 && ./install

# 25
Quote:

checking for gcc... gcc34
error: C compiler cannot create executables
That's because no gcc34 is installed on your OS.

.

arica 05-15-2012 08:23 AM

iss.......OTcl 1.0a3 doesn't compile with tcl 8.0.3 and 8.0.4????then what??

arica 05-15-2012 08:26 AM

now tell me what i have to do???

which gcc ti instllland how???

knudfl 05-15-2012 08:32 AM

# 27
Quote:

OTcl 1.0a3 doesn't compile with tcl 8.0.3 and 8.0.4
Is this some typos ? Defenitely not ns-allinone-2.26 !
Please use http://www.isi.edu/nsnam/dist/ns-allinone-2.26.tar.gz
→ → ns-allinone-2.26.tar.gz

Contains tcl8.3.2, tk8.3.2, otcl-1.0a8, tclcl-1.0b3 .

arica 05-15-2012 08:39 AM

ns2.26 is same..patch is there and g++41 and gcc41-compat-4.1 is there..now what steps to follow??

arica 05-15-2012 08:57 AM

1. gcc41-compat set....both ...using....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.

2. patching done!! using patch -p0 < ns-2.26-gcc410.patch

3. root@priyanka-Aspire-5745:/usr/local/ns-allinone-2.26#export CC=gcc41 CXX=g++41 && ./install......
and again error..

checking for Solaris2.4/Tru64 strtod bugs... ok
checking for ANSI C header files... yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for opendir... (cached) yes
checking union wait... yes
checking matherr support... yes
checking for strncasecmp... yes
checking for BSDgettimeofday... no
checking for gettimeofday... yes
checking for gettimeofday declaration... present
checking whether char is unsigned... no
checking signed char declarations... yes
checking for sin... no
checking for main in -lieee... yes
checking for main in -linet... no
checking for net/errno.h... no
checking for connect... yes
checking for gethostbyname... yes
checking if 64bit support is requested... no
checking if 64bit Sparc VIS support is requested... no
checking system version (for dynamic loading)... ./configure: 1: Syntax error: Unterminated quoted string
tcl8.3.2 configuration failed! Exiting ...
Tcl is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.



tcl failed..y??help

knudfl 05-15-2012 09:29 AM

Quote:

./configure: 1: Syntax error: Unterminated quoted string
That's an error which will appear, when no 'ns-2.26-gcc410.patch' is used.

The patch should be applied in /usr/local/ ,
i.e. outside the "ns-allinone-2.26/" folder.


.

arica 05-15-2012 10:14 AM

thanks @knudfl........ns2.26 installed on ubuntu 10.10..... :-).....now trying Drand and z-mac installlation....lets see...thanks again...

arica 05-15-2012 11:11 AM

now while installing DRAND and Z-MAC...from..

1.http://www4.ncsu.edu/~rhee/export/zm.../zmac/zmac.htm
and
2.http://www4.ncsu.edu/~rhee/export/zm...rand/drand.htm


follwing the instructions on this page....

from 1. ns2 installation instructions done...
from 2. ns2 installation instructions done..and while executing the simulation for ns2 execution instructions on 2. i.e simulating simple-wireless.tcl as...
root@priyanka-Aspire-5745:/usr/local/ns-allinone-2.26/ns-2.26/drandTcl# 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 _o111 "
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)
.....got again the same error..as for ns2.34......help me sort out this....

arica 05-15-2012 11:14 AM

also tell me before running tcl script simple-wireless.tcl....i have to agin make ns2.26 or insatll ns??????or just run the script...


error..agin goes to #1...........no use working whole day...

arica 05-15-2012 11:16 AM

what is scenario.tcl file in $ns simple-wireless.tcl <numnodes> <scenario.tcl>
....is it the file created from ./setdest i.e new-scen-N-X-Y..???
help needed!!

knudfl 05-15-2012 11:20 AM

# 34
Quote:

ns simple-wireless.tcl
Sorry, not possible with the "ns-drand" binary, to run an "ns 2.26 simple-wireless.tcl"
To run default files : Set up a third version of ns-allinone-2.26,
and copy the binary ns to ns226.
'ns226 simple-wireless.tcl' should then work.

Be aware that you also need separate ns-allinone-2.26 installs
for DRAND and ZMAC. ( A zmac ns-2.26 cannot run DRAND stuff. AFAIK.)

.

arica 05-15-2012 11:32 AM

Sorry, not possible with the "ns-drand" binary

...what is ns-drand binary???

To run default files : Set up a third version of ns-allinone-2.26,
and copy the binary ns to ns226.
.....how to create the third version.???...i dnt know even to craete 1st nd 2nd versions...how???

meanwhile....ns with the drand instructions followed...instlled correctlyyyy...and i have also saved the previous version of ns without instructions....that was also installed correctly...

then y this error showing???

arica 05-15-2012 11:34 AM

y this tcl script is not running???

knudfl 05-15-2012 11:38 AM

# 36
Quote:

What is scenario.tcl file in $ns simple-wireless.tcl <numnodes> <scenario.tcl>
First : I'd guess, that the special simple-wireless.tcl from drandTcl.tar.gz
is to be used. (It is not ns-2.26/tcl/ex/simple-wireless.tcl ).
http://www4.ncsu.edu/~rhee/export/zm...randTcl.tar.gz

"scenario.tcl" : I don't know. Just try out, what you have.
(There is a "wirelessOpt.tcl" in drandTcl.tar.gz ).

knudfl 05-15-2012 11:45 AM

... And please spell out your words. Write why, not y when you mean 'why',
etc etc. Short hand writing / SMS language is not accepted here at LQ.

Please edit your posts to be readable. Please edit spell errors.

arica 05-15-2012 12:53 PM

yess....your guess is right..it is from the drandTCL.tar.gz....
..
..

i m getting the error post #34.....

arica 05-15-2012 01:08 PM

..the same error with some other file is there...i searched it....

http://my.opera.com/HenryFD/blog/show.dml/192233

...they told to make..them make install...........and others as....make clean then make depend then make and then make install....
also suggested to add variables...
..
in..ns2.26/tcl/lib...with reference to .cc files..i.e drandAgent.cc in our case....
how this is done???

Thanks for checking above and help me out also...
Thanks again!!

arica 05-15-2012 01:10 PM

also consider my post #38

arica 05-15-2012 02:17 PM

nothing working again.....i dnt know whats the problem....same error post #1..spend my whole day on it...

knudfl 05-15-2012 03:04 PM

# 42
A way to find out, how to do the simulation ... start with these commands:
cd ns-allinone-2.26/ns-2.26/drandTcl/
( Or whereever you have the drandTcl/ folder )
./ns-drand simple-wireless.tcl 2 wirelessOpt.tcl
And / or : ./ns-drand simple-wireless.tcl 3 wirelessOpt.tcl
( 'ns-drand' is a backup copy of ns from the DRAND patched ns-2.26 )
Code:

[knudfl@localhost drandTcl]$ ./ns-drand simple-wireless.tcl 3 wirelessOpt.tcl
num_nodes is set 3
warning: no class variable Agent/DRAND::randomSeed_
        see tcl-object.tcl in tclcl for info about this warning.

Starting Simulation...
*******************************************************
OneHopNodeID(Hello) : 2 1 255 255 255 255 255 255 255 255
TwoHopNodeID(Hello) : 255 255 255 255 255 255 255 255 255 255
0 OneHopCount(Hello) : 2
0 TwoHopCount(Hello) : 0
*******************************************************
*******************************************************
OneHopNodeID(Hello) : 2 0 255 255 255 255 255 255 255 255
TwoHopNodeID(Hello) : 255 255 255 255 255 255 255 255 255 255
1 OneHopCount(Hello) : 2
1 TwoHopCount(Hello) : 0
*******************************************************
*******************************************************
OneHopNodeID(Hello) : 0 1 255 255 255 255 255 255 255 255
TwoHopNodeID(Hello) : 255 255 255 255 255 255 255 255 255 255
2 OneHopCount(Hello) : 2
2 TwoHopCount(Hello) : 0
*******************************************************
0 SLOTINFO 0
0 1HOPNBRINFO 2 1
0 2HOPNBRINFO
MESSAGE sID 0 mCt 4 rReq 1 rGra 0 mTime 0.409841 oneHopCount 2
MESSAGE sID 0 reqCt 2 graCt 0 rejCt 2 relCt 0 twoCt 0
MESSAGE sID 0 Round 0 maxC 0 twoHopMaxC 0 slotNum 0 roundDelay 0.409841 grantDelay 0.206357
2 SLOTINFO 1
2 1HOPNBRINFO 0 1
2 2HOPNBRINFO
MESSAGE sID 2 mCt 6 rReq 0 rGra 0 mTime 0.422742 oneHopCount 2
MESSAGE sID 2 reqCt 2 graCt 1 rejCt 1 relCt 1 twoCt 1
MESSAGE sID 2 Round 1 maxC 0 twoHopMaxC 0 slotNum 1 roundDelay 0.005010 grantDelay 0.003471
1 SLOTINFO 2
1 1HOPNBRINFO 2 0
1 2HOPNBRINFO
MESSAGE sID 1 mCt 8 rReq 0 rGra 0 mTime 0.440861 oneHopCount 2
MESSAGE sID 1 reqCt 2 graCt 2 rejCt 1 relCt 1 twoCt 2
MESSAGE sID 1 Round 2 maxC 0 twoHopMaxC 0 slotNum 2 roundDelay 0.010743 grantDelay 0.006579


An empty file simple.tr is created, but now you have somthing, that you can work on.

.

knudfl 05-15-2012 04:30 PM

A better result with more nodes : A trace file with content.
$ ./ns-drand simple-wireless.tcl 12 wirelessOpt.tcl
$ ./ns-drand simple-wireless.tcl 20 wirelessOpt.tcl
.. So with more nodes you can get a result to analyze.

.

arica 05-15-2012 10:32 PM

thanks @knudfl....but i am getting this..
....
..
root@priyanka-Aspire-5745:/usr/local/ns-allinone-2.26/ns-2.26/drandTcl# ./ns-drand simple-wireless.tcl 3 wirelessOpt.tcl
bash: ./ns-drand: No such file or directory

arica 05-15-2012 11:00 PM

and if with ns...

root@priyanka-Aspire-5745:/usr/local/ns-allinone-2.26/ns-2.26/drandTcl# ns simple-wireless.tcl 3 wirelessOpt.tcl
num_nodes is set 3
ns: Mac/802_11 set ether_hdr_len_: can't read "ether_hdr_len_": no such variable
(Object set line 1)
invoked from within
"Mac/802_11 set ether_hdr_len_"

arica 05-15-2012 11:05 PM

after insatlling and then ./validate...its showing...
...........................................
Running test wireless1:
../../ns test-suite-WLtutorial.tcl wireless1 QUIET
num_nodes is set 3
ns: Mac/802_11 set ether_hdr_len_: can't read "ether_hdr_len_": no such variable
(Object set line 1)
invoked from within
"Mac/802_11 set ether_hdr_len_"
Test output differs from reference output
Diagnose with: diff test-output-WLtutorial/wireless1.test test-output-WLtutorial/wireless1
Or see URL "http://www.isi.edu/nsnam/ns/ns-problems.html".
Running test wireless2:
../../ns test-suite-WLtutorial.tcl wireless2 QUIET
num_nodes is set 4
ns: Mac/802_11 set ether_hdr_len_: can't read "ether_hdr_len_": no such variable
(Object set line 1)

invoked from within
"Mac/802_11 set ether_hdr_len_"
Test output differs from reference output
Diagnose with: diff test-output-WLtutorial/wireless2.test test-output-WLtutorial/wireless2
Or see URL "http://www.isi.edu/nsnam/ns/ns-problems.html".
Running test wireless3:
../../ns test-suite-WLtutorial.tcl wireless3 QUIET
num_nodes is set 3
ns: Mac/802_11 set ether_hdr_len_: can't read "ether_hdr_len_": no such variable
(Object set line 1)
invoked from within
"Mac/802_11 set ether_hdr_len_"
Test output differs from reference output
Diagnose with: diff test-output-WLtutorial/wireless3.test test-output-WLtutorial/wireless3
Or see URL "http://www.isi.edu/nsnam/ns/ns-problems.html".
Some test failed.
validate overall report: some tests failed:
./test-all-wireless-gridkeeper ./test-all-wireless-lan-newnode ./test-all-wireless-lan-tora ./test-all-wireless-lan-aodv ./test-all-wireless-diffusion ./test-all-energy ./test-all-wireless-shadowing ./test-all-WLtutorial

to re-run a specific test, cd tcl/test; ../../ns test-all-TEST-NAME


All times are GMT -5. The time now is 08:47 AM.