KiddoZhu / NBFNet-PyG

PyG re-implementation of Neural Bellman-Ford Networks (NeurIPS 2021)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError: Error building extension 'rspmm'

chenzhongwu opened this issue · comments

commented

When I run the code, I have the following problem, could you tell me why:

11:21:06 IndWN18RR dataset
11:21:06 #train: 5410, #valid: 630, #test: 188
11:21:08 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
11:21:08 Epoch 0 begin
Load rspmm extension. This may take a while...
Traceback (most recent call last):
File "/home/czw/anaconda3/envs/NBFNET/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1673, in _run_ninja_build
env=env)
File "/home/czw/anaconda3/envs/NBFNET/lib/python3.6/subprocess.py", line 418, 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 216, in
train_and_validate(cfg, model, train_data, valid_data, filtered_data=filtered_data)
File "script/run.py", line 57, in train_and_validate
pred = parallel_model(train_data, batch)
File "/home/czw/anaconda3/envs/NBFNET/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in call_impl
result = self.forward(*input, **kwargs)
File "/ssd2T/NBFNet-PyG-master/nbfnet/models.py", line 139, in forward
output = self.bellmanford(data, h_index[:, 0], r_index[:, 0]) # (num_nodes, batch_size, feature_dim)
File "/ssd2T/NBFNet-PyG-master/nbfnet/models.py", line 104, in bellmanford
hidden = layer(layer_input, query, boundary, data.edge_index, data.edge_type, size, edge_weight)
File "/home/czw/anaconda3/envs/NBFNET/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in call_impl
result = self.forward(*input, **kwargs)
File "/ssd2T/NBFNet-PyG-master/nbfnet/layers.py", line 66, in forward
edge_type=edge_type, size=size, edge_weight=edge_weight)
File "/ssd2T/NBFNet-PyG-master/nbfnet/layers.py", line 89, in propagate
out = self.message_and_aggregate(edge_index, **msg_aggr_kwargs)
File "/ssd2T/NBFNet-PyG-master/nbfnet/layers.py", line 157, in message_and_aggregate
from .rspmm import generalized_rspmm
File "/ssd2T/NBFNet-PyG-master/nbfnet/rspmm/init.py", line 1, in
from .rspmm import generalized_rspmm
File "/ssd2T/NBFNet-PyG-master/nbfnet/rspmm/rspmm.py", line 204, in
rspmm = load_extension("rspmm", [os.path.join(path, "rspmm.cpp"), os.path.join(path, "rspmm.cu")])
File "/ssd2T/NBFNet-PyG-master/nbfnet/rspmm/rspmm.py", line 199, in load_extension
return cpp_extension.load(name, sources, extra_cflags, extra_cuda_cflags, **kwargs)
File "/home/czw/anaconda3/envs/NBFNET/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1091, in load
keep_intermediates=keep_intermediates)
File "/home/czw/anaconda3/envs/NBFNET/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1302, in jit_compile
is_standalone=is_standalone)
File "/home/czw/anaconda3/envs/NBFNET/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1407, in write_ninja_file_and_build_library
error_prefix=f"Error building extension '{name}'")
File "/home/czw/anaconda3/envs/NBFNET/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1683, in run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'rspmm': [1/2] /usr/bin/nvcc --generate-dependencies-with-compile --dependency-output rspmm.cuda.o.d -DTORCH_EXTENSION_NAME=rspmm -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/czw/anaconda3/envs/NBFNET/lib/python3.6/site-packages/torch/include -isystem /home/czw/anaconda3/envs/NBFNET/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/czw/anaconda3/envs/NBFNET/lib/python3.6/site-packages/torch/include/TH -isystem /home/czw/anaconda3/envs/NBFNET/lib/python3.6/site-packages/torch/include/THC -isystem /home/czw/anaconda3/envs/NBFNET/include/python3.6m -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_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 --compiler-options '-fPIC' -O3 -std=c++14 -c /ssd2T/NBFNet-PyG-master/nbfnet/rspmm/source/rspmm.cu -o rspmm.cuda.o
FAILED: rspmm.cuda.o
/usr/bin/nvcc --generate-dependencies-with-compile --dependency-output rspmm.cuda.o.d -DTORCH_EXTENSION_NAME=rspmm -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/czw/anaconda3/envs/NBFNET/lib/python3.6/site-packages/torch/include -isystem /home/czw/anaconda3/envs/NBFNET/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/czw/anaconda3/envs/NBFNET/lib/python3.6/site-packages/torch/include/TH -isystem /home/czw/anaconda3/envs/NBFNET/lib/python3.6/site-packages/torch/include/THC -isystem /home/czw/anaconda3/envs/NBFNET/include/python3.6m -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_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 --compiler-options '-fPIC' -O3 -std=c++14 -c /ssd2T/NBFNet-PyG-master/nbfnet/rspmm/source/rspmm.cu -o rspmm.cuda.o
nvcc fatal : Unknown option '-generate-dependencies-with-compile'
ninja: build stopped: subcommand failed.