Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 686738 - dev-util/nvidia-cuda-toolkit-10.1.105-r1: nvvp and nvprof are not functioning
Summary: dev-util/nvidia-cuda-toolkit-10.1.105-r1: nvvp and nvprof are not functioning
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-25 12:32 UTC by Yao
Modified: 2020-02-22 02:22 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
A patch that fixes the problem with nvprof (cuda-toolkit.patch,582 bytes, patch)
2019-11-27 14:59 UTC, Robert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yao 2019-05-25 12:32:19 UTC
I installed this package with
    USE="debugger doc profiler -eclipse"
and I have nvvp and nvprof in /opt/cuda/bin.

But there are two mistakes:
1. /opt/cuda/libnvvp/nvvp does not have executable attribute.
2. /opt/cuda/bin/nvprof is a wrapper that exec itself. Running this would spawn unlimited number of processes until system resource (in this case, argument length reached limit first) is depleted and fail.

Problem 1 is easily fixed with chmod +x

Problem 2 is caused (inside ebuild file) by 
    use profiler && \
        make_wrapper nvprof "${ecudadir}/bin/nvprof.bin" "." ${ecudadir}/lib64:${ecudadir}/lib"

The generated wrapper "nvvp" overrides the binary "nvvp" provided by nvidia. Maybe we could rename the binary nvvp to nvvp.bin before generating the wrapper.
Comment 1 Yao 2019-05-27 04:23:39 UTC
Just realized that some other binaries in the following folders are also missing the +x permission:
 /opt/cuda/NsightCompute-2019.1
 /opt/cuda/NsightCompute-2019.1/host/linux-desktop-glibc_2_11_3-x64
 /opt/cuda/NsightCompute-2019.1/target/linux-desktop-glibc_2_11_3-x64

I haven't done a full test but looks like /opt/cuda/NsightSystems-2018.3 also suffer from the same problem.

Some other files, though not needing +x permission, however, are with +x, e.g. EULA.txt, and some pdf docs.
Comment 2 Yao 2019-07-19 16:38:41 UTC
This problem persist in 10.1.168
Comment 3 Robert 2019-11-27 14:43:52 UTC
I have this same problem, and I can confirm the fix.
Comment 4 Robert 2019-11-27 14:59:47 UTC
Created attachment 597600 [details, diff]
A patch that fixes the problem with nvprof

The Nsight problem and nvvp problems seem to have gone away in newer versions of the ebuild.
Comment 5 Larry the Git Cow gentoo-dev 2020-02-16 13:35:26 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=750c970f8e3441f1379b862479c55636d731f3ec

commit 750c970f8e3441f1379b862479c55636d731f3ec
Author:     Robert Underwood <rr.underwood94@gmail.com>
AuthorDate: 2019-12-14 22:20:13 +0000
Commit:     Jason Zaman <perfinion@gentoo.org>
CommitDate: 2020-02-16 13:34:15 +0000

    dev-util/nvidia-cuda-toolkit: nvprof/nsight fix
    
    Previously, there were bugs in the ebuilds that prevented nsight and
    nvprof from being installed correctly.  For nvprof, a no longer needed
    wrapper was begin installed on top of it.  In the case of nsight, it was
    not setting the executable to a+x.  Additionally, cuda-config was being
    installed in a way would cause ebuild to complain about permissions.
    These were resolved with better use of doexe. Additionally, fixed
    revdep-rebuild warnings with cuda profiling libraries.
    
    Closes: https://github.com/gentoo/gentoo/pull/13986
    Closes: https://bugs.gentoo.org/686738
    Package-Manager: Portage-2.3.79, Repoman-2.3.16
    Signed-off-by: Robert Underwood <rr.underwood94@gmail.com>
    Signed-off-by: Jason Zaman <perfinion@gentoo.org>

 ...05-r1.ebuild => nvidia-cuda-toolkit-10.1.105-r2.ebuild} | 12 +++++++-----
 ...1.168.ebuild => nvidia-cuda-toolkit-10.1.168-r1.ebuild} | 12 +++++++-----
 ...43-r1.ebuild => nvidia-cuda-toolkit-10.1.243-r2.ebuild} | 14 ++++++++------
 ...0.2.89.ebuild => nvidia-cuda-toolkit-10.2.89-r1.ebuild} | 14 ++++++++------
 4 files changed, 30 insertions(+), 22 deletions(-)
Comment 6 Benda Xu gentoo-dev 2020-02-22 02:22:45 UTC
Thank you Jason and Robert!