Giter VIP home page Giter VIP logo

Comments (7)

ztzhang avatar ztzhang commented on June 3, 2024

Can you share the info printed when you build the Cuda kernel? Please run clean.sh before rebuild.

I think the cuda kernel compilation failed before passing to cffi, so it would be more informative if you could share the cuda compilation info.

from genre-shapehd.

fxy2012 avatar fxy2012 commented on June 3, 2024
(shaperecon) fxy@ubuntu:~/GenRe-ShapeHD$ ./build_toolbox.sh
Add -gencode to match all the GPU architectures you have.
Check 'https://en.wikipedia.org/wiki/CUDA#GPUs_supported' for list of architecture.
Check 'http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html' for GPU compilation based on architecture.
setup.sh: line 23: cd: cam_bp/src: No such file or directory
nvcc -c -o back_projection_kernel.cu.o back_projection_kernel.cu -x cu -Xcompiler -fPIC -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/TH -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC -I /home/fxy/GenRe-ShapeHD/toolbox/calc_prob -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include        -gencode arch=compute_30,code=sm_30         -gencode arch=compute_35,code=sm_35         -gencode arch=compute_52,code=sm_52         -gencode arch=compute_61,code=sm_61
gcc: error: back_projection_kernel.cu: No such file or directory
gcc: warning: ‘-x c++’ after last input file has no effect
gcc: fatal error: no input files
compilation terminated.
/home/fxy/GenRe-ShapeHD
python: can't open file 'build.py': [Errno 2] No such file or directory
Add -gencode to match all the GPU architectures you have.
Check 'https://en.wikipedia.org/wiki/CUDA#GPUs_supported' for list of architecture.
Check 'http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html' for GPU compilation based on architecture.
nvcc -c -o nnd_cuda.cu.o nnd_cuda.cu -x cu -Xcompiler -fPIC -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/TH -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC -I /home/fxy/GenRe-ShapeHD/toolbox/nndistance/src -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include        -gencode arch=compute_30,code=sm_30         -gencode arch=compute_35,code=sm_35         -gencode arch=compute_52,code=sm_52         -gencode arch=compute_61,code=sm_61
Including CUDA code.
/home/fxy/GenRe-ShapeHD/toolbox/nndistance
generating /tmp/tmp8rx6per1/_my_lib.c
setting the current directory to '/tmp/tmp8rx6per1'
running build_ext
building '_my_lib' extension
creating home
creating home/fxy
creating home/fxy/GenRe-ShapeHD
creating home/fxy/GenRe-ShapeHD/toolbox
creating home/fxy/GenRe-ShapeHD/toolbox/nndistance
creating home/fxy/GenRe-ShapeHD/toolbox/nndistance/src
gcc -pthread -B /home/fxy/anaconda3/envs/shaperecon/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/fxy/anaconda3/envs/shaperecon/include/python3.6m -c _my_lib.c -o ./_my_lib.o -std=c99
gcc -pthread -B /home/fxy/anaconda3/envs/shaperecon/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/fxy/anaconda3/envs/shaperecon/include/python3.6m -c /home/fxy/GenRe-ShapeHD/toolbox/nndistance/src/my_lib.c -o ./home/fxy/GenRe-ShapeHD/toolbox/nndistance/src/my_lib.o -std=c99
gcc -pthread -B /home/fxy/anaconda3/envs/shaperecon/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/fxy/anaconda3/envs/shaperecon/include/python3.6m -c /home/fxy/GenRe-ShapeHD/toolbox/nndistance/src/my_lib_cuda.c -o ./home/fxy/GenRe-ShapeHD/toolbox/nndistance/src/my_lib_cuda.o -std=c99
gcc -pthread -shared -B /home/fxy/anaconda3/envs/shaperecon/compiler_compat -L/home/fxy/anaconda3/envs/shaperecon/lib -Wl,-rpath=/home/fxy/anaconda3/envs/shaperecon/lib -Wl,--no-as-needed -Wl,--sysroot=/ -std=c99 ./_my_lib.o ./home/fxy/GenRe-ShapeHD/toolbox/nndistance/src/my_lib.o ./home/fxy/GenRe-ShapeHD/toolbox/nndistance/src/my_lib_cuda.o /home/fxy/GenRe-ShapeHD/toolbox/nndistance/src/nnd_cuda.cu.o -o ./_my_lib.so
Add -gencode to match all the GPU architectures you have.
Check 'https://en.wikipedia.org/wiki/CUDA#GPUs_supported' for list of architecture.
Check 'http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html' for GPU compilation based on architecture.
nvcc -c -o back_projection_kernel.cu.o back_projection_kernel.cu -x cu -Xcompiler -fPIC -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/TH -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC -I /home/fxy/GenRe-ShapeHD/toolbox/cam_bp/cam_bp/src -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include        -gencode arch=compute_30,code=sm_30         -gencode arch=compute_35,code=sm_35         -gencode arch=compute_52,code=sm_52         -gencode arch=compute_61,code=sm_61
In file included from /usr/include/c++/5/type_traits:35:0,
                 from /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/ATen/optional.h:19,
                 from /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/ATen/Error.h:4,
                 from /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/ATen/Allocator.h:6,
                 from /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/TH/THAllocator.h:6,
                 from /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC/THCGeneral.h:5,
                 from /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC/THC.h:4,
                 from back_projection_kernel.cu:1:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
