-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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) on import torch_geometric #4363
Comments
Another thing to add might be that I use Pipenv as a package manager. This has never brought problems in the past with any PyTorch library. |
Thanks for reporting. You mentioned that you can I am not entirely sure how to interpret the |
Thanks for your speedy reply! torch_geometric seems to be the only package that gives me this error. I am able to import torch_scatter, torch_sparse, torch_cluster, torch_spline_conv, and torch_sparse without error. When I run the command I am not sure exactly what you mean by removing the dependency. Could you clarify what you mean by that? |
I thought it would be interesting to know about the error of |
When I remove those from my current environment I get a ModuleNotFoundError for torch_sparse. Reinstalling that and then trying to import torch_geometric gives me another ModuleNotFoundError for torch_scatter. Reinstalling that and trying to import torch_geometric again gives the segmentation fault, with gdb again yielding something about protobuf:
When I try a clean environment, and do the installation instructions listed under Installation via Pip Wheels I am able to import torch_geometric. This is very nice, but of course there might still be a problem with protobuf for whatever reason. I will try to make a clean environment, with all my other dependencies, and see if I can get it to work! |
So I think I figured it out, it has to with a version mismatch. For my first install I simply followed the instructions under Quick Start which installs the version for PyTorch 1.11.0. While my current work necessitated PyTorch 1.10.0. So, my bad for not paying attention. Thanks for the help anyway! |
Super :) Is this issue resolved or is there anything to do from our side to close this? :) |
I think it can be considered resolved! Maybe a different error message for
version mismatch would be nice (if possible), but in the end it's all RTFM
I suppose.
…On Tue, 29 Mar 2022, 10:28 Matthias Fey, ***@***.***> wrote:
Super :) Is this issue resolved or is there anything to do from our side
to close this? :)
—
Reply to this email directly, view it on GitHub
<#4363 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHRZGWZUBPITO5HBKS2TOYLVCK5MNANCNFSM5R2WQQ6A>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I had the same issue, and I followed the instructions of @DanielPerezJensen : deleted the following libraries (torch-scatter, torch-sparse, torch-cluster, and torch-spline-conv), I checked the version of PyTorch and Cuda, and I installed from the Quick Start installation. |
I am also having this issue. I installed using conda with Pytorch 1.13.1 Update I fixed this by installing from pip using 1.13.1 instead of 1.13.0. The website suggested 1.13.0 for some reason -- may need to fix that. |
Glad you got it working. Can you clarify what we need to fix? |
Hi, I have a similar issue. After reinstalling drivers, cuda and pytorch, I installed torch_geometric, but when I do |
This is likely a version mismatch problem. I had exactly the same issue after following the "Quick Start" on the web page. I remember my pytorch verion was pytorch 2.0.0 + cuda 11.8 and I downloaded pyg_lib in optional dependencies with the same pytorch and cuda version. However, pytorch was changed to 11.3.1+cuda117 after installing pyg. I fixed the problem by just uninstalling pyg_lib and reinstalling it with the correct pytorch and cuda version (pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-1.13.0+cu117.html). Hope this helps. |
Thanks for your answer. I managed to overcome the issue just by reinstalling torch and PyG in a new virtual environment, and everything works there. |
I have the same problem. I've followed the step by step guide. I have the following installed in my WSL system with python3.11 >>> import torch; print(torch.__version__)
2.2.1+cu121
>>> import torch; print(torch.version.cuda)
12.1 When first installing torch_geometric the import goes through without any problem. After installing: pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.2.0+cu121.html I've also updated the gcc version following this: >>> gcc --version
gcc (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I get a segmentation fault error when importing torch_geometric. Importing torch_scatter doesn't cause any problem, but importing torch_sparse gets a segmentation fault. I've tried installing different torch versions but the problem persists. Any help? |
So |
Hi @rusty1s, by running the following script: import faulthandler
import sys
faulthandler.enable(file=sys.stderr, all_threads=False)
try:
import torch_sparse
except Exeption as e:
faulthandler.dump_traceback_later(1)
quit() I get the following:
In case this log were not sufficient could you please suggest a better way to debug the error? Thank you! Edit: By setting the break point to line 21 in torch_sparse/storage.py and stepping through the debugger I can't reproduce the segmentation fault |
Looks like it breaks in the |
After commenting the |
🐛 Describe the bug
When I try to import torch_geometric I get a segmentation fault (core dumped) error.
I have tried reinstalling torch_geometric, and I have verified that PyTorch and torch-scatter library do work as intended (in the sense that importing them yields no errors).
I wish I could add more detail, but I am just trying to import torch_geometric to get started and as such haven't even used any functions yet, since every time I try to import I get this error.
I installed torch_geometric with the following command (from the getting started page):
pip install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.11.0+cu113.html
I have also installed the CPU version to check if that would not yield any error, but still I get the same segmentation fault (core dumped) error upon importing torch_geometric.
Environment
conda
,pip
, source): piptorch-scatter
):** torch_scatter: 2.0.9
** torch_cluster: 1.6.0
** torch_spline_conv: 1.2.1
UPDATE:
I added the output from
gdb python -c "import torch_geometric"
figured it might be useful:The text was updated successfully, but these errors were encountered: