[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] segmentation fault during simulation of AODV
Sorry I paste my tcl file again.
# wireless_test_3_1.tcl
# setting is based on the paper "performance comparison of on-demand routing
protocols for ad hoc networks"
# I used cbrgen.tcl and setdest for scenario.
# 1500X300 grids, 50 mobile nodes, 30 maximum connections, rate is 4, seed
is 1.0 during 900 second in ns2-1b8a.
# ======================================================================
# Define options
# ======================================================================
set val(chan) Channel/WirelessChannel
set val(prop) Propagation/TwoRayGround
set val(netif) Phy/WirelessPhy
set val(mac) Mac/802_11
set val(ifq) Queue/DropTail/PriQueue
set val(ll) LL
set val(ant) Antenna/OmniAntenna
set val(x) 1500 ;# X dimension of the topography
set val(y) 300 ;# Y dimension of the topography
set val(ifqlen) 50 ;# max packet in ifq
set val(seed) 1.0
set val(adhocRouting) AODV
set val(nn) 50 ;# how many nodes are simulated
set val(cp) "../../indep-utils/cmu-scen-gen/cbr_test_50_30"
set val(sc)
"../../indep-utils/cmu-scen-gen/setdest/dest_test_50_30"
set val(stop) 900.0 ;# simulation time
# =====================================================================
# Main Program
# ======================================================================
#
# Initialize Global Variables
#
# create simulator instance
set ns_ [new Simulator]
# setup topography object
set topo [new Topography]
# create trace object for ns and nam
set tracefd [open simulation_3-1.tr w]
set namtrace [open simulation_3-1.nam w]
# I added to use new-trace format
$ns_ use-newtrace
$ns_ trace-all $tracefd
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)
# define topology
$topo load_flatgrid $val(x) $val(y)
#
# Create God
#
set god_ [create-god $val(nn)]
#
# define how node should be created
#
#global node setting
$ns_ node-config -adhocRouting $val(adhocRouting) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-channelType $val(chan) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace OFF \
-macTrace OFF \
-movementTrace OFF
#
# Create the specified number of nodes [$val(nn)] and "attach" them
# to the channel.
#
for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;# disable random motion
}
#
# Define node movement model
#
puts "Loading connection pattern..."
source $val(cp)
#
# Define traffic model
#
puts "Loading scenario file..."
source $val(sc)
# Define node initial position in nam
for {set i 0} {$i < $val(nn)} {incr i} {
# 50 defines the node size in nam, must adjust it according to your
scenario
# The function must be called after mobility model is defined
$ns_ initial_node_pos $node_($i) 50
}
#
# Tell nodes when the simulation ends
#
for {set i 0} {$i < $val(nn) } {incr i} {
$ns_ at $val(stop).0 "$node_($i) reset";
}
$ns_ at $val(stop).0001 "stop"
$ns_ at $val(stop).0002 "puts \"NS EXITING...\" ; $ns_ halt"
proc stop {} {
global ns_ tracefd
$ns_ flush-trace
close $tracefd
}
puts $tracefd "M 0.0 nn $val(nn) x $val(x) y $val(y) rp $val(adhocRouting)"
puts $tracefd "M 0.0 sc $val(sc) cp $val(cp) seed $val(seed)"
puts $tracefd "M 0.0 prop $val(prop) ant $val(ant)"
puts "Starting Simulation..."
$ns_ run
Thank you.
Joo-Han Song
----- Original Message -----
From: "Di-Fa Chang"
To: "Joo-Han Song"
Cc:
Sent: Saturday, November 24, 2001 12:46 PM
Subject: Re: [ns] segmentation fault during simulation of AODV
> if you can post your simulation script, then other people may
> have the time to test it and find the bugs.
>
> thanks,
> difa
>
> On Thu, 22 Nov 2001, Joo-Han Song wrote:
>
> > Hi all users,
> >
> > I am having a confusing problem. I am doing a wireless simulation using
AODV that makes 'segmentation fault' error as the scenario comes to be
bigger. (In my case 1500 X 300 grids, 50 mobile nodes, 30 maximum
connections, rate is 4 duing 900 second simulation using allinone version
ns-2.1b8a).
> >
> > When I changed the routing mechanism to DSR in same scale scenario,
there was no problem like this. So I guess it might be the problem of AODV
source files in allinone version ns-2.1b8a
> > Is there anybody who having similar problems or solutions?
> > Also, which set of source files for AODV is the newest version and where
can I find them?
> >
> > I have already talked with Mr. Mahesh Marina about this problem, but he
said that because someone else has ported their code on his website to
ns-2.1b8a, he don't know the details.
> >
> > Any help will be appreciated lots.
> > Thank you.
> >
> > Joo-Han
> >
> >