Closed brgew closed 3 years ago
Thanks for the report! I am able to reproduce the problem locally, so I will investigate further. You can compile the Python package by just setting C(PP)FLAGS
environment variables as normally done.
As an aside, I notice that you contributed leiden-related functions to igraph and rigraph. Do you consider those to be ready for 'production' use? If so, I may consider using those rather than leidenbase.
Yes, they are ready for use, but the implementation is much less flexible than what is provided in this package. Nonetheless, it might just cover 80% of the use cases of people.
I must admit that I forgot about leidenbase
, @evanbiederstedt also developed an R package to interface with leidenalg
and @TomKellyGenetics developed a R package based on reticulate
, see https://github.com/vtraag/leidenalg/issues/59 for some discussion. Perhaps it would be an opportunity to join forces and make a common supported implementation available that exposes all the functionality in the leidenalg
package in a native R package, including the multiplex support?
This is now solved in https://github.com/vtraag/leidenalg/commit/c6ea5e44fe11ae6f18434abbc84cd2056f383034, feel free to pull in the latest version from the master
branch and retry. I will fix some of the other open issues and then make a new release.
Hi,
I appreciate your responses about the reproducibility with your reassurance, and the compiler information. I offer a large basket of thanks!
Ever grateful, Brent
It seems there was still a problem with the way the caching was cleared, this should now be fixed in https://github.com/vtraag/leidenalg/commit/0947e632724f089f1f6d0ca8b6aaa5e7d3766ec5.
Hi,
I corresponded with you several years ago when I was writing an R interface (leidenbase) to your excellent leiden community detection algorithms and functions. Several users reported recently crashes on CentOS 8 systems. This is similar to the issue # 12 on github
https://github.com/vtraag/leidenalg/issues/12
that is, an exception interrupts execution with the message+crash
I tend to write narratives but I'll try to keep to the essentials for your sake so I omit the multitude of dead-end paths that I explored until I became more confident that my code is not the immediate problem.
I reproduced the problem on a R version 4.0.2 CentOS Linux release 8.2.2004 and discovered that the file
has C*FLAGS compiler options that include '-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions'. R on a Debian buster system initially runs without error but adding these options to the /usr/lib/R/etc/Makeconf C*FLAGS variables (and reinstalling leidenbase) causes the same crash as on CentOS 8.
I gathered just enough confidence to submit this issue when I found that I can get the same crash by ad edgelist.edg.gz d
resolution_parameter=0.5
toleidenalg.find_partition
in the following leidenalg-based python program (when run on CentOS 8, which I hoped uses the '-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions' compiler options):The output is
I don't know how to set C*FLAGS for python package installation, which is why I ran this test program on the CentOS 8 system. (If you know how to set those flags and are willing to share the information, I would appreciate it greatly.) I attach the edgelist file, in case it may be of use to you.
Somewhere along the line of investigation, I returned to the Debian system with the modified C*FLAGS Makeconf variables (and removed the optimization flags) and ran R with the debugger. The stack dump after crashing is
It looks like the problem is detected somewhere in the system libraries after executing
#4 0x00007fffe7bc99c5 in MutableVertexPartition::cache_neigh_communities (this=0x555558a1f410, v=452, mode=IGRAPH_ALL) at leidenalg/src/MutableVertexPartition.cpp:815
I hope that I am not misleading you and myself when I submit this issue.
As an aside, I notice that you contributed leiden-related functions to igraph and rigraph. Do you consider those to be ready for 'production' use? If so, I may consider using those rather than leidenbase.
Ever grateful, Brent