-
Notifications
You must be signed in to change notification settings - Fork 248
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
ig.Graph loading of edge sequences in large graph (18.5 million vertices) produces SystemError #531
Comments
Can you check the values of |
I looked up the source of Python 3.9.12 and it seems like the offending call is a call to
where |
Yes, but 18 million is far from 2^31, so how did we get here? |
18 million is the number of vertices, not the number of edges. |
Ah, right. @mezwick igraph 0.10 will have overflow checks, and will also use 64-bit integers, so it should be immune to such problems (hopefully!). But with 0.9, the effective limits are at most |
If you are willing to compile it, you could try the development version of 0.10 right now. Instructions are here: https://github.com/igraph/python-igraph/#compiling-the-development-version Use the I'm not sure what the state of overflow checks is in the Python glue code, @ntamas ? The C core is in a pretty good shape already, though some stochastic graph generators can still overflow. Anyway, with 64-bit integers overflow will not be practically possible. |
The Python glue code still uses a mixture of |
Thanks for the quick responses. :) So illuminating already! Sounds like i have hit graph size limits.
A 0.9 subset of my data (16,689,330 vertices) is able to run. So, it would seem the number of edges in the full dataset are too many for the 32 bit integer limit? Thanks for taking the time to respond. Best, |
@mezwick I've briefly checked the code in If you need help with compiling the development branch, let me know. |
It's the result of integer overflow. You have more than 2^31 - 1 = 2,147,483,647 edges. |
Thanks. I have run... Is that all i need to do?
It does not appear to have updated the Sorry, i suspect i am missing something obvious. Installing the dev branch is new territory for me |
You might need to run |
i ran the following which took me a little further... but i appear to have hit a wall as need to install
|
If you don't have root access, you should still be able to install flex and bison with conda. |
i did try pip install of flex and bison in my conda-env, but appear to get the same error...?
|
flex and bison via conda install seems to be working... |
Why is pip complaining that you are running as root if you do not have root access? See:
|
Ok. So it seems i do have sudo permissions, I just needed to run I tried
but got the following
So instead ran,
However, it still seems my igraph and python-graph version numbers have not updated?
|
I think the compilation went fine; you will not see an updated version number in |
fantastic. thanks for your help both. i have hit run on my large graph script in the new environment.... will let you know if it runs! |
Happy to help fix the 32 -> 64 bit conversion for this if needed, since I know that glue code decently and @ntamas might be too busy. But let's see if it's necessary at all |
64-bit version of igraph looks to still be running fine so far. from my log...
|
Sounds promising! Maybe my in64 PR wasn't totally broken. Btw we'll have UMAP in igraph within a day or two, so if you want to embed the graph you can use igraph for both clustering and embedding. |
I'll close this now, since this is effectively fixed on |
Well, at least the loading part is fixed. @mezwick if you find any issues with processing a graph this large, please file another issue with the details |
Thankyou all for your help. I appreciate your time. |
happy to say |
How long did it take to complete? |
Leiden run time: 5h 26 mins 23.798647 secs |
Great, good to hear you managed to run everything @mezwick! Sounds like quite a reasonable run time. Sorry for my late reply, I only get to reading this now. Thanks all for helping out! |
Yes, that's correct; igraph is currently not guaranteed to be thread-safe and the algorithms use single-core implementations. |
Describe the bug
I am trying to generate an edge weighted graph
g
from a large anndataadata
object (18.5 million cells/rows). I can do this for a subset of data, but when i try to do this for the full dataset i get the followingSystemError
To reproduce
I am trying to generate the graph like so...
Apologies if this is in the wrong place, it may be a problem for the c igraph library.
I have also posted this problem on the scanpy github issues page, though think the issue may be more to do with loading weights into igraph so am bringing it here scverse/scanpy#1053 (comment) .
Version information
conda = 4.10.3
python = 3.9.12
python-igraph = 0.9.10
igraph = 0.9.8
The text was updated successfully, but these errors were encountered: