LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-24-2012, 06:19 AM   #1
deVacto
LQ Newbie
 
Registered: Aug 2012
Posts: 19

Rep: Reputation: Disabled
Floating point exception after run TCL script ns2


hi guys, sorry if i make this question in the wrong section
i got project lte in ns2, after i compile tcl script i got
----------
Code:
All the UEs are empty in DLS1Queue!
All the UEs are empty in DLS1Queue!
Floating point exception
----------
so i dont get the output, this is my tcl script

-------------
Code:
set ns [new Simulator -multicast on]

set f [open out.tr w]
$ns trace-all $f
set nf [open out.nam w]
$ns namtrace-all $nf

#set number 10
set numberClass0 2 
set numberClass1 3 
set numberClass2 9 
set numberClass3 1 
set number [expr {$numberClass0 + $numberClass1 + $numberClass2 + $numberClass3}] 
# qos_ means whether classfication/scheduling mechanism is used 
Queue/LTEQueue set qos_ true 
#Queue/LTEQueue set qos_ false 
# flow_control_ is used in the model phase 
Queue/LTEQueue set flow_control_ false 

set eNB [$ns node]
set aGW [$ns node]
set server [$ns node]


for { set i 0} {$i < $number} {incr i} {

set UE($i) [$ns node]
}
for { set i 0} {$i < $number} {incr i} {
$ns simplex-link $UE($i) $eNB 500Mb 2ms LTEQueue/ULAirQueue
$ns simplex-link $eNB $UE($i) 1Gb 2ms LTEQueue/DLAirQueue

}

$ns simplex-link $eNB $aGW 5Gb 10ms LTEQueue/ULS1Queue
$ns simplex-link $aGW $eNB 5Gb 10ms LTEQueue/DLS1Queue

$ns duplex-link $aGW $server 10Gb 100ms DropTail

set mproto DM
set mrthandle [$ns mrtproto $mproto {}]
set group [Node allocaddr]

for { set i 0 } { $i < $number } {incr i} {
set s0($i) [new Session/RTP]
set s1($i) [new Session/RTP]
$s0($i) session_bw 12.2kb/s
$s1($i) session_bw 12.2kb/s
$s0($i) attach-node $UE($i)
$s1($i) attach-node $server
$ns at 0.7 "$s0($i) join-group $group"
$ns at 0.8 "$s0($i) start"
$ns at 0.9 "$s0($i) transmit 12.2kb/s"
$ns at 1.0 "$s1($i) join-group $group"
$ns at 1.1 "$s1($i) start"
$ns at 1.2 "$s1($i) transmit 12.2kb/s"
}

for { set i 0} {$i < $number} {incr i} {
set udp($i) [new Agent/UDP]
$ns attach-agent $server $udp($i)
set null($i) [new Agent/Null]
$ns attach-agent $UE($i) $null($i)
$ns connect $udp($i) $null($i)
$udp($i) set class_ 1

set cbr($i) [new Application/Traffic/CBR]
$cbr($i) attach-agent $udp($i)
$cbr($i) set packetSize_ 1000
$cbr($i) set rate_ 0.01Mb
$cbr($i) set random_ false
$ns at 1.4 "$cbr($i) start"
}

# step 3.3 define the interactive traffic
$ns rtproto Session
set log [open "http.log" w]

# Care must be taken to make sure that every client sees the same set of pages as the servers to which they are attached.
set pgp [new PagePool/Math]
set tmp [new RandomVariable/Constant] ;# Size generator
$tmp set val_ 10240 ;# average page size
$pgp ranvar-size $tmp
set tmp [new RandomVariable/Exponential] ;# Age generator
$tmp set avg_ 4 ;# average page age
$pgp ranvar-age $tmp

set s [new Http/Server $ns $server]
$s set-page-generator $pgp
$s log $log

set cache [new Http/Cache $ns $aGW]
$cache log $log

for { set i 0} {$i<$number} {incr i} {
set c($i) [new Http/Client $ns $UE($i)]
set ctmp($i) [new RandomVariable/Exponential] ;# Poisson process
$ctmp($i) set avg_ 1 ;# average request interval
$c($i) set-interval-generator $ctmp($i)
$c($i) set-page-generator $pgp
$c($i) log $log
}

$ns at 0.4 "start-connection"
proc start-connection {} {
global ns s cache c number

$cache connect $s
for { set i 0} {$i<$number} {incr i} {
$c($i) connect $cache
$c($i) start-session $cache $s
}
}

for { set i 0} {$i < $number} {incr i} {
set tcp($i) [new Agent/TCP]
$ns attach-agent $server $tcp($i)
set sink($i) [new Agent/TCPSink]
$ns attach-agent $UE($i) $sink($i)
$ns connect $tcp($i) $sink($i)
$tcp($i) set class_ 3
$tcp($i) set packetSize_ 0.5M

set ftp($i) [new Application/FTP]
$ftp($i) attach-agent $tcp($i)
$ns at 3.4 "$ftp($i) start"
}

$ns at 30 "finish"
proc finish {} {
global ns f nf
$ns flush-trace
close $f
close $nf
#exec nam out.nam &
exit 0
}

$ns run
-------------------
thx to eyana this script i got, when i on the qos
i got the eror
Code:
All the UEs are empty in DLS1Queue!
All the UEs are empty in DLS1Queue!
Floating point exception
the code is Queue/LTEQueue set qos_ true
i got those error, but when i off it i got the output
i want to compare qos when it off and on

tq, for reading my problem
i hope anyone know to solve it
 
Old 10-24-2012, 07:33 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,656

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
Using the Slackware 13.37 package lte-ns-2.33-S1337.i486.txz :
$ ns-lte eyana.tcl : No errors, nam opens.
http://www.linuxquestions.org/questi...6&d=1332803695
Ref. http://www.linuxquestions.org/questi...33-a-936417/#5

The code from post #1 :
$ ns-lte lte-deVacto.tcl : No "Floating point exception".
Continues with a lot of "All the UEs are empty in DLS1Queue!"
.. for one minute.
The files out.nam (101 MB), out.tr (43 MB) are created.

Note : Not yet tested on a 32bits Slackware, will do that in a couple of days.


.
 
1 members found this post helpful.
Old 10-24-2012, 10:38 AM   #3
deVacto
LQ Newbie
 
Registered: Aug 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
#2
tq knudfl it worked with ns-lte i dont know why
but nam and my .tr got different size from yours, but i think it not problem right?
and can u explain to me why in DLS1Queue all UEs are empty, how to fill it?? or it is not problem?

tq very much again
 
Old 10-24-2012, 11:33 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,656

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
Quote:
.. but nam and my .tr got different size from yours,
but i think it not problem, right ?
The sizes could be be different because I used another OS.
( PCLinuxOS-2012.08 ). Doesn't matter.

"the UEs are empty in DLS1Queue" : I don't know, what's about.
? May be you can edit your code, and get it right ?

.
 
Old 10-28-2012, 01:22 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,656

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
Ref. post # 2

Your code works OK in Slackware 13.37, 32bits.

$ ns-lte lte-deVacto.tcl
The files out.nam (101.3 MB), out.tr (43.4 MB) are created.
The exact same size as the first test, post # 2.

.

Last edited by knudfl; 10-28-2012 at 09:47 PM.
 
Old 10-28-2012, 06:18 PM   #6
deVacto
LQ Newbie
 
Registered: Aug 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
$5
you mean in this post http://www.linuxquestions.org/questi...3/#post4816260
but in my case it not work, when i change "set numberClass0 x" the x size is other than 0 it got that error
how to fix it?

why posting in this thread ?
 
Old 10-28-2012, 09:49 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,656

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
Post # 5 is a follow up on post # 2.



The tcl file name in your other thread is ltez.tcl,
and I don't know, why it isn't working.



.

Last edited by knudfl; 10-28-2012 at 09:58 PM.
 
Old 10-28-2012, 11:56 PM   #8
deVacto
LQ Newbie
 
Registered: Aug 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
#7
so you got the same error and dont know why too?
ok tq for your help again knudfl

if anyone know the problem in my thread in post #6,
please let me know
 
  


Reply

Tags
lte, ns2


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
Floating point exception vetri83 Linux - Server 2 05-04-2012 04:41 AM
Floating point exception in running maodv in ns2.34 glitter Linux - Newbie 0 08-21-2011 01:29 AM
floating point exception? birjodh Linux - General 1 06-10-2007 03:11 AM
Floating point exception compiling on Mandriva, run on Debian digdas Linux - Distributions 3 04-24-2007 11:18 AM
Floating point exception hemk76 Linux - Software 1 05-06-2005 11:49 PM


All times are GMT -5. The time now is 06:01 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration