vtraag / leidenalg

Implementation of the Leiden algorithm for various quality functions to be used with igraph in Python.
GNU General Public License v3.0
596 stars 78 forks source link

Segfault with 'move_nodes_constrained' but not with 'merge_nodes_constrained' #68

Closed AvantiShri closed 3 years ago

AvantiShri commented 3 years ago

I'm getting a segfault when I try to run move_nodes_constrained with a particular graph/initial community assignment. The segfault doesn't appear when I run merge_nodes_constrained. Here's a github gist to replicate the issue in Google Colab (it downloads the requisite input data): https://colab.research.google.com/gist/AvantiShri/7295d28f6d71a3d83c21d823a37cf010/leiden-move-nodes-segfault.ipynb

For now I will stick to using merge_nodes_constrained, though I'm not completely certain about the pros/cons of move_nodes_constrained vs. merge_nodes_constrained (I'd asked about them here - if you could shed light on when to use one versus the other, that would be appreciated! https://github.com/vtraag/leidenalg/issues/61)

vtraag commented 3 years ago

Thanks for the report, I will look into it! Sorry, I hadn't yet come around to answering a number of questions, hopefully I will have some more time next week.

vtraag commented 3 years ago

Thanks again for the bug report @AvantiShri, it revealed some more serious underlying problems. I have pushed a fix in #70, you can check it out. Unfortunately I have to leave now, and I won't be available next week, so I won't be able to make a new release next week. However, I plan to make a new release the week thereafter.