jd730 / OICR-pytorch

Pytorch Implementation of Multiple Instance Detection Network with Online Instance Classifier Refinement
MIT License
75 stars 10 forks source link

nms_cuda.c: 没有那个文件或目录 #1

Closed chen5165239 closed 5 years ago

chen5165239 commented 5 years ago

When I run the file about OICR-pytorch-master/lib/model/nms/build.py

/usr/bin/python3.5 /home/chen/OICR-pytorch-master/lib/model/nms/build.py Including CUDA code. /home/chen/OICR-pytorch-master/lib/model/nms ['/home/chen/OICR-pytorch-master/lib/model/nms/src/nms_cuda_kernel.cu.o'] generating /tmp/tmpdfjv8b_w/_nms.c setting the current directory to '/tmp/tmpdfjv8b_w' running build_ext building '_nms' extension creating home creating home/chen creating home/chen/OICR-pytorch-master creating home/chen/OICR-pytorch-master/lib creating home/chen/OICR-pytorch-master/lib/model creating home/chen/OICR-pytorch-master/lib/model/nms creating home/chen/OICR-pytorch-master/lib/model/nms/src x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/usr/local/lib/python3.5/dist-packages/torch/utils/ffi/../../lib/include -I/usr/local/lib/python3.5/dist-packages/torch/utils/ffi/../../lib/include/TH -I/usr/local/lib/python3.5/dist-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/usr/include/python3.5m -c _nms.c -o ./_nms.o x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/usr/local/lib/python3.5/dist-packages/torch/utils/ffi/../../lib/include -I/usr/local/lib/python3.5/dist-packages/torch/utils/ffi/../../lib/include/TH -I/usr/local/lib/python3.5/dist-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/usr/include/python3.5m -c /home/chen/OICR-pytorch-master/lib/model/nms/src/nms_cuda.c -o ./home/chen/OICR-pytorch-master/lib/model/nms/src/nms_cuda.o x86_64-linux-gnu-gcc: error: /home/chen/OICR-pytorch-master/lib/model/nms/src/nms_cuda.c: 没有那个文件或目录 x86_64-linux-gnu-gcc: fatal error: no input files compilation terminated. Traceback (most recent call last): File "/usr/lib/python3.5/distutils/unixccompiler.py", line 118, in _compile extra_postargs) File "/usr/lib/python3.5/distutils/ccompiler.py", line 909, in spawn spawn(cmd, dry_run=self.dry_run) File "/usr/lib/python3.5/distutils/spawn.py", line 36, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/usr/lib/python3.5/distutils/spawn.py", line 159, in _spawn_posix % (cmd, exit_status)) distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/cffi/ffiplatform.py", line 51, in _build dist.run_command('build_ext') File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.5/distutils/command/build_ext.py", line 338, in run self.build_extensions() File "/usr/lib/python3.5/distutils/command/build_ext.py", line 447, in build_extensions self._build_extensions_serial() File "/usr/lib/python3.5/distutils/command/build_ext.py", line 472, in _build_extensions_serial self.build_extension(ext) File "/usr/lib/python3.5/distutils/command/build_ext.py", line 532, in build_extension depends=ext.depends) File "/usr/lib/python3.5/distutils/ccompiler.py", line 574, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/usr/lib/python3.5/distutils/unixccompiler.py", line 120, in _compile raise CompileError(msg) distutils.errors.CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/chen/OICR-pytorch-master/lib/model/nms/build.py", line 37, in ffi.build() File "/usr/local/lib/python3.5/dist-packages/torch/utils/ffi/init.py", line 184, in build _build_extension(ffi, cffi_wrapper_name, target_dir, verbose) File "/usr/local/lib/python3.5/dist-packages/torch/utils/ffi/init.py", line 108, in _build_extension outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname) File "/usr/local/lib/python3.5/dist-packages/cffi/api.py", line 697, in compile compiler_verbose=verbose, debug=debug, **kwds) File "/usr/local/lib/python3.5/dist-packages/cffi/recompiler.py", line 1520, in recompile compiler_verbose, debug) File "/usr/local/lib/python3.5/dist-packages/cffi/ffiplatform.py", line 22, in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) File "/usr/local/lib/python3.5/dist-packages/cffi/ffiplatform.py", line 58, in _build raise VerificationError('%s: %s' % (e.class.name, e)) cffi.error.VerificationError: CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Is this a missing nms_cuda.c file in the OICR-pytorch-master/lib/model/nms/src ?

jd730 commented 5 years ago

Thank @chen5165239. I just added nms_cuda.c. The problem was there is a gitignore setting in OICR-pytorch/lib/model/nms/ which ignores *.c format.

I made a clone and tested to run make.sh correctly. If you have any further questions or confront other problems, please make an issue. I will do my best for solving the issue.