[ns] Segmentation Fault in DSR

2006-10-13 Thread eoliveira

Hello,

I am working with ad hoc protocols in point-to-multipoint and
multipoint-to-point scenario with 1, 2, 5, 10, 20 and 50 nodes. The
simulation take 1020 seconds.

With few nodes, there is no problem.  But with 20 and 50 nodes, the
segmentation fault occurs with 400, 600, 800 seconds.  Anybody has any
idea?

I am appending a shell script file and the TCL file.

Thanks in advance.

Etienne Oliveira

# ==
# Define options
# ===
set opt(chan)   Channel/WirelessChannel
set opt(prop)   Propagation/TwoRayGround
set opt(netif)  Phy/WirelessPhy
set opt(mac)Mac/802_11
set opt(ll) LL
set opt(ant)Antenna/OmniAntenna
set opt(ifqlen) 50  ;# max packet in ifq

set opt(filters) DSR
set opt(adhocRouting)DSR
set opt(ifq) CMUPriQueue
set opt(x)  1898
set opt(y)  770
set opt(nn) 51
set opt(stop)   1020
set opt(tr) wireless.tr
set opt(sndr)   50
set opt(rcvr)   1


# ==

$opt(mac) set dataRate_ 11Mb
$opt(mac) set basicRate_ 11Mb

LL set mindelay_50us
LL set delay_   25us
LL set bandwidth_   0   ;# not used

#Queue/DropTail/PriQueue set Prefer_Routing_Protocols1

# unity gain, omni-directional antennas
# set up the antennas to be centered in the node and 1.5 meters above it
Antenna/OmniAntenna set X_ 0
Antenna/OmniAntenna set Y_ 0
Antenna/OmniAntenna set Z_ 1.5
Antenna/OmniAntenna set Gt_ 1.0
Antenna/OmniAntenna set Gr_ 1.0

# Initialize the SharedMedia interface with parameters to make
# it work like the 914MHz Lucent WaveLAN DSSS radio interface
Phy/WirelessPhy set CPThresh_ 10.0
Phy/WirelessPhy set CSThresh_ 1.559e-11
Phy/WirelessPhy set RXThresh_ 3.652e-10
Phy/WirelessPhy set Rb_ 2*1e6
Phy/WirelessPhy set Pt_ 0.2818
Phy/WirelessPhy set freq_ 914e+6
Phy/WirelessPhy set L_ 1.0

# ==
# Main Program
# =

#
# Initialize Global Variables
#

set ns_ [new Simulator]
set topo[new Topography]

set tracefd [open $opt(tr) w]
$ns_ trace-all $tracefd

$topo load_flatgrid $opt(x) $opt(y)

# [... + 2] Problema no DSR - Resposta no google
set god_ [create-god [expr $opt(nn) + 2]]

#
# Global node setting
#

$ns_ node-config -adhocRouting $opt(adhocRouting) \
 -llType $opt(ll) \
 -macType $opt(mac) \
 -ifqType $opt(ifq) \
 -ifqLen $opt(ifqlen) \
 -antType $opt(ant) \
 -propType $opt(prop) \
 -phyType $opt(netif) \
 -channelType $opt(chan) \
 -topoInstance $topo \
 -agentTrace ON \
 -routerTrace OFF \
 -macTrace ON

#  Create the specified number of nodes [$opt(nn)] and attach them
#  to the channel.

for {set i 0} {$i = $opt(nn) } {incr i} {
set node_($i) [$ns_ node $i]
$node_($i) random-motion 0  ;# disable random motion
$god_ new_node $node_($i)
}

#
# Scennario File
#

