Setting Time Resolution to Seconds or MilliSeconds lead to Floating Point Error SIGFPE

54 views
Skip to first unread message

Boong Baang

unread,
Feb 9, 2020, 9:34:53 PM2/9/20
to ns-3-users
The   
ns3::Time::SetResolution(Time::MS);

command only works with NS (NanoSeconds). On running with degugger, I get the following output:
Program received signal SIGFPE, Arithmetic exception.
0x00007ffff6bbf53f in ns3::operator/ (lhs=..., rhs=...) at ./ns3/nstime.h:879
879   int64_t res = lhs.m_data / rhs.m_data;

I looked into the file (line 879 of nstime.h) pointed by it, but couldn't locate the error. I am attaching the program to reproduce the error.

When setting the resolution to NanoSeconds using
ns3::Time::SetResolution(Time::NS);

the error goes away.

Boong Baang

unread,
Feb 9, 2020, 9:36:37 PM2/9/20
to ns-3-users
the file is here

mod_SUMO_new.cc
mobility_circular_2.tcl
Reply all
Reply to author
Forward
0 new messages