[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: no target



Randa,

The problem is that when 'Node expandaddr' is called, the ns address
space is extended to 32 bits and the multicast address starts from
0x80000000 (not 0x8001).

Try replace:
set group	0x8001

with:
set group [Node allocaddr]

'Node allocaddr' should suggest the appropriate multicast group address
according to the specified address space and format.

Cheers,
-Polly

On Sat, 20 Feb 1999, Randa wrote:

> Dear Polly,
> I ran the script using 20 nodes and 10 RTP agents but I got the same problem 
> "no target for slot".
> I had in my code "Node expnadaddr" ,then when I took it out,  I had no
> problem.
> But, I have to run scripts with large number of nodes. I have a script in which I have 200 nodes and have 100 RTP agents. If I do not have "Node expandaddr", thsi is what I get:
> 
> Number of nodes exceeds node-field-size of 7 bits
>     while executing
> "error "Number of nodes exceeds node-field-size of $nodebits_ bits""
>     (procedure "_o3" line 4)
>     (Simulator check-node-num line 4)
>     invoked from within
> "$self check-node-num"
>     (procedure "_o3" line 14)
>     (Simulator node line 14)
>     invoked from within
> "$ns node"
>     (procedure "create-topology" line 10)
>     invoked from within
> "create-topology 1.5Mb"
>     (file "rtp100_200.tcl" line 435)
> 
> Also, another question, if I want to use nodes or RTP agents more than 256 then 
> should I use MultiSim. Is this the only command I add in my script or should
> I add others.
> 
> Here is the script rtp10_20.tcl (10 RTP agents and 20 modes)
> 
> set ns [new Simulator]
> Simulator set EnableMcast_ 1
> Simulator set NumberInterfaces_ 1
> Node expandaddr
> 
> set MANAGER         0
> set AGGREGATOR      1
> set CHILD           2
> set group	0x8001	
> ns-random 	0
> 
> set sessionSize 10
> set numNodes 20 
> #------------------------------------------------------------------------------
> proc finish {} {
> 	global ns f
> 	$ns flush-trace
> 	close $f
> 	exit 0
> }
> #------------------------------------------------------------------------------
> # from ssm-srm.tcl script 
> proc pickmember {} {
> 	global srtp
> 	global numNodes
> 
> 	set i [expr [ns-random] % $numNodes]
> 	while {[info exists srtp($i)]} {
> 		incr i
> 		set i [expr $i % $numNodes]
> 	}
> 	puts "member picked: $i"
> 	return $i
> }
> #------------------------------------------------------------------------------
> # from ssm-srm.tcl script 
> proc picksource {} {
> 	global srtp
> 	global numNodes
> 
> 	set i 0
> 	set i [expr [ns-random] % $numNodes]
> 	while {![info exists srtp($i)]} {
> 		incr i
> 		set i [expr $i % $numNodes]
> 	}
> 	puts "source picked: $i"
> 	return $i
> }
> #------------------------------------------------------------------------------
> # Generated by sgb2ns, created by Polly Huang
> # GRAPH (#nodes #edges id uu vv ww xx yy zz):
> # 20 42 transtub(0,2,0,0,{1,40,3,0.500,1.000,0.000},{4,20,3,0.600,1.000,0.000},{2,34,3,0.420,1.000,0.000}) 40 2 2 0
> proc create-topology { linkBW} {
> 	global ns n numNodes
> 
> 	set verbose 1
> 
> 	if {$verbose} { 
> 		puts "creating nodes..." 
> 	}
> 	for {set i 0} {$i < $numNodes} {incr i} {
> 		set n($i) [$ns node]
> 	}
> 
> 	# EDGES (from-node to-node length a b):
> 	if {$verbose} { 
> 		puts -nonewline "Creating links 0..."
> 		flush stdout 
> 	}
> 	$ns duplex-link-of-interfaces $n(0) $n(5) $linkBW 240ms DropTail
> 	$ns duplex-link-of-interfaces $n(0) $n(2) $linkBW 20ms DropTail
> 	$ns duplex-link-of-interfaces $n(0) $n(3) $linkBW 210ms DropTail
> 	$ns duplex-link-of-interfaces $n(1) $n(7) $linkBW 270ms DropTail
> 	$ns duplex-link-of-interfaces $n(1) $n(2) $linkBW 70ms DropTail
> 	$ns duplex-link-of-interfaces $n(1) $n(3) $linkBW 190ms DropTail
> 	$ns duplex-link-of-interfaces $n(2) $n(15) $linkBW 290ms DropTail
> 	$ns duplex-link-of-interfaces $n(2) $n(12) $linkBW 290ms DropTail
> 	$ns duplex-link-of-interfaces $n(2) $n(10) $linkBW 310ms DropTail
> 	$ns duplex-link-of-interfaces $n(2) $n(8) $linkBW 250ms DropTail
> 	if {$verbose} { puts -nonewline "10..."; flush stdout }
> 	$ns duplex-link-of-interfaces $n(2) $n(3) $linkBW 230ms DropTail
> 	$ns duplex-link-of-interfaces $n(3) $n(19) $linkBW 140ms DropTail
> 	$ns duplex-link-of-interfaces $n(3) $n(17) $linkBW 50ms DropTail
> 	$ns duplex-link-of-interfaces $n(4) $n(5) $linkBW 30ms DropTail
> 	$ns duplex-link-of-interfaces $n(6) $n(7) $linkBW 80ms DropTail
> 	$ns duplex-link-of-interfaces $n(8) $n(9) $linkBW 180ms DropTail
> 	$ns duplex-link-of-interfaces $n(10) $n(11) $linkBW 110ms DropTail
> 	$ns duplex-link-of-interfaces $n(12) $n(13) $linkBW 220ms DropTail
> 	$ns duplex-link-of-interfaces $n(13) $n(14) $linkBW 130ms DropTail
> 	$ns duplex-link-of-interfaces $n(16) $n(17) $linkBW 210ms DropTail
> 	if {$verbose} { puts -nonewline "20..."; flush stdout }
> 	$ns duplex-link-of-interfaces $n(16) $n(18) $linkBW 160ms DropTail
> 
> 	if {$verbose} { 
> 		puts -nonewline "21..."
> 		flush stdout
> 		puts "starting"
> 	}
> 	return $numNodes 
> }
> #------------------------------------------------------------------------------
> set f [open out.tr w]
> $ns trace-all $f
> 
> create-topology 1.5Mb
> 
> set mproto DM
> set mrthandle [$ns mrtproto $mproto {}]
> 
> for {set members 0} {$members < $sessionSize} {incr members} {
> 	set i [pickmember]
> 	set srtp($i) [new Session/RTP]
> 	$srtp($i) session_bw 400kb/s 
> 	$srtp($i) attach-node $n($i)
> }
> 
> set i 0
> foreach k [array names srtp] {
> 	puts "K = $k"
> 	set time [expr double(([ns-random] % 10000000) + 1) / 1e7 * 10]
> 	puts "time: $time"
> 	$ns at $time "$srtp($k) join-group $group"
> 	$ns at [expr $time + 0.1] "$srtp($k) start"
> 	if { $i == 10 } {
> 		puts "Source == $k"
> 		$ns at [expr $time+0.2] "$srtp($k) transmit 400kb/s"
> 	}
> 	incr i
> }
> 
> $ns at 12.0 "finish"
> $ns run
> 
> Thanks a lot Polly,
> Randa
>