首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在使用GPU支持构建xgboost时拒绝nvcc权限,ubuntu 18.04

在使用GPU支持构建xgboost时拒绝nvcc权限,ubuntu 18.04
EN

Ask Ubuntu用户
提问于 2020-06-04 13:45:01
回答 2查看 1.7K关注 0票数 0

我正在构建XGBoost与GPU支持Ubuntu18.04遵循的安装指南。在cmake .. -DUSE_CUDA=ON阶段,make[1]: execvp: /usr/local/cuda/bin: Permission denied失败了。

完整的输出在下面。

代码语言:javascript
复制
-- CMake version 3.17.1
-- xgboost VERSION: 1.2.0
-- Configured CUDA host compiler: /usr/bin/c++
-- The CUDA compiler identification is unknown
-- Check for working CUDA compiler: /usr/local/cuda/bin
-- Check for working CUDA compiler: /usr/local/cuda/bin - broken
CMake Error at /usr/local/share/cmake-3.17/Modules/CMakeTestCUDACompiler.cmake:46 (message):
  The CUDA compiler

    "/usr/local/cuda/bin"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/tassadar/lib/xgboost/build/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/bin/make cmTC_2db63/fast && /usr/bin/make  -f CMakeFiles/cmTC_2db63.dir/build.make CMakeFiles/cmTC_2db63.dir/build
    make[1]: Entering directory '/home/tassadar/lib/xgboost/build/CMakeFiles/CMakeTmp'
    Building CUDA object CMakeFiles/cmTC_2db63.dir/main.cu.o
    /usr/local/cuda/bin  -ccbin=/usr/bin/c++    -x cu -c /home/tassadar/lib/xgboost/build/CMakeFiles/CMakeTmp/main.cu -o CMakeFiles/cmTC_2db63.dir/main.cu.o
    make[1]: execvp: /usr/local/cuda/bin: Permission denied
    CMakeFiles/cmTC_2db63.dir/build.make:85: recipe for target 'CMakeFiles/cmTC_2db63.dir/main.cu.o' failed
    make[1]: *** [CMakeFiles/cmTC_2db63.dir/main.cu.o] Error 127
    make[1]: Leaving directory '/home/tassadar/lib/xgboost/build/CMakeFiles/CMakeTmp'
    Makefile:141: recipe for target 'cmTC_2db63/fast' failed
    make: *** [cmTC_2db63/fast] Error 2





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:95 (enable_language)


-- Configuring incomplete, errors occurred!
See also "/home/tassadar/lib/xgboost/build/CMakeFiles/CMakeOutput.log".
See also "/home/tassadar/lib/xgboost/build/CMakeFiles/CMakeError.log".

/usr/local/cuda/bin的权限如下。

代码语言:javascript
复制
total 59288
drwxrwxrwx  3 tassadar tassadar     4096 чер  4 15:55 .
drwxr-xr-x 18 root     root         4096 чер  4 15:55 ..
-rwxrwxrwx  1 root     root        80576 чер  4 15:55 bin2c
lrwxrwxrwx  1 root     root            4 чер  4 15:55 computeprof -> nvvp
drwxrwxrwx  2 root     root         4096 чер  4 15:55 crt
-rwxrwxrwx  1 root     root      4833904 чер  4 15:55 cudafe++
-rwxrwxrwx  1 root     root      8890248 чер  4 15:55 cuda-gdb
-rwxrwxrwx  1 root     root       581744 чер  4 15:55 cuda-gdbserver
-rwxrwxrwx  1 root     root          800 чер  4 15:55 cuda-install-samples-10.2.sh
-rwxrwxrwx  1 root     root       397480 чер  4 15:55 cuda-memcheck
-rwxrwxrwx  1 root     root       931664 чер  4 15:55 cuda-uninstaller
-rwxrwxrwx  1 root     root       212224 чер  4 15:55 cuobjdump
-rwxrwxrwx  1 root     root       195600 чер  4 15:55 fatbinary
-rwxrwxrwx  1 root     root          219 чер  4 15:55 nsight
-rwxrwxrwx  1 root     root         1580 чер  4 15:55 nsight_ee_plugins_manage.sh
-rwxrwxrwx  1 root     root          444 чер  4 15:55 nsight-sys
-rwxrwxrwx  1 root     root          512 чер  4 15:55 nsys
-rwxrwxrwx  1 root     root          533 чер  4 15:55 nsys-exporter
-rwxrwxrwx  1 root     root       229504 чер  4 15:55 nvcc
-rwxrwxrwx  1 root     root          417 чер  4 15:55 nvcc.profile
-rwxrwxrwx  1 root     root     23034280 чер  4 15:55 nvdisasm
-rwxrwxrwx  1 root     root      8092008 чер  4 15:55 nvlink
-rwxrwxrwx  1 root     root         2583 чер  4 15:55 nv-nsight-cu
-rwxrwxrwx  1 root     root         2801 чер  4 15:55 nv-nsight-cu-cli
-rwxrwxrwx  1 root     root      5094688 чер  4 15:55 nvprof
-rwxrwxrwx  1 root     root        97168 чер  4 15:55 nvprune
-rwxrwxrwx  1 root     root          285 чер  4 15:55 nvvp
-rwxrwxrwx  1 root     root      7955808 чер  4 15:55 ptxas

我做错了什么?

EN

回答 2

Ask Ubuntu用户

发布于 2020-10-25 09:42:03

检查是否以sudo的形式运行该命令。否则检查文件权限。运行chmod +x /usr/local/cuda/bin以访问可执行文件。

票数 0
EN

Ask Ubuntu用户

发布于 2022-11-16 10:59:41

CMAKE变量CMAKE_CUDA_COMPILER被错误地设置到目录(/usr/local/cuda/bin),而不是设置到编译器的完整路径(/usr/local/cuda/bin/nvcc)。

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1246862

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档