subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
`Loading /public/home/yqzhang/modeltest/0_path_model/AStarNet-master/datasets/knowledge_graphs/fb15k237_train.tx Loading /public/home/yqzhang/modeltest/0_path_model/AStarNet-master/datasets/knowledge_graphs/fb15k237_valid.tx Loading /public/home/yqzhang/modeltest/0_path_model/AStarNet-master/datasets/knowledge_graphs/fb15k237_test.txt 10:25:25 FB15k237( #entity: 14541 #relation: 237 #triplet: 310116 ) 10:25:25 #train: 272115, #valid: 17535, #test: 20466 Traceback (most recent call last): File "/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1906, in _run_ninja_build env=env) File "/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/subprocess.py", line 512, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "script/run.py", line 58, in
Hello, Thanks for your nice work. When I try to replicate your results in GPU, I meet the error about C++ spmm. Would you know how to fix this? Thanks, and have a nice day!
I also encounter similar issues. don't how to fix
I found the solution discussed in previous issue: https://github.com/DeepGraphLearning/AStarNet/issues/3 the problem is caused by TorchDrug, the missing header file in different versions, e.g., "ATen/SparseTensorUtils.h" should be change to "ATen/native/SparseTensorUtils.h".
I found the solution discussed in previous issue: #3 the problem is caused by TorchDrug, the missing header file in different versions, e.g., "ATen/SparseTensorUtils.h" should be change to "ATen/native/SparseTensorUtils.h".
Thanks for your tip! I will try to modify it.
'正在加载 /public/home/yqzhang/modeltest/0_path_model/AStarNet-master/datasets/knowledge_graphs/fb15k237_train.tx 加载 /public/home/yqzhang/modeltest/0_path_model/AStarNet-master/datasets/knowledge_graphs/fb15k237_valid.tx 加载 /public/home/yqzhang/modeltest/0_path_model/AStarNet-master/datasets/knowledge_graphs/fb15k237_test.txt 10:25:25 FB15k237( #entity: 14541 #relation: 237 #triplet: 310116 ) 10:25:25 #train: 272115, #valid: 17535, #test: 20466 回溯(最近一次调用最后):文件“/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/utils/cpp_extension.py“,第 1906 行,在 _run_ninja_build env=env) 文件”/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/subprocess.py“,第 512 行,在运行输出=stdout, stderr=stderr) 子进程中。CalledProcessError:命令 '['ninja', '-v']' 返回非零退出状态 1。
上述异常是以下异常的直接原因:
回溯(最近一次调用最后):文件“script/run.py”,第 58 行,在 solver = util.build_solver(cfg, dataset) 文件“/public/home/yqzhang/modeltest/0_path_model/AStarNet-master/reasoning/util.py”,第 104 行,在build_solver task = core。Configurable.load_config_dict(cfg.task) 文件“/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torchdrug/core/core.py”,第 269 行,load_config_dict v = Configurable.load_config_dict(v)文件“/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torchdrug/core/core.py”,第 269 行,load_config_dict v = Configurable.load_config_dict(v)文件“/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torchdrug/core/core.py”,第 277 行,load_config_dict返回 cls(**new_config) 文件“/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/decorator.py”,第 232 行,在 fun 返回调用者(func, *(extras + args), **kw) 文件“/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torchdrug/core/core.py”, 第 296 行,在包装器中返回 init(self, *args, **kwargs) 文件“/public/home/yqzhang/modeltest/0_path_model/AStarNet-master/reasoning/layer.py”,第 55 行,在 init functional.generalized_rspmm(adjacency, relation_input, input, sum=“add”, mul=“mul”) 文件“/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torchdrug/layers/functional/spmm.py”,第 378 行,generalized_rspmm返回 Function.apply(sparse.coalesce(), relation, input) 文件“/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torchdrug/layers/functional/spmm.py”,第 174 行,向前 = spmm.rspmm_add_mul_forward_cpu文件“/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torchdrug/utils/torch.py”,第 26 行,在 getattr 中返回 getattr(self.module, key)文件“/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torchdrug/utils/decorator.py”,第 102 行,在 get result = self.func(obj) 文件“/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torchdrug/utils/torch.py”,第 32 行,在模块 self.verbose, **self.kwargs) 文件“/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/utils/cpp_extension.py“,第 1296 行,加载 keep_intermediates=keep_intermediates) 文件”/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/utils/cpp_extension.py“,第 1518 行,jit_compile is_standalone=is_standalone) 文件”/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/utils/cpp_extension.py“,第 1626 行,write_ninja_file_and_build_libraryerror_prefix=f“构建扩展 '{name}' 时出错”) 文件 “/public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/utils/cpp_extension.py”,第 1916 行,run_ninja_build 从 e RuntimeError: 构建扩展 'spmm' 时出错: [1/5] c++ -MMD -MF rspmm.o.d -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=“gcc” -DPYBIND11_STDLIB=“libstdcpp“ -DPYBIND11_BUILD_ABI=”cxxabi1011“ -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/TH -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/THC -isystem /public/home/yqzhang/cuda/cuda11/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -ofast -fopenmp -DAT_PARALLEL_OPENMP -DCUDA_OP -c /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torchdrug/layers/functional/extension/rspmm.cpp -o rspmm.o [2/5] c++ -MMD -MF spmm.o.d -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=“gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/TH -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/THC -isystem /public/home/yqzhang/cuda/cuda11/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -Ofast -fopenmp -DAT_PARALLEL_OPENMP -DCUDA_OP -c /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torchdrug/layers/functional/extension/spmm.cpp -o spmm.o [3/5] /public/home/yqzhang/cuda/cuda11/bin/nvcc -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/TH -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/THC -isystem /public/home/yqzhang/cuda/cuda11/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_BFLOAT16_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -O3 -std=c++14 -c /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torchdrug/layers/functional/extension/rspmm.cu -o rspmm.cuda.o 失败: rspmm.cuda.o/public/home/yqzhang/cuda/cuda11/bin/nvcc -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=“gcc” -DPYBIND11_STDLIB=“libstdcpp” -DPYBIND11_BUILD_ABI=“cxxabi1011" -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/TH -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/THC -isystem /public/home/yqzhang/cuda/cuda11/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_BFLOAT16_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS_ --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -O3 -std=c++14 -c /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torchdrug/layers/functional/extension/rspmm.cu -o rspmm.cuda.o /usr/include/c++/11/bits/std_function.h:435:145:错误:参数包未用 '...' 展开:435 |function(Functor&& f) | ^ /usr/include/c++/11/bits/std_function.h:435:145:注意:注意:'ArgTypes' /usr/include/c++/11/bits/std_function.h:530:146:错误:参数包未用 '...' 扩展: 530 | operator=(Functor&& f) | ^ /usr/include/c++/11/bits/std_function.h:530:146:注意:'ArgTypes'[4/5] /public/home/yqzhang/cuda/cuda11/bin/nvcc -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=“gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/TH -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/THC -isystem /public/home/yqzhang/cuda/cuda11/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_BFLOAT16_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -O3 -std=c++14 -c /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torchdrug/layers/functional/extension/spmm.cu -o spmm.cuda.o 失败: spmm.cuda.o /public/home/yqzhang/cuda/cuda11/bin/nvcc -DTORCH_EXTENSION_NAME=spmm -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=“gcc” -DPYBIND11_STDLIB=“libstdcpp” -DPYBIND11_BUILD_ABI=“cxxabi1011” -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/TH -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torch/include/THC -isystem /public/home/yqzhang/cuda/cuda11/include -isystem /public/home/yqzhang/anaconda3/envs/kgmodel/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_BFLOAT16_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -O3 -std=c++14 -c /public/home/yqzhang/anaconda3/envs/kgmodel/lib/python3.7/site-packages/torchdrug/layers/functional/extension/spmm.cu -o spmm.cuda.o /usr/include/c++/11/bits/std_function.h:435:145:145:错误:参数包未用“...”扩展:435 |函数(_Functor&__f) |^ /usr/include/c++/11/bits/std_function.h:435:145:注意:“_ArgTypes” /usr/include/c++/11/bits/std_function.h:530:146:错误:参数包未用“...”扩展:530 |运算符=(_Functor&& __f) |^ /usr/include/c++/11/bits/std_function.h:530:146:注意:“_ArgTypes”Ninja:构建停止:子命令失败。
您好,感谢您的出色工作。当我尝试在 GPU 中复制您的结果时,我遇到了有关 C++ spmm 的错误。你知道如何解决这个问题吗?谢谢,祝你有美好的一天!
Hello, I’m also facing the same issue. May I ask if you have found a solution?