/home/fxy/GenRe-ShapeHD/toolbox/cam_bp
/home/fxy/GenRe-ShapeHD/toolbox/cam_bp
generating /tmp/tmp72m4jfq6/_cam_bp_lib.c
setting the current directory to '/tmp/tmp72m4jfq6'
running build_ext
building '_cam_bp_lib' extension
creating home
creating home/fxy
creating home/fxy/GenRe-ShapeHD
creating home/fxy/GenRe-ShapeHD/toolbox
creating home/fxy/GenRe-ShapeHD/toolbox/cam_bp
creating home/fxy/GenRe-ShapeHD/toolbox/cam_bp/cam_bp
creating home/fxy/GenRe-ShapeHD/toolbox/cam_bp/cam_bp/src
gcc -pthread -B /home/fxy/anaconda3/envs/shaperecon/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA=True -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/fxy/GenRe-ShapeHD/toolbox/cam_bp/cam_bp/src -I/home/fxy/anaconda3/envs/shaperecon/include/python3.6m -c _cam_bp_lib.c -o ./_cam_bp_lib.o -std=c99
gcc -pthread -B /home/fxy/anaconda3/envs/shaperecon/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA=True -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/fxy/GenRe-ShapeHD/toolbox/cam_bp/cam_bp/src -I/home/fxy/anaconda3/envs/shaperecon/include/python3.6m -c /home/fxy/GenRe-ShapeHD/toolbox/cam_bp/cam_bp/src/back_projection.c -o ./home/fxy/GenRe-ShapeHD/toolbox/cam_bp/cam_bp/src/back_projection.o -std=c99
gcc -pthread -shared -B /home/fxy/anaconda3/envs/shaperecon/compiler_compat -L/home/fxy/anaconda3/envs/shaperecon/lib -Wl,-rpath=/home/fxy/anaconda3/envs/shaperecon/lib -Wl,--no-as-needed -Wl,--sysroot=/ -std=c99 ./_cam_bp_lib.o ./home/fxy/GenRe-ShapeHD/toolbox/cam_bp/cam_bp/src/back_projection.o /home/fxy/GenRe-ShapeHD/toolbox/cam_bp/cam_bp/src/back_projection_kernel.cu.o -o ./_cam_bp_lib.so
gcc: error: /home/fxy/GenRe-ShapeHD/toolbox/cam_bp/cam_bp/src/back_projection_kernel.cu.o: No such file or directory
Traceback (most recent call last):
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/unixccompiler.py", line 197, in link
    self.spawn(linker + ld_args)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
    % (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/cffi/ffiplatform.py", line 51, in _build
    dist.run_command('build_ext')
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
    self._build_extensions_serial()
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 558, in build_extension
    target_lang=language)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/ccompiler.py", line 717, in link_shared_object
    extra_preargs, extra_postargs, build_temp, target_lang)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/unixccompiler.py", line 199, in link
    raise LinkError(msg)
distutils.errors.LinkError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "build.py", line 43, in <module>
    ffi.build()
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 189, in build
    _build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 111, in _build_extension
    outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/cffi/api.py", line 723, in compile
    compiler_verbose=verbose, debug=debug, **kwds)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/cffi/recompiler.py", line 1527, in recompile
    compiler_verbose, debug)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/cffi/ffiplatform.py", line 22, in compile
    outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/cffi/ffiplatform.py", line 58, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.VerificationError: LinkError: command 'gcc' failed with exit status 1

from genre-shapehd.

ztzhang avatar ztzhang commented on June 3, 2024

Hi, can you verify the directory you are in when running the setup script?
It seems that
setup.sh: line 23: cd: cam_bp/src: No such file or directory
is not finding the right directory.
Also, it seems that you need to manually set -std=c++11 in the nvcc command since you are using gcc 5.4.
Please let me know if the problem still exists after varifying those.

from genre-shapehd.

fxy2012 avatar fxy2012 commented on June 3, 2024

@ztzhang Thank you for your advice. I set export CFLAGS="-std=c++11" in build_toolbox.sh, but it didn't work. And I tried to add this command to .bashrc, error still occurred. I am not familiar to c++ command, so could you please tell me how to solve this in detail?

from genre-shapehd.

fxy2012 avatar fxy2012 commented on June 3, 2024
(shaperecon) fxy@ubuntu:~/GenRe-ShapeHD$ ./build_toolbox.sh
Add -gencode to match all the GPU architectures you have.
Check 'https://en.wikipedia.org/wiki/CUDA#GPUs_supported' for list of architecture.
Check 'http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html' for GPU compilation based on architecture.
nvcc -c -o calc_prob_kernel.cu.o calc_prob_kernel.cu -x cu -Xcompiler -fPIC -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/TH -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC -I /home/fxy/GenRe-ShapeHD/toolbox/calc_prob/calc_prob/src         -gencode arch=compute_30,code=sm_30         -gencode arch=compute_35,code=sm_35         -gencode arch=compute_52,code=sm_52         -gencode arch=compute_61,code=sm_61
In file included from /usr/include/c++/5/type_traits:35:0,
                 from /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/ATen/optional.h:19,
                 from /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/ATen/Error.h:4,
                 from /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/ATen/Allocator.h:6,
                 from /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/TH/THAllocator.h:6,
                 from /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC/THCGeneral.h:5,
                 from /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC/THC.h:4,
                 from calc_prob_kernel.cu:1:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
/home/fxy/GenRe-ShapeHD/toolbox/calc_prob
generating /tmp/tmpruwsf34t/_calc_prob_lib.c
setting the current directory to '/tmp/tmpruwsf34t'
running build_ext
building '_calc_prob_lib' extension
creating home
creating home/fxy
creating home/fxy/GenRe-ShapeHD
creating home/fxy/GenRe-ShapeHD/toolbox
creating home/fxy/GenRe-ShapeHD/toolbox/calc_prob
creating home/fxy/GenRe-ShapeHD/toolbox/calc_prob/calc_prob
creating home/fxy/GenRe-ShapeHD/toolbox/calc_prob/calc_prob/src
gcc -pthread -B /home/fxy/anaconda3/envs/shaperecon/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA=True -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/fxy/GenRe-ShapeHD/toolbox/calc_prob/calc_prob/src -I/home/fxy/anaconda3/envs/shaperecon/include/python3.6m -c _calc_prob_lib.c -o ./_calc_prob_lib.o -std=c99
gcc -pthread -B /home/fxy/anaconda3/envs/shaperecon/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA=True -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/fxy/GenRe-ShapeHD/toolbox/calc_prob/calc_prob/src -I/home/fxy/anaconda3/envs/shaperecon/include/python3.6m -c /home/fxy/GenRe-ShapeHD/toolbox/calc_prob/calc_prob/src/calc_prob.c -o ./home/fxy/GenRe-ShapeHD/toolbox/calc_prob/calc_prob/src/calc_prob.o -std=c99
gcc -pthread -shared -B /home/fxy/anaconda3/envs/shaperecon/compiler_compat -L/home/fxy/anaconda3/envs/shaperecon/lib -Wl,-rpath=/home/fxy/anaconda3/envs/shaperecon/lib -Wl,--no-as-needed -Wl,--sysroot=/ ./_calc_prob_lib.o ./home/fxy/GenRe-ShapeHD/toolbox/calc_prob/calc_prob/src/calc_prob.o /home/fxy/GenRe-ShapeHD/toolbox/calc_prob/calc_prob/src/calc_prob_kernel.cu.o -o ./_calc_prob_lib.so
gcc: error: /home/fxy/GenRe-ShapeHD/toolbox/calc_prob/calc_prob/src/calc_prob_kernel.cu.o: No such file or directory
Traceback (most recent call last):
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/unixccompiler.py", line 197, in link
    self.spawn(linker + ld_args)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
    % (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/cffi/ffiplatform.py", line 51, in _build
    dist.run_command('build_ext')
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
    self._build_extensions_serial()
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 558, in build_extension
    target_lang=language)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/ccompiler.py", line 717, in link_shared_object
    extra_preargs, extra_postargs, build_temp, target_lang)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/distutils/unixccompiler.py", line 199, in link
    raise LinkError(msg)
distutils.errors.LinkError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "build.py", line 42, in <module>
    ext.build()
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 189, in build
    _build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 111, in _build_extension
    outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/cffi/api.py", line 723, in compile
    compiler_verbose=verbose, debug=debug, **kwds)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/cffi/recompiler.py", line 1527, in recompile
    compiler_verbose, debug)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/cffi/ffiplatform.py", line 22, in compile
    outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
  File "/home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/cffi/ffiplatform.py", line 58, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.VerificationError: LinkError: command 'gcc' failed with exit status 1
Add -gencode to match all the GPU architectures you have.
Check 'https://en.wikipedia.org/wiki/CUDA#GPUs_supported' for list of architecture.
Check 'http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html' for GPU compilation based on architecture.
setup.sh: line 25: cd: calc_prob/src: No such file or directory
nvcc -c -o calc_prob_kernel.cu.o calc_prob_kernel.cu -x cu -Xcompiler -fPIC -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/TH -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC -I /home/fxy/GenRe-ShapeHD/toolbox/nndistance         -gencode arch=compute_30,code=sm_30         -gencode arch=compute_35,code=sm_35         -gencode arch=compute_52,code=sm_52         -gencode arch=compute_61,code=sm_61
gcc: error: calc_prob_kernel.cu: No such file or directory
gcc: warning: ‘-x c++’ after last input file has no effect
gcc: fatal error: no input files
compilation terminated.
python: can't open file 'build.py': [Errno 2] No such file or directory
Add -gencode to match all the GPU architectures you have.
Check 'https://en.wikipedia.org/wiki/CUDA#GPUs_supported' for list of architecture.
Check 'http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html' for GPU compilation based on architecture.
setup.sh: line 25: cd: calc_prob/src: No such file or directory
nvcc -c -o calc_prob_kernel.cu.o calc_prob_kernel.cu -x cu -Xcompiler -fPIC -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/TH -I /home/fxy/anaconda3/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC -I /home/fxy/GenRe-ShapeHD/toolbox/cam_bp         -gencode arch=compute_30,code=sm_30         -gencode arch=compute_35,code=sm_35         -gencode arch=compute_52,code=sm_52         -gencode arch=compute_61,code=sm_61
gcc: error: calc_prob_kernel.cu: No such file or directory
gcc: warning: ‘-x c++’ after last input file has no effect
gcc: fatal error: no input files
compilation terminated.
python: can't open file 'build.py': [Errno 2] No such file or directory

from genre-shapehd.

fxy2012 avatar fxy2012 commented on June 3, 2024

@ztzhang Thank you very much! I have solved this problem.

from genre-shapehd.

jordgey avatar jordgey commented on June 3, 2024

@ztzhang Thank you very much! I have solved this problem.
Excuse me sir,how did you solve this problem, I am in the same circumstance with you.

from genre-shapehd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.