Bug#1009719: ncu hard fail on stable, workaround available on bullseye+sid
Christian Kastner
ckk at debian.org
Fri Apr 15 11:56:34 BST 2022
Package: nsight-compute
Version: 2020.3.1.4~11.2.2-3+deb11u1
Severity: important
nvprof has been deprecated, and Nvidia recommends to switch to
nsight-compute and nsight-systems. This is necessary for Ampere cards,
because nvprof expressly does not support them.
However, ncu (from nsight-compute) does not work on bullseye and newer,
with a user-configurable workaround on bookworm and above.
The issue seems to be the location of the "sections" folder: the ncu
binary expects it at:
/usr/lib/nsight-compute/<triplet>/sections
whereas it is installed in:
/usr/lib/nsight-compute/sections
Adding a symlink from /usr/lib/nsight-compute/<triplet>/sections to the
actual install location fixes the issue.
Steps to reproduce
==================
Given the attached typical example for a CUDA program and compiling it with,
$ nvcc -o MatAdd MatAdd.cu
using ncu (as root, to avoid ERR_NVGPUCTRPERM) on bullseye produces the
following warning:
# ncu MatAdd
==ERROR== Could not deploy stock section files to "/home/username/Documents/NVIDIA Nsight Compute/2020.3.1/Sections".
This error is misleading, as it has nothing to do with creating the
mentioned directory.
There's an option --section-folder which can be used to specify the
location of that folder. Oddly, this is ineffective on bullseye,
# ncu --section-folder /usr/lib/nsight-compute/sections MatAdd
==ERROR== Could not deploy stock section files to "/home/username/Documents/NVIDIA Nsight Compute/2020.3.1/Sections".
but it does work on bookworm and above, where nsight-compute is
newer (carets are mine):
# ncu --section-folder /usr/lib/nsight-compute/sections MatAdd
==WARNING== Could not deploy stock section files to "/home/username/Documents/NVIDIA Nsight Compute/2021.2.2/Sections".
==WARNING== Using "/usr/lib/x86_64-linux-gnu/nsight-compute/target/linux-desktop-glibc_2_11_3-x64/../../sections" instead.
^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
==WARNING== See https://docs.nvidia.com/nsight-compute/ProfilingGuide/index.html#faq.
==PROF== Connected to process 5861 (/home/username/MatAdd)
==PROF== Profiling "MatAdd" - 1: 0%....50%....100% - 8 passes
==PROF== Disconnected from process 5861
The warning in the bookworm version already points to the issue
mentioned above: "sections" is expected in the path including the
<triplet>.
Adding a symlink fixes the issue on all systems, and also gets
rid of all errors/warnings:
# ln -s /usr/lib/nsight-compute/sections /usr/lib/x86_64-linux-gnu/nsight-compute/sections
# ncu MatAdd
==PROF== Connected to process 7292 (/home/username/MatAdd)
==PROF== Profiling "MatAdd" - 1: 0%....50%....100% - 8 passes
==PROF== Disconnected from process 7292
...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MatAdd.cu
Type: application/cu-seeme
Size: 1117 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-nvidia-devel/attachments/20220415/3d60fcfa/attachment.cu>
More information about the pkg-nvidia-devel
mailing list