mxnet标准安装错误

mxnet标准安装错误

我想配置config.mk文件以使用cuda。我修改了以下选项:



    USE_CUDA = 1
    ADD_LDFLAGS = /usr/local/cuda-8.0/lib64
    ADD_CFLAGS = /usr/local/cuda-8.0/lib64
    USE_CUDA_PATH = /usr/local/cuda 
    USE_CUDNN = 1
    USE_NVRTC = 1

运行时make -j8出现以下错误:



    cd /home/wanger/MXNet/mxnet/dmlc-core; make libdmlc.a USE_SSE=1 config=/home/wanger/MXNet/mxnet/config.mk; cd /home/wanger/MXNet/mxnet
    /usr/local/cuda /bin/nvcc -std=c++11 -Xcompiler -D_FORCE_INLINES -g -O3 -ccbin g++  -Xcompiler "-DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/wanger/MXNet/mxnet/mshadow/ -I/home/wanger/MXNet/mxnet/dmlc-core/include -fPIC -Iinclude -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -msse3 -I/usr/local/cuda /include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 `pkg-config --cflags opencv` -fopenmp -DMSHADOW_USE_CUDNN=1 /usr/local/cuda-8.0/lib64 -DMXNET_USE_NVRTC=1" -M -MT build/src/ndarray/ndarray_function_gpu.o src/ndarray/ndarray_function.cu >build/src/ndarray/ndarray_function_gpu.d
    make[1]: Entering directory '/home/wanger/MXNet/mxnet/dmlc-core'
    /usr/local/cuda /bin/nvcc -std=c++11 -Xcompiler -D_FORCE_INLINES -g -O3 -ccbin g++  -Xcompiler "-DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/wanger/MXNet/mxnet/mshadow/ -I/home/wanger/MXNet/mxnet/dmlc-core/include -fPIC -Iinclude -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -msse3 -I/usr/local/cuda /include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 `pkg-config --cflags opencv` -fopenmp -DMSHADOW_USE_CUDNN=1 /usr/local/cuda-8.0/lib64 -DMXNET_USE_NVRTC=1" -M -MT build/src/optimizer/sgd_gpu.o src/optimizer/sgd.cu >build/src/optimizer/sgd_gpu.d
    /usr/local/cuda /bin/nvcc -std=c++11 -Xcompiler -D_FORCE_INLINES -g -O3 -ccbin g++  -Xcompiler "-DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/wanger/MXNet/mxnet/mshadow/ -I/home/wanger/MXNet/mxnet/dmlc-core/include -fPIC -Iinclude -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -msse3 -I/usr/local/cuda /include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 `pkg-config --cflags opencv` -fopenmp -DMSHADOW_USE_CUDNN=1 /usr/local/cuda-8.0/lib64 -DMXNET_USE_NVRTC=1" -M -MT build/src/operator/convolution_gpu.o src/operator/convolution.cu >build/src/operator/convolution_gpu.d
    /usr/local/cuda /bin/nvcc -std=c++11 -Xcompiler -D_FORCE_INLINES -g -O3 -ccbin g++  -Xcompiler "-DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/wanger/MXNet/mxnet/mshadow/ -I/home/wanger/MXNet/mxnet/dmlc-core/include -fPIC -Iinclude -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -msse3 -I/usr/local/cuda /include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 `pkg-config --cflags opencv` -fopenmp -DMSHADOW_USE_CUDNN=1 /usr/local/cuda-8.0/lib64 -DMXNET_USE_NVRTC=1" -M -MT build/src/operator/svm_output_gpu.o src/operator/svm_output.cu >build/src/operator/svm_output_gpu.d
    /usr/local/cuda /bin/nvcc -std=c++11 -Xcompiler -D_FORCE_INLINES -g -O3 -ccbin g++  -Xcompiler "-DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/wanger/MXNet/mxnet/mshadow/ -I/home/wanger/MXNet/mxnet/dmlc-core/include -fPIC -Iinclude -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -msse3 -I/usr/local/cuda /include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 `pkg-config --cflags opencv` -fopenmp -DMSHADOW_USE_CUDNN=1 /usr/local/cuda-8.0/lib64 -DMXNET_USE_NVRTC=1" -M -MT build/src/operator/leaky_relu_gpu.o src/operator/leaky_relu.cu >build/src/operator/leaky_relu_gpu.d
    /usr/local/cuda /bin/nvcc -std=c++11 -Xcompiler -D_FORCE_INLINES -g -O3 -ccbin g++  -Xcompiler "-DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/wanger/MXNet/mxnet/mshadow/ -I/home/wanger/MXNet/mxnet/dmlc-core/include -fPIC -Iinclude -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -msse3 -I/usr/local/cuda /include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 `pkg-config --cflags opencv` -fopenmp -DMSHADOW_USE_CUDNN=1 /usr/local/cuda-8.0/lib64 -DMXNET_USE_NVRTC=1" -M -MT build/src/operator/lrn_gpu.o src/operator/lrn.cu >build/src/operator/lrn_gpu.d
    /usr/local/cuda /bin/nvcc -std=c++11 -Xcompiler -D_FORCE_INLINES -g -O3 -ccbin g++  -Xcompiler "-DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/wanger/MXNet/mxnet/mshadow/ -I/home/wanger/MXNet/mxnet/dmlc-core/include -fPIC -Iinclude -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -msse3 -I/usr/local/cuda /include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 `pkg-config --cflags opencv` -fopenmp -DMSHADOW_USE_CUDNN=1 /usr/local/cuda-8.0/lib64 -DMXNET_USE_NVRTC=1" -M -MT build/src/operator/fully_connected_gpu.o src/operator/fully_connected.cu >build/src/operator/fully_connected_gpu.d
    /bin/sh: 1: /usr/local/cuda: Permission denied
    Makefile:184: recipe for target 'build/src/ndarray/ndarray_function_gpu.o' failed
    make: *** [build/src/ndarray/ndarray_function_gpu.o] Error 126
    make: *** Waiting for unfinished jobs....
    /bin/sh: 1: /usr/local/cuda: Permission denied
    /bin/sh: 1: /usr/local/cuda: Permission denied
    Makefile:184: recipe for target 'build/src/optimizer/sgd_gpu.o' failed
    make: *** [build/src/optimizer/sgd_gpu.o] Error 126
    Makefile:184: recipe for target 'build/src/operator/convolution_gpu.o' failed
    make: *** [build/src/operator/convolution_gpu.o] Error 126
    /bin/sh: 1: /usr/local/cuda: Permission denied
    /bin/sh: 1: /usr/local/cuda: Permission denied
    Makefile:184: recipe for target 'build/src/operator/svm_output_gpu.o' failed
    make: *** [build/src/operator/svm_output_gpu.o] Error 126
    Makefile:184: recipe for target 'build/src/operator/lrn_gpu.o' failed
    make: *** [build/src/operator/lrn_gpu.o] Error 126
    /bin/sh: 1: /usr/local/cuda: Permission denied
    Makefile:184: recipe for target 'build/src/operator/fully_connected_gpu.o' failed
    make: *** [build/src/operator/fully_connected_gpu.o] Error 126
    make[1]: 'libdmlc.a' is up to date.
    make[1]: Leaving directory '/home/wanger/MXNet/mxnet/dmlc-core'
    /bin/sh: 1: /usr/local/cuda: Permission denied
    Makefile:184: recipe for target 'build/src/operator/leaky_relu_gpu.o' failed
    make: *** [build/src/operator/leaky_relu_gpu.o] Error 126

感谢您的帮助!

答案1

线路

/bin/sh: 1: /usr/local/cuda: Permission denied

这表明您的问题在于目录的权限配置不正确/usr/local/cuda。您似乎试图执行它,就好像它是一个命令文件一样。您最想要的是执行/usr/local/cuda/bin/nvcc

编辑您的 makefile 以便 CUDA 命令读取/usr/local/cuda/bin/nvcc(注意“cuda”和“bin”之间没有空格)并重试。

相关内容