LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-08-2013, 05:33 AM   #1
ines8989
Member
 
Registered: Mar 2013
Posts: 62

Rep: Reputation: Disabled
Floating point exception error while executing tcl with ns2


Hi . I'am in ns2.35 working. i have tested this tcl for tfrc but while executing it i have this message and i have an empty trace file:
iness@iness-VirtualBox ~/ns-allinone-2.35/bin/Exemple/dccp $ ns tfrc.tcl
Floating point exception
Please some one may help me find the source of the problem .My code is this:
set ns [new Simulator]
set testTime 102.0

Agent/TCP set window_ 64


set C [lindex $argv 0]
set tcpver [lindex $argv 1]

# Create a nam trace datafile.
#set namfile [open out.nam w]
#$ns namtrace-all $namfile

#open the trace file
set tracefile1 [open out_tfrc.tr w]
$ns trace-all $tracefile1

# Set up the network topology shown at the top of this file:
set s1 [$ns node]
set s2 [$ns node]
set e1 [$ns node]
set e2 [$ns node]
set dest1 [$ns node]
set dest2 [$ns node]

$ns duplex-link $s1 $e1 10Mb 0ms DropTail
$ns duplex-link $s2 $e1 10Mb 0ms DropTail

$ns duplex-link $e1 $e2 $C.Mb 15ms DropTail

$ns duplex-link $e2 $dest1 10Mb 0ms DropTail
$ns duplex-link $e2 $dest2 10Mb 0ms DropTail

# TFRC
set ftp2 [$ns create-connection TFRC $s2 TFRCSink $dest2 0]

# TCP
if {$tcpver == "Sack"} {
set tcp1 [new Agent/TCP/FullTcp/Sack]
set ftp1 [new Application/FTP]
$ftp1 attach-agent $tcp1
set sink [new Agent/TCP/FullTcp/Sack]
$ns attach-agent $s1 $tcp1
$ns attach-agent $dest1 $sink
#$tcp1 set window_ $win
#$sink set window_ $win
$tcp1 set fid_ 1
$sink set fid_ 1
$ns connect $tcp1 $sink
# set up TCP-level connections
$sink listen ; # will figure out who its peer is
} else {
set agent(1) [new Agent/TCP/Newreno]
$ns attach-agent $s1 $agent(1)
set ftp1 [new Application/FTP]
$ftp1 attach-agent $agent(1)
set agent(2) [new Agent/TCPSink]
$ns attach-agent $dest1 $agent(2)
$ns connect $agent(1) $agent(2)
}

proc finish {} {
global ns namfile tracefile1 C tcpver

$ns flush-trace
close $tracefile1
exec $file $C $tcpver
#Execute nam on the trace file
exec nam out.nam &
exit 0
}

$ns at 0.3 "$ftp1 start"
$ns at 20.0 "$ftp2 start"
$ns at [expr $testTime - 20] "$ftp2 stop"
$ns at $testTime "$ftp1 stop"
$ns at [expr $testTime + 1.0] "finish"

$ns run
Thanks for you
 
  


Reply


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
[SOLVED] FLoating Point Exception Problem when running RTP_v2.tcl in NS@.33 in Ubuntu 11.10 Wayne Frederick Linux - Newbie 2 03-07-2013 08:57 AM
[SOLVED] Floating point exception after run TCL script ns2 deVacto Linux - Newbie 7 10-28-2012 11:56 PM
Floating point exception in running maodv in ns2.34 glitter Linux - Newbie 0 08-21-2011 01:29 AM
Floating point exception error mathb Linux - Newbie 5 05-27-2011 03:36 AM
LILO 'Floating point Exception' error? fallout Slackware 17 07-27-2006 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:38 AM.

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
Open Source Consulting | Domain Registration