NVIDIA / MinkowskiEngine

Minkowski Engine is an auto-diff neural network library for high-dimensional sparse tensors
https://nvidia.github.io/MinkowskiEngine
Other
2.43k stars 360 forks source link

Installation error with conda #482

Closed tyhuang0428 closed 1 year ago

tyhuang0428 commented 2 years ago

error occurs in [20/21]

[20/21] /mnt/cache/share/cuda-11.1/bin/nvcc  -I/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/torch/include -I/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/torch/include/TH -I/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/torch/include/THC -I/mnt/cache/share/cuda-11.1/include -I/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src -I/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/3rdparty -I/mnt/cache/huangtianyu/anaconda3/envs/mink/include -I/mnt/cache/huangtianyu/anaconda3/envs/mink/include/python3.8 -c -c /mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.cu -o /mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/build/temp.linux-x86_64-3.8/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' --expt-relaxed-constexpr --expt-extended-lambda -O3 -Xcompiler=-fno-gnu-unique -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 -std=c++14
FAILED: /mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/build/temp.linux-x86_64-3.8/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.o 
/mnt/cache/share/cuda-11.1/bin/nvcc  -I/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/torch/include -I/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/torch/include/TH -I/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/torch/include/THC -I/mnt/cache/share/cuda-11.1/include -I/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src -I/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/3rdparty -I/mnt/cache/huangtianyu/anaconda3/envs/mink/include -I/mnt/cache/huangtianyu/anaconda3/envs/mink/include/python3.8 -c -c /mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.cu -o /mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/build/temp.linux-x86_64-3.8/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' --expt-relaxed-constexpr --expt-extended-lambda -O3 -Xcompiler=-fno-gnu-unique -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 -std=c++14
/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.cu(102): warning: variable "is_int64" was declared but never referenced

/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.cu(364): warning: variable "is_int64" was declared but never referenced

/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.cu(473): warning: variable "num_unique_keys" was set but never used
          detected during instantiation of "std::vector<at::Tensor, std::allocator<at::Tensor>> minkowski::coo_spmm_average<th_int_type>(const at::Tensor &, const at::Tensor &, int64_t, int64_t, const at::Tensor &, int64_t) [with th_int_type=int32_t]" 
(601): here

/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.cu(473): warning: variable "num_unique_keys" was set but never used
          detected during instantiation of "std::vector<at::Tensor, std::allocator<at::Tensor>> minkowski::coo_spmm_average<th_int_type>(const at::Tensor &, const at::Tensor &, int64_t, int64_t, const at::Tensor &, int64_t) [with th_int_type=int32_t]" 
(601): here

/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.cu: In instantiation of ‘minkowski::coo_spmm(const at::Tensor&, const at::Tensor&, const at::Tensor&, int64_t, int64_t, const at::Tensor&, int64_t, bool)::<lambda()>::<lambda()> [with th_int_type = int]’:
/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.cu:212:0:   required from ‘struct minkowski::coo_spmm(const at::Tensor&, const at::Tensor&, const at::Tensor&, int64_t, int64_t, const at::Tensor&, int64_t, bool)::<lambda()> [with th_int_type = int]::<lambda()>’
/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.cu:212:0:   required from ‘minkowski::coo_spmm(const at::Tensor&, const at::Tensor&, const at::Tensor&, int64_t, int64_t, const at::Tensor&, int64_t, bool)::<lambda()> [with th_int_type = int]’
/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.cu:212:0:   required from ‘struct minkowski::coo_spmm(const at::Tensor&, const at::Tensor&, const at::Tensor&, int64_t, int64_t, const at::Tensor&, int64_t, bool) [with th_int_type = int; int64_t = long int]::<lambda()>’
/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.cu:212:0:   required from ‘at::Tensor minkowski::coo_spmm(const at::Tensor&, const at::Tensor&, const at::Tensor&, int64_t, int64_t, const at::Tensor&, int64_t, bool) [with th_int_type = int; int64_t = long int]’
/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.cu:344:232:   required from here
/mnt/lustre/huangtianyu/benchmark/MinkowskiEngine/src/spmm.cu:212:1294: internal compiler error: in maybe_undo_parenthesized_ref, at cp/semantics.c:1740
   AT_DISPATCH_FLOATING_TYPES(vals.scalar_type(), "coo_spmm", [&] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ^       
0x6c12d9 maybe_undo_parenthesized_ref(tree_node*)
        ../../gcc/cp/semantics.c:1739
0x706578 cp_fold
        ../../gcc/cp/cp-gimplify.c:2180
0x7073dc cp_fold_maybe_rvalue
        ../../gcc/cp/cp-gimplify.c:2042
0x706286 cp_fold
        ../../gcc/cp/cp-gimplify.c:2149
0x69dadf cp_build_binary_op(unsigned int, tree_code, tree_node*, tree_node*, int)
        ../../gcc/cp/typeck.c:5260
0x5e47dc build_new_op_1
        ../../gcc/cp/call.c:5978
0x5e52be build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node**, int)
        ../../gcc/cp/call.c:6022
0x695952 build_x_binary_op(unsigned int, tree_code, tree_node*, tree_code, tree_node*, tree_code, tree_node**, int)
        ../../gcc/cp/typeck.c:3941
0x61e43f tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool)
        ../../gcc/cp/pt.c:17001
0x61e3e8 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool)
        ../../gcc/cp/pt.c:16998
0x61f5b6 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool)
        ../../gcc/cp/pt.c:17312
0x61fef0 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool)
        ../../gcc/cp/pt.c:17660
0x61f715 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool)
        ../../gcc/cp/pt.c:16897
0x61e1a9 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool)
        ../../gcc/cp/pt.c:17137
0x614b87 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool)
        ../../gcc/cp/pt.c:16732
0x614b87 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/cp/pt.c:16613
0x6149c5 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/cp/pt.c:15874
0x614a15 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/cp/pt.c:15860
0x6148ab tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/cp/pt.c:16090
0x615445 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/cp/pt.c:16060
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1666, in _run_ninja_build
    subprocess.run(
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v', '-j', '1']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "setup.py", line 317, in <module>
    setup(
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
    return run_commands(dist)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
    dist.run_commands()
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
    self.run_command(cmd)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/dist.py", line 1214, in run_command
    super().run_command(command)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
    cmd_obj.run()
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/command/install.py", line 74, in run
    self.do_egg_install()
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/command/install.py", line 123, in do_egg_install
    self.run_command('bdist_egg')
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/dist.py", line 1214, in run_command
    super().run_command(command)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
    cmd_obj.run()
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 165, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 151, in call_command
    self.run_command(cmdname)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/dist.py", line 1214, in run_command
    super().run_command(command)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
    cmd_obj.run()
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 11, in run
    self.build()
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/_distutils/command/install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/dist.py", line 1214, in run_command
    super().run_command(command)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
    cmd_obj.run()
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
    _build_ext.run(self)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 709, in build_extensions
    build_ext.build_extensions(self)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 448, in build_extensions
    self._build_extensions_serial()
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 473, in _build_extensions_serial
    self.build_extension(ext)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
    _build_ext.build_extension(self, ext)
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 528, in build_extension
    objects = self.compiler.compile(sources,
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 530, in unix_wrap_ninja_compile
    _write_ninja_file_and_compile_objects(
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1355, in _write_ninja_file_and_compile_objects
    _run_ninja_build(
  File "/mnt/cache/huangtianyu/anaconda3/envs/mink/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1682, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

To Reproduce Environments:

I use conda to install MinkowskiEngine as followed:

conda create -n mink python=3.8
conda activate mink
conda install pytorch=1.9.0 torchvision cudatoolkit=11.1 -c pytorch -c nvidia
conda install openblas-devel -c anaconda
git clone https://github.com/NVIDIA/MinkowskiEngine.git
cd MinkowskiEngine
python setup.py install --blas_include_dirs=${CONDA_PREFIX}/include --blas=openblas

Thanks for helping!

lhy0807 commented 2 years ago

same here

StevenLiuWen commented 2 years ago

I have encountered the same issue in CentOS 7, GCC-7.5 (and both GCC 7.3), and Cuda 10.2.

houyongkuo commented 2 years ago

same here

celeste-1 commented 2 years ago

same here

houyongkuo commented 2 years ago

You can try to update the version of gcc to 9.X

773041642 commented 1 year ago

Did you solute it?

tyhuang0428 commented 1 year ago

Did you solute it?

use GCC >= 9.X can solve the error