StevenGrove / DynamicHead

Apache License 2.0
86 stars 8 forks source link

ninja: build stopped: subcommand failed. #3

Closed jinyl777 closed 3 years ago

jinyl777 commented 3 years ago

ffollow your env , when I ‘’python setup.py build develop‘’ I got ninja: build stopped: subcommand failed.

StevenGrove commented 3 years ago

Please provide more detailed logs or error messages.

jinyl777 commented 3 years ago

`[9/26] /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/home/cv1/detection/DynamicHead-main/cvpods/layers/csrc -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/TH -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/cv1/miniconda3/envs/Det/include/python3.7m -c -c /home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/ml_nms/ml_nms.cu -o /home/cv1/detection/DynamicHead-main/build/temp.linux-x86_64-3.7/home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/ml_nms/ml_nms.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=sm_70 -std=c++14 FAILED: /home/cv1/detection/DynamicHead-main/build/temp.linux-x86_64-3.7/home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/ml_nms/ml_nms.o /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/home/cv1/detection/DynamicHead-main/cvpods/layers/csrc -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/TH -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/cv1/miniconda3/envs/Det/include/python3.7m -c -c /home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/ml_nms/ml_nms.cu -o /home/cv1/detection/DynamicHead-main/build/temp.linux-x86_64-3.7/home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/ml_nms/ml_nms.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=sm_70 -std=c++14 /home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/ml_nms/ml_nms.cu: In function ‘at::Tensor cvpods::ml_nms_cuda(at::Tensor, float)’: /home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/ml_nms/ml_nms.cu:78:62: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] AT_ASSERTM(boxes.type().is_cuda(), "boxes must be a CUDA tensor"); ... FAILED: /home/cv1/detection/DynamicHead-main/build/temp.linux-x86_64-3.7/home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/home/cv1/detection/DynamicHead-main/cvpods/layers/csrc -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/TH -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/cv1/miniconda3/envs/Det/include/python3.7m -c -c /home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.cu -o /home/cv1/detection/DynamicHead-main/build/temp.linux-x86_64-3.7/home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=sm_70 -std=c++14 /usr/include/c++/7/bits/basic_string.tcc: In instantiation of ‘static std::basic_string<_CharT, _Traits, _Alloc>::_Rep std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_create(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char16_t; _Traits = std::char_traits; _Alloc = std::allocator; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’: /usr/include/c++/7/bits/basic_string.tcc:578:28: required from ‘static _CharT std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&, std::forward_iterator_tag) [with _FwdIterator = const char16_t; _CharT = char16_t; _Traits = std::char_traits; _Alloc = std::allocator]’ /usr/include/c++/7/bits/basic_string.h:5042:20: required from ‘static _CharT std::basic_string<_CharT, _Traits, _Alloc>::_S_construct_aux(_InIterator, _InIterator, const _Alloc&, std::false_type) [with _InIterator = const char16_t; _CharT = char16_t; _Traits = std::char_traits; _Alloc = std::allocator]’ /usr/include/c++/7/bits/basic_string.h:5063:24: required from ‘static _CharT std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&) [with _InIterator = const char16_t; _CharT = char16_t; _Traits = std::char_traits; _Alloc = std::allocator]’ /usr/include/c++/7/bits/basic_string.tcc:656:134: required from ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char16_t; _Traits = std::char_traits; _Alloc = std::allocator; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’ /usr/include/c++/7/bits/basic_string.h:6688:95: required from here /usr/include/c++/7/bits/basic_string.tcc:1067:16: error: cannot call member function ‘void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char16_t; _Traits = std::char_traits; _Alloc = std::allocator]’ without object p->_M_set_sharable();


/usr/include/c++/7/bits/basic_string.tcc: In instantiation of ‘static std::basic_string<_CharT, _Traits, _Alloc>::_Rep* std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_create(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’:
/usr/include/c++/7/bits/basic_string.tcc:578:28:   required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&, std::forward_iterator_tag) [with _FwdIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’
/usr/include/c++/7/bits/basic_string.h:5042:20:   required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct_aux(_InIterator, _InIterator, const _Alloc&, std::__false_type) [with _InIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’
/usr/include/c++/7/bits/basic_string.h:5063:24:   required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&) [with _InIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’
/usr/include/c++/7/bits/basic_string.tcc:656:134:   required from ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’
/usr/include/c++/7/bits/basic_string.h:6693:95:   required from here
/usr/include/c++/7/bits/basic_string.tcc:1067:16: error: cannot call member function ‘void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’ without object
[11/26] /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/home/cv1/detection/DynamicHead-main/cvpods/layers/csrc -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/TH -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/cv1/miniconda3/envs/Det/include/python3.7m -c -c /home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/tree_filter/refine.cu -o /home/cv1/detection/DynamicHead-main/build/temp.linux-x86_64-3.7/home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/tree_filter/refine.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=sm_70 -std=c++14
FAILED: /home/cv1/detection/DynamicHead-main/build/temp.linux-x86_64-3.7/home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/tree_filter/refine.o
/usr/local/cuda/bin/nvcc -DWITH_CUDA -I/home/cv1/detection/DynamicHead-main/cvpods/layers/csrc -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/TH -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/cv1/miniconda3/envs/Det/include/python3.7m -c -c /home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/tree_filter/refine.cu -o /home/cv1/detection/DynamicHead-main/build/temp.linux-x86_64-3.7/home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/tree_filter/refine.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=sm_70 -std=c++14
...
/usr/include/c++/7/bits/basic_string.tcc:1067:16: error: cannot call member function ‘void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [         with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’ without object
[23/26] c++ -MMD -MF /home/cv1/detection/DynamicHead-main/build/temp.linux-x86_64-3.7/home/cv1/detection/DynamicHead-main/cvpods/layers/csrc/vision.o.d -pthread          -B /home/cv1/miniconda3/envs/Det/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/cv1         /detection/DynamicHead-main/cvpods/layers/csrc -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include -I/home/cv1/miniconda3/envs/Det/lib/pyt         hon3.7/site-packages/torch/include/torch/csrc/api/include -I/home/cv1/miniconda3/envs/Det/lib/python3.7/site-packages/torch/include/TH -I/home/cv1/miniconda3/en         vs/Det/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/cv1/miniconda3/envs/Det/include/python3.7m -c -c /home/cv1/detection/Dyna         micHead-main/cvpods/layers/csrc/vision.cpp -o /home/cv1/detection/DynamicHead-main/build/temp.linux-x86_64-3.7/home/cv1/detection/DynamicHead-main/cvpods/layers         /csrc/vision.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
...
/usr/include/c++/7/bits/basic_string.h:5063:24:   required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterato         r, const _Alloc&) [with _InIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’
/usr/include/c++/7/bits/basic_string.tcc:656:134:   required from ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, std::basic_string<_Ch         arT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>; std::basic_st         ring<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’
/usr/include/c++/7/bits/basic_string.h:6693:95:   required from here
/usr/include/c++/7/bits/basic_string.tcc:1067:16: error: cannot call member function ‘void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [         with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’ without object
ninja: build stopped: subcommand failed.

`
jinyl777 commented 3 years ago

Is I do not have root purview cause this ?

StevenGrove commented 3 years ago

It seems not due to the permission limitation. You can try to clean the built files and rebuild them. And you may get some help from a similar issue in PyTorch https://github.com/pytorch/pytorch/issues/32694.

jinyl777 commented 3 years ago

I rebuild it again and again but I got the same problem. The same operating in 2080Ti cuda10.0 ,I build it successful. but in V100 it is always 'ninja: build stopped: subcommand failed'. So follow the Pytorch issue , should I make the link from /usr/bin/ID to conda?

jinyl777 commented 3 years ago

The 2080Ti's gcc is 5.4 it is succesful , the V100's gcc is 7.5 . May be the gcc led to the issue?

StevenGrove commented 3 years ago

I test on a Tesla V100 based machine and build it successfully. The detailed environment is as follows:


sys.platform linux Python 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0] numpy 1.19.4 cvpods 0.1 @/data/Projects/cvpods/cvpods cvpods compiler GCC 7.4 cvpods CUDA compiler 10.1 cvpods arch flags sm_70 cvpods_ENV_MODULE PyTorch 1.7.1+cu101 @/home/songlin/.local/lib/python3.6/site-packages/torch PyTorch debug build False CUDA available True GPU 0,1,2,3,4,5,6,7 Tesla V100-PCIE-32GB CUDA_HOME /usr/local/cuda NVCC Cuda compilation tools, release 10.1, V10.1.243 Pillow 8.0.1 torchvision 0.8.2+cu101 @/home/songlin/.local/lib/python3.6/site-packages/torchvision torchvision arch flags sm_35, sm_50, sm_60, sm_70, sm_75 cv2 4.1.2


PyTorch built with:

jinyl777 commented 3 years ago

Thanks very much , I extermely intersting to your work , but I always build it fair ,so think maybe I should give it up