$node_(0) set X_ 949.00
$node_(0) set Y_ 385.00
$node_(0) set Z_ 0.0
$node_(1) set X_ 1635.91
$node_(1) set Y_ 662.36
$node_(1) set Z_ 0.0
$node_(2) set X_ 1459.13
$node_(2) set Y_ 139.45
$node_(2) set Z_ 0.0
$node_(3) set X_ 280.60
$node_(3) set Y_ 697.29
$node_(3) set Z_ 0.0
$node_(4) set X_ 1861.14
$node_(4) set Y_ 214.13
$node_(4) set Z_ 0.0
$node_(5) set X_ 1736.59
$node_(5) set Y_ 582.57
$node_(5) set Z_ 0.0
$node_(6) set X_ 1005.10
$node_(6) set Y_ 58.01
$node_(6) set Z_ 0.0
$node_(7) set X_ 1252.78
$node_(7) set Y_ 300.35
$node_(7) set Z_ 0.0
$node_(8) set X_ 1565.76
$node_(8) set Y_ 219.67
$node_(8) set Z_ 0.0
$node_(9) set X_ 1513.90
$node_(9) set Y_ 92.29
$node_(9) set Z_ 0.0
$node_(10) set X_ 1522.73
$node_(10) set Y_ 653.42
$node_(10) set Z_ 0.0
$node_(11) set X_ 1410.50
$node_(11) set Y_ 148.86
$node_(11) set Z_ 0.0
$node_(12) set X_ 1081.79
$node_(12) set Y_ 620.04
$node_(12) set Z_ 0.0
$node_(13) set X_ 917.08
$node_(13) set Y_ 688.20
$node_(13) set Z_ 0.0
$node_(14) set X_ 846.38
$node_(14) set Y_ 554.51
$node_(14) set Z_ 0.0
$node_(15) set X_ 152.46
$node_(15) set Y_ 48.60
$node_(15) set Z_ 0.0
$node_(16) set X_ 1561.04
$node_(16) set Y_ 559.50
$node_(16) set Z_ 0.0
$node_(17) set X_ 1316.64
$node_(17) set Y_ 585.48
$node_(17) set Z_ 0.0
$node_(18) set X_ 1529.37
$node_(18) set Y_ 407.81
$node_(18) set Z_ 0.0
$node_(19) set X_ 1824.51
$node_(19) set Y_ 38.28
$node_(19) set Z_ 0.0
$node_(20) set X_ 1601.04
$node_(20) set Y_ 305.16
$node_(20) set Z_ 0.0
$node_(21) set X_ 1027.40
$node_(21) set Y_ 240.27
$node_(21) set Z_ 0.0
$node_(22) set X_ 25.83
$node_(22) set Y_ 94.53

[ns] [Fwd: Re: Segmentation Fault in DSR]

2006-10-13 Thread eoliveira

Dear,

Thank for you help.  The message is above. The simulation was aborted with
832 seconds.


[EMAIL PROTECTED]:~/simulacoes/Mare_DSR/TCL ns DSR.tcl
num_nodes is set 53
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Loading connection pattern...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS ...DONE!
Segmentation fault

Thanks in advance.
Etienne Oliveira

 Original Message 
Subject: Re: [ns] Segmentation Fault in DSR
From:Sasan Sahraei [EMAIL PROTECTED]
Date:Fri, October 13, 2006 11:20 am
To:  [EMAIL PROTECTED]
--

The only time that I have seen DSR to generate a segmentation fault is
when you define a queue type other than CMUPriQueue. which in your case
you should be fine.

can you send us the exact error?

Thanks,
Sasan



 Hello,

 I am working with ad hoc protocols in point-to-multipoint and
 multipoint-to-point scenario with 1, 2, 5, 10, 20 and 50 nodes. The
 simulation take 1020 seconds.

 With few nodes, there is no problem.  But with 20 and 50 nodes, the
 segmentation fault occurs with 400, 600, 800 seconds.  Anybody has any
 idea?

 I am appending a shell script file and the TCL file.

 Thanks in advance.

 Etienne Oliveira

 # ==
 # Define options
 # ===
 set opt(chan) Channel/WirelessChannel
 set opt(prop) Propagation/TwoRayGround
 set opt(netif)Phy/WirelessPhy
 set opt(mac)  Mac/802_11
 set opt(ll)   LL
 set opt(ant)Antenna/OmniAntenna
 set opt(ifqlen)   50  ;# max packet in ifq

 set opt(filters) DSR
 set opt(adhocRouting)DSR
 set opt(ifq) CMUPriQueue
 set opt(x)1898
 set opt(y)770
 set opt(nn)   51
 set opt(stop) 1020
 set opt(tr) wireless.tr
 set opt(sndr) 50
 set opt(rcvr) 1


 # ==

 $opt(mac) set dataRate_ 11Mb
 $opt(mac) set basicRate_ 11Mb

 LL set mindelay_  50us
 LL set delay_ 25us
 LL set bandwidth_ 0   ;# not used

 #Queue/DropTail/PriQueue set Prefer_Routing_Protocols1

 # unity gain, omni-directional antennas
 # set up the antennas to be centered in the node and 1.5 meters above it
 Antenna/OmniAntenna set X_ 0
 Antenna/OmniAntenna set Y_ 0
 Antenna/OmniAntenna set Z_ 1.5
 Antenna/OmniAntenna set Gt_ 1.0
 Antenna/OmniAntenna set Gr_ 1.0

 # Initialize the SharedMedia interface with parameters to make
 # it work like the 914MHz Lucent WaveLAN DSSS radio interface
 Phy/WirelessPhy set CPThresh_ 10.0
 Phy/WirelessPhy set CSThresh_ 1.559e-11
 Phy/WirelessPhy set RXThresh_ 3.652e-10
 Phy/WirelessPhy set Rb_ 2*1e6
 Phy/WirelessPhy set Pt_ 0.2818
 Phy/WirelessPhy set freq_ 914e+6
 Phy/WirelessPhy set L_ 1.0

 # ==
 # Main Program
 # =

 #
 # Initialize Global Variables
 #

 set ns_   [new Simulator]
 set topo  [new Topography]

 set tracefd   [open $opt(tr) w]
 $ns_ trace-all $tracefd

 $topo load_flatgrid $opt(x) $opt(y)

 # [... + 2] Problema no DSR - Resposta no google
 set god_ [create-god [expr $opt(nn) + 2]]

 #
 # Global node setting
 #

 $ns_ node-config -adhocRouting $opt(adhocRouting) \
  -llType $opt(ll) \
  -macType $opt(mac) \
  -ifqType $opt(ifq) \
  -ifqLen $opt(ifqlen) \
  -antType $opt(ant) \
  -propType $opt(prop) \
  -phyType $opt(netif) \
  -channelType $opt(chan) \
  -topoInstance $topo \
  -agentTrace ON \
  -routerTrace OFF \
  -macTrace ON

 #  Create the specified number of nodes [$opt(nn)] and attach them
 #  to the channel.

 for {set i 0} {$i = $opt(nn) } {incr i} {
   set node_($i) [$ns_ node $i]
   $node_($i) random-motion 0  ;# disable random motion
 $god_ new_node $node_($i)
 }

 #
 # Scennario File
 #

 $node_(0) set X_ 949.00
 $node_(0) set Y_ 385.00
 $node_(0) set Z_ 0.0
 $node_(1) set X_ 1635.91
 $node_(1) set Y_ 662.36
 $node_(1) set Z_ 0.0
 $node_(2) set X_ 1459.13
 $node_(2) set Y_ 139.45
 $node_(2) set Z_ 0.0
 $node_(3) set X_ 280.60
 $node_(3) set Y_ 697.29
 $node_(3) set Z_ 0.0
 $node_(4) set X_ 1861.14
 $node_(4) set Y_ 214.13
 $node_(4) set Z_ 0.0
 $node_(5) set X_ 1736.59
 $node_(5) set Y_ 582.57
 $node_(5) set Z_ 0.0
 $node_(6) set X_ 1005.10
 $node_(6) set Y_ 58.01
 $node_(6) set Z_ 0.0
 $node_(7) set X_ 

[ns] [Fwd: Ad Hoc in Point-to-Multipoint with CBR]

2006-07-28 Thread eoliveira

 Original Message 
Subject: Ad Hoc in Point-to-Multipoint with CBR
From:[EMAIL PROTECTED]
Date:Fri, July 28, 2006 10:31 am
To:  ns-users@isi.edu
--

Hello,

I am working with AODV, DSDV and DSR in point-to-multipoint and
multipoint-to-point scenario with 11 nodes.

In the multipoint-to-point scenario, the senders starts a CBR traffic to
the receiver with 1 second interval and, after 11 seconds, as expected,
there are 10 simultaneous flows.

