mxnet 标准安装错误

mxnet standard installation error

我想配置 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

我认为@Marco 发现了它:您已经用尾随 space 定义了 USE_CUDA_PATH,所以它试图以编译器的身份执行目录,这导致了 "permission denied" 错误因为它不能执行目录。