Cannot see source of some kernels

I use Nsight Compute to profile the kernels of my Fortran code accelerated with OpenACC. I have troubles to see the source code in the Source page.

If I compile with the flag -gpu=lineinfo, I can only view the SASS instructions, without sources.
If I compile with debug flags -g -O0, I can view the source for the first kernel of each file. Example: one file contains a subroutine with two kernels, the source code is displayed correctly for the first kernel, but not for the second one. However for some files, not even the first kernel is displayed, so I am confused.

As a side note, the program is compiled and run on a Linux headless server, then data are transferred and analysed on a Windows machine. I have a local copy of the code, but I am not prompted to resolves any missing file.

Here the capture of the first kernel for a test program:

Here the capture for the second kernel, the source panel is empty:

What should I do?


NVHPC version on Linux server: 21.2-0
NCU version used to generate the report on Linux server: 2020.3.0.0
NCU version used to display the report on Windows machine: 2021.3.0.0

I recommend that you use a newer version of the ncu CLI to generate the report and that you use the --import-source option while creating the report, assuming that the sources are available on that machine. Ideally, you would use version 2021.3.

If Nsight Compute does not open a high-level CUDA view for your SASS then your binary does not contain the necessary lineinfo information. You can check if you binary contains this information using e.g. the cuobjdump utility. If the information is present, you should see lines as below being reported.

/usr/local/cuda/bin/cuobjdump -elf app | grep line
.section .debug_line

Hi felix_dt, updating NVHPC to the latest version (21.7-0) updated NCU (2021.1.1.0) and solved the problem, thanks!

I was already using --import-source when invoking NCU.

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