Increased number of us after more than 5 errors

34 views
Skip to first unread message

Chi Wei Shen

unread,
Sep 25, 2017, 2:30:35 AM9/25/17
to ns-3-users
Attach is my code, I run the program when the number of ue 4 are able to flow there, but as long as more than 5 to the wrong, is this there is a problem?
wifi_exp.cc

Chi Wei Shen

unread,
Sep 25, 2017, 2:34:55 AM9/25/17
to ns-3-users

Over the 5 ue there will be an error,like the image



Chi Wei Shen於 2017年9月25日星期一 UTC+8下午2時30分35秒寫道:

Konstantinos

unread,
Sep 25, 2017, 7:36:59 AM9/25/17
to ns-3-users
Hi,

the SIGFPE error you get is related to an arithmetic error, usually divizion by zero. 
Check your calculations for FlowMonitor statistics, and take proper care when you divide variables.

Regards
K

Chi Wei Shen

unread,
Sep 25, 2017, 10:44:18 AM9/25/17
to ns-3-users
Thank you reply!!
I use gdb to debug,the wrong point in the picture
but i don't know wrong for where...

This code is rewrite from third.cc,so is between sta and ap connect?
or other problems? 

Konstantinos於 2017年9月25日星期一 UTC+8下午7時36分59秒寫道:
bug.png

Konstantinos

unread,
Sep 25, 2017, 10:50:27 AM9/25/17
to ns-3-users
Hi,

As I already mentioned, there is an arithmetic error. 
Notice your Flow #4, the Rx Packets is zero. Do you divide with that varialbe (rhs)?

Regards

Chi Wei Shen

unread,
Sep 25, 2017, 11:32:28 AM9/25/17
to ns-3-users
No,but trace the code i don't understand wrong for where.
If Flow #4 Rx Packets is zero, that there are several values are wrong?
Resulting in flow motion can not be calculated.
Maybe dataRate?phyRate?Ipv4Address or wifi Spectrum?

Konstantinos

unread,
Sep 25, 2017, 11:40:56 AM9/25/17
to ns-3-users
I honestly do not understand anything from what you have writen. 
Try to explain it in more details and simpler words, since English is not your native language.

I can not say why Rx Packets are zero, or if that value is correct/expected etc. 
You only send 3 packets in every flow, and in the rest flows, only one is received. 
It could be the case that that single packet is not received yet.
 
The fact is that you do a calculation and you divide with zero, hence the error

Regards
K

Chi Wei Shen

unread,
Sep 25, 2017, 12:18:00 PM9/25/17
to ns-3-users
Thank you so patient response,thank you so much!!

The attachment's picture has fourth UE (UE Number1~UE Number4) generated results,
each flow has Tx/Rx Packets、Tx/Rx Bytes、Delay time.

But when I add the fifth user, it will produce the problem of calculation.
So i check the code,maybe is a problem with wifi phy Rate or Ip Address?
wifi1.png
wifi2.png

Konstantinos

unread,
Sep 26, 2017, 10:05:47 AM9/26/17
to ns-3-users
As I said several times above, from the information you have provided, the problem you get is due to the fact that you are doing a division with zero.
It looks like the fifth UE does not receive any packet, hence some of the variables are zero (e.g. rx packet, delay etc) 

Chi Wei Shen

unread,
Sep 26, 2017, 10:48:07 AM9/26/17
to ns-3-users
Thank you for the answer, I finally solved!!
Reply all
Reply to author
Forward
0 new messages