ZeroDivisionError: float division by zero

Hi everyone. I come up with this error when I was trying to port this project to U50 and debugging the ‘vnx-benchmark-throughput.ipynb’. And the log info was attached below:

Traceback (most recent call last):
File “./test.py”, line 263, in
rx_tot_pkt, rx_thr, rx_time = ol_w1_tg.computeThroughputApp(‘rx’)
File “/home/user/xup_vitis_network_example/Notebooks/vnx_utils.py”, line 640, in computeThroughputApp
thr_bs = (tot_bytes * 8) / tot_time
ZeroDivisionError: float division by zero
Error in sys.excepthook:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/apport_python_hook.py”, line 72, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File “/usr/lib/python3/dist-packages/apport/init.py”, line 5, in
from apport.report import Report
File “/usr/lib/python3/dist-packages/apport/report.py”, line 32, in
import apport.fileutils
File “/usr/lib/python3/dist-packages/apport/fileutils.py”, line 12, in
import os, glob, subprocess, os.path, time, pwd, sys, requests_unixsocket
ModuleNotFoundError: No module named ‘requests_unixsocket’

Original exception was:
Traceback (most recent call last):
File “./test.py”, line 263, in
rx_tot_pkt, rx_thr, rx_time = ol_w1_tg.computeThroughputApp(‘rx’)
File “/home/user/xup_vitis_network_example/Notebooks/vnx_utils.py”, line 640, in computeThroughputApp
thr_bs = (tot_bytes * 8) / tot_time
ZeroDivisionError: float division by zero

I suggest that var ‘tot_time’ has a value of zero, but I still have no idea about the reasons.
Looking forward to your replys.

Hi,

What do you mean with porting? The design can be implemented without any change in the U50.

Can you please provide more information about your setup?

The error would indicate that packets are not being received in the second U50.

Mario

Hi Mario, thanks for your reply. I am sorry that my expression is not very accurate. I was just trying to run it on U50. I used ‘make all DEVICE= INTERFACE=0 DESIGN=benchmark’ command to generate ‘vnx_benchmark_if0.xclbin’.
This error occurs when I’m trying to run the second cell of Configure Application with aim to image. What’s even stranger is that I successfully ran it once and got the results of ‘sent’ ‘got’ data, etc. But I cannot reproduce this successful operation with no changes ever made.
Looking forward to your reply. If you need more info or details please tell me also as I’m not sure these info above are enough or not. Best.

1 Like

Hi,

This is not PYNQ related. Please open an issue in the GitHub repository, please use the template issue to provide the required information.

Mario

(post deleted by author)