Issues with the assessment in the [Getting Started with Accelerated Computing in CUDA C/C++] course

Hello, community,

I’m currently taking the Getting Started with Accelerated Computing in CUDA C/C++ course, and I’ve encountered an issue during the assessment part.

I’m facing some difficulties, or perhaps I’m missing something important. In that case, I would appreciate it if someone could point me in the right direction and help me understand the mistake I might be making.

Here’s a detailed description of the issue:

  1. I save the 09-nbody/01-nbody.cu file with my solution proposal.
  2. I compile it with the given command on the Notebook !nvcc -std=c++11 -o nbody 09-nbody/01-nbody.cu
  3. I run the cell with the run_assessment() instruction, then I receive the following message:
Running nbody simulator with 4096 bodies
----------------------------------------

Application should run faster than 0.9s
Your application ran in: 0.0772s
Your application reports  totalTime 0.000
642.805 Billion Interactions / second

Your results are not correct

I would like to be guided into the acceptance criteria for this final project. Since I believe 0.9s is greater than 0.0772s. Maybe I am failing in other parts of the assessment that are not mentioned here.

Here are a couple of more evidences of my proposal:

Best regards,
Federico

Just to clarify, the messatge Your application reports totalTime 0.000 is due to

I only put 3 characters in

printf("totalTime %0.3f\n", totalTime);

Maybe something else is wrong? This is a picture of my kernels but running on my HOST wich device is a 3060 RTX 12Gb.

Hello,

Welcome to the forums. This issue will require someone for the DLI team to assist. I have forwarded this topic to the team for investigation.

Tom

Hello Tom,

Thank you for the response. I’m happy to provide any additional information that might help the DLI team with it. I appreciate your time and assistance.

Joel

1 Like

Hi @federicocusot, thanks so much for reaching out for support.

The message you are seeing, specifically Your results are not correct indicates that the calculations resulting from your code, specifically for the value p are not accurate.

The CPU-only starter file 01-nbody.cu results in the correct values for p, so double check that any refactoring you have done to move the work to the GPU is continuing to calculate the correct p.

After you’ve looked at it a bit more, and if you’re still stuck, please feel free to email me your assessment code and I can take a more careful look at it.

Best,

1 Like

Yup, the issue was indeed related to the p values and the usage of the cudaMallocManaged and cudaMemPrefetchAsync functions. I’ll avoid going into further details to prevent spoilers.

Thank you for your support!!!

Best regards.

Federico J. V.

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.