The problem occurs in the point-to-multipoint scenario. The sender starts
a CBR traffic to all receivers with 1 second interval, so after 11
seconds, there supposed to be 10 flows from the sender to the receivers,
but in fact, there are only 3 simultaneous flows. Does anyone know the
reason?

I am appending a shell script file and the TCL file.

Thanks in advance.

Etienne Oliveira.

Shell Script
--
ns DSR-11n-1s-10r.tcl
for i in 1 2 3 4 5 6 7 8 9 10
do
a=`grep _${i}_ AGT DSR-11n-1s-10r.tr | grep ^r | grep cbr | wc -l`
at=`grep _${i}_ AGT DSR-11n-1s-10r.tr | grep ^r | grep cbr 200 |
tail -1 | cut -d  -f2`
echo  _${i}_ -- AGT=$a  ends in $at
done
--


TCL FILE
--
set val(chan)   Channel/WirelessChannel
set val(prop)   Propagation/TwoRayGround
set val(netif)  Phy/WirelessPhy
set val(mac)Mac/802_11
set val(ifq)CMUPriQueue
set val(ll) LL
set val(ant)Antenna/OmniAntenna
set val(x)  670 ;# X dimension of the topography
set val(y)  670 ;# Y dimension of the topography
set val(ifqlen) 50  ;# max packet in ifq
set val(nn) 11  ;# number of nodes - 1sender - 10receivers
set val(seed)   0.0
set val(stop)   40  ;# simulation time
set val(tr) DSR-11n-1s-10r.tr ;# trace file

set val(adhocRouting)   DSR ;# protocol for ad-hoc network
set val(receivers)  10  ;# receivers

# =
# Main Program
# ==

#
# Initialize Global Variables
#

# set date rate

$val(mac) set dataRate_ 11Mb
$val(mac) set basicRate_ 11Mb

# ==
# Main Program
# =

#
# Initialize Global Variables
#

set ns_ [new Simulator]
set topo[new Topography]

set tracefd [open $val(tr) w]
$ns_ trace-all $tracefd

$topo load_flatgrid $val(x) $val(y)
set god_ [create-god $val(nn)]

#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) \
 -channel [new $val(chan)] \
 -topoInstance $topo \
 -agentTrace ON \
 -routerTrace OFF \
 -macTrace ON \
 -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 initial position - Scennario File
#

$node_(0) set X_ 250.00
$node_(0) set Y_ 250.00
$node_(0) set Z_ 0.0
$node_(1) set X_ 420.09
$node_(1) set Y_ 197.19
$node_(1) set Z_ 0.0
$node_(2) set X_ 391.55
$node_(2) set Y_ 399.22
$node_(2) set Z_ 0.0
$node_(3) set X_ 355.82
$node_(3) set Y_ 198.78
$node_(3) set Z_ 0.0
$node_(4) set X_ 267.61
$node_(4) set Y_ 284.11
$node_(4) set Z_ 0.0
$node_(5) set X_ 238.89
$node_(5) set Y_ 276.98
$node_(5) set Z_ 0.0
$node_(6) set X_ 238.70
$node_(6) set Y_ 214.44
$node_(6) set Z_ 0.0
$node_(7) set X_ 282.39
$node_(7) set Y_ 256.70
$node_(7) set Z_ 0.0
$node_(8) set X_ 376.11
$node_(8) set Y_ 358.10
$node_(8) set Z_ 0.0
$node_(9) set X_ 317.86
$node_(9) set Y_ 358.65
$node_(9) set Z_ 0.0
$node_(10) set X_ 70.80
$node_(10) set Y_ 303.48
$node_(10) set Z_ 0.0

#
# Define traffic model and startup and shutdown node (connection pattern)
#

# (1) one sender
for {set i 1} {$i = $val(receivers) } {incr i} {
set udp_($i) [new Agent/UDP]
$ns_ attach-agent $node_(0) $udp_($i)
set cbr_($i) [new Application/Traffic/CBR]
$cbr_($i) attach-agent $udp_($i)
$udp_($i) set packetSize_ 200
$udp_($i) set rate_ 150Kb

set null_($i) [new Agent/Null]
$ns_ attach-agent $node_($i)