-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault (core dumped) #33
Comments
Can you test if the test suite of |
I just run
|
Okay, I did not expect this. So installation succeed. The |
I am also facing the same issue. The example code |
Can you send me your |
My code terminates with |
@rusty1s, I shared the data.edge_index file over email. |
I received your file and will look into it. An initial guess is that it may be due to isolated nodes. |
I thought that too. |
Works flawless for me: import torch
from torch_geometric.read import read_txt_array
from torch_geometric.data import Data
from torch_geometric.data import NeighborSampler
edge_index = read_txt_array('edge_indices.txt', sep=' ', dtype=torch.long)
edge_index = edge_index.t().contiguous()
data = Data(edge_index=edge_index)
print(data)
loader = NeighborSampler(data, size=1.0, num_hops=2, batch_size=100,
shuffle=False, add_self_loops=False)
for data_flow in loader():
print(data_flow) Can you run the code and see if it works for you? |
This code works. import torch
from torch_geometric.read import read_txt_array
from torch_geometric.data import Data
from torch_geometric.data import NeighborSampler
# Put edge_index in GPU memory
edge_index = read_txt_array('edge_indices.txt', sep=' ', dtype=torch.long).cuda()
edge_index = edge_index.t().contiguous()
# Put data object to GPU memory
data = Data(edge_index=edge_index).to('cuda')
print(data)
loader = NeighborSampler(data, size=1.0, num_hops=2, batch_size=100,
shuffle=False, add_self_loops=False)
for data_flow in loader():
print(data_flow) Output: torch_geometric/data/data.py:177: UserWarning: The number of nodes in your data object can only be inferred by its edge indices, and hence may result in unexpected batch-wise behavior, e.g., in case there exists isolated nodes. Please consider explicitly setting the number of nodes for this data object by assigning it to data.num_nodes.
warnings.warn(__num_nodes_warn_msg__.format('edge'))
Segmentation fault (core dumped) |
This makes sense, and we should add an assertion to prevent this. The |
This issue had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. Is this issue already resolved? |
When I run
python reddit.py
inpytorch_geometric
, which useneighbor_sampler
intorch_cluster
, it occur 'Segmentation fault (core dumped)'. My machine is Ubuntu 16.04.5, use python3.6 and cuda10.0The text was updated successfully, but these errors were encountered: