Assessment crashes in [Getting Started with Accelerated Computing in CUDA C/C+]

Good day,

I’m currently taking the Getting Started with Accelerated Computing in CUDA C/C++ course. When accelerating the final assessment task 01-nbody.cu, it appears to run properly for the case with 4096 bodies, but fails in the case with 65536 bodies. The screen capture is shown below. It appears to crash in the 65536-body case because it is trying to compare the results against the answers for the 4096-body case.

Just wondering if this is a known issue, or I can get some assistance with this.

Thanks,
Mike

Running nbody simulator with 4096 bodies

Application should run faster than 0.9s
Your application ran in: 0.3911s
Your application reports
Your results are correct

Running nbody simulator with 65536 bodies

Application should run faster than 1.3s
Your application ran in: 0.3843s
Your application reports

ValueError Traceback (most recent call last)
Cell In[24], line 1
----> 1 run_assessment()

File /dli/assessment/notebook_helpers/assessment.py:90, in run_assessment()
88 if passes_with_n_of(‘11’) is False:
89 return
—> 90 if passes_with_n_of(‘15’) is False:
91 return
92 open(‘/dli/assessment_results/PASSED’, ‘w+’)

File /dli/assessment/notebook_helpers/assessment.py:77, in passes_with_n_of(n)
73 return False
75 print('Your application reports ', ops_per_second)
—> 77 correct = compare_files(solution, student_output)
78 if correct:
79 print(‘Your results are correct\n’)

File /dli/assessment/notebook_helpers/assessment.py:39, in compare_files(a, b)
36 file_a = np.fromfile(a, dtype=np.float32)
37 file_b = np.fromfile(b, dtype=np.float32)
—> 39 c = np.abs(file_a - file_b)
40 d = c[np.where(c > 1)]
42 return (len(d)/len(file_a)) < .01

ValueError: operands could not be broadcast together with shapes (393216,) (24576,)

I just wanted to report that I was able to resolve this. It was possibly due to concurrent memory accesses occurring. But I found it strange the way to software was able to run correctly in one instance.

1 Like