laughtervv / DepthAwareCNN

Depth-aware CNN for RGB-D Segmentation, ECCV 2018
MIT License
303 stars 81 forks source link

Error making depthconv #7

Open sabrinazuraimi opened 6 years ago

sabrinazuraimi commented 6 years ago

Hi, I tried running sh make.sh to build the depth conv operation but I got the following error.. Is it because I keep the depthconv folder in the HDD disk and not the local disk??

If so, how do I modify the make.sh file?

(UPDATE: even if I move the depthconv folder to the local disk, it's still not working..)

~/HDD/Documents/DepthAwareCNN-master/models/ops/depthconv$ sh make.sh nvcc fatal : Value 'sm_60' is not defined for option 'gpu-architecture' Including CUDA code. /disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv generating /tmp/tmpbhq1tqzn/_depthconv.c setting the current directory to '/tmp/tmpbhq1tqzn' running build_ext building '_depthconv' extension creating disks creating disks/local creating disks/local/Documents creating disks/local/Documents/DepthAwareCNN-master creating disks/local/Documents/DepthAwareCNN-master/models creating disks/local/Documents/DepthAwareCNN-master/models/ops creating disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv creating disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src g++ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/muser/.pyenv/versions/anaconda3-5.0.1/include/python3.6m -c _depthconv.c -o ./_depthconv.o cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ g++ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/muser/.pyenv/versions/anaconda3-5.0.1/include/python3.6m -c /disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv.c -o ./disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv.o cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ g++ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/muser/.pyenv/versions/anaconda3-5.0.1/include/python3.6m -c /disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv_cuda.c -o ./disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv_cuda.o cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ gcc -pthread -shared -B /home/muser/.pyenv/versions/anaconda3-5.0.1/compiler_compat -L/home/muser/.pyenv/versions/anaconda3-5.0.1/lib -Wl,-rpath=/home/muser/.pyenv/versions/anaconda3-5.0.1/lib -Wl,--no-as-needed -Wl,--sysroot=/ ./_depthconv.o ./disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv.o ./disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv_cuda.o /disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv_cuda_kernel.cu.o -L/home/muser/.pyenv/versions/anaconda3-5.0.1/lib -lpython3.6m -o ./_depthconv.so gcc: error: /disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv_cuda_kernel.cu.o: No such file or directory Traceback (most recent call last): File "/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/distutils/unixccompiler.py", line 197, in link self.spawn(linker + ld_args) File "/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/distutils/ccompiler.py", line 909, in spawn spawn(cmd, dry_run=self.dry_run) File "/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/distutils/spawn.py", line 36, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix % (cmd, exit_status)) distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

sabrinazuraimi commented 6 years ago

In make.sh, there's a command that looks like this but I can't seem to find depthconv_cuda_kernel.cu.o (depthconv_cuda_kernel.cu is in the folder though)

nvcc -c -o depthconv_cuda_kernel.cu.o depthconv_cuda_kernel.cu -x cu -Xcompiler -fPIC -std=c++11 -arch=sm_60

laughtervv commented 6 years ago

I saw "nvcc fatal : Value 'sm_60' is not defined for option 'gpu-architecture'" I think you need to specify your gpu architecture with -arch=sm_60 and replacing sm_60 with the one that is compatible with your gpu.

sabrinazuraimi commented 6 years ago

Okay, but I'm also getting an error

gcc: error: /disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv_cuda_kernel.cu.o: No such file or directory

Depthavgpooling folder has the file depthavgpooling_cuda_kernel.cu.o but the depthconv folder doesn't seem to have a file called depthconv_cuda_kernel.cu.o

laughtervv commented 6 years ago

That file is made by the nvcc command.

sabrinazuraimi commented 6 years ago

Thanks, it worked! I did get the warnings below, but I think it should work fine even with the warnings right?

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ g++ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/muser/.pyenv/versions/anaconda3-5.0.1/include/python3.6m -c /disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv.c -o ./disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv.o cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ g++ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/muser/.pyenv/versions/anaconda3-5.0.1/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/muser/.pyenv/versions/anaconda3-5.0.1/include/python3.6m -c /disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv_cuda.c -o ./disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv_cuda.o cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ gcc -pthread -shared -B /home/muser/.pyenv/versions/anaconda3-5.0.1/compiler_compat -L/home/muser/.pyenv/versions/anaconda3-5.0.1/lib -Wl,-rpath=/home/muser/.pyenv/versions/anaconda3-5.0.1/lib -Wl,--no-as-needed -Wl,--sysroot=/ ./_depthconv.o ./disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv.o ./disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv_cuda.o /disks/local/Documents/DepthAwareCNN-master/models/ops/depthconv/src/depthconv_cuda_kernel.cu.o -L/home/muser/.pyenv/versions/anaconda3-5.0.1/lib -lpython3.6m -o ./_depthconv.so

DC1991 commented 5 years ago

Hi Have you solved this problem? Can you tell me how to solve this problem? Thanks very much. There are two commands in the "make.sh", I can successfully compile the first command (nvcc -c ....). When I try to compile the second. I met the similar problems as mentioned above.