igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Memory leak when using Graph.Adjacency in Python interface


From: Jonathan F. Donges
Subject: Re: [igraph] Memory leak when using Graph.Adjacency in Python interface
Date: Thu, 10 Dec 2009 15:39:16 +0100

Dear Tamas,

Thank you very much for your quick response! I recompiled the Python interface after replacing the file in the original 0.5.2 version with the updated one from launchpad. After installing without error messages, I get this error after trying to import igraph into Python:

Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import igraph
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/igraph/__init__.py", line 30, in <module>
    from igraph.core import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/igraph/core.so, 2): Symbol not found: _igraph_diameter_dijkstra
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/igraph/core.so
  Expected in: dynamic lookup

Do you have an idea, what could be the cause of this? Is there an easy way to obtain the complete latest version of the Python igraph 0.5 branch from launchpad? Possibly also the latest version of the corresponding C library?

Thanks again and best wishes!
Jonathan


2009/12/10 Tamas Nepusz <address@hidden>
Dear Jonathan,

> While the loop is being executed, the memory is quickly being filled up. The
> memory is only freed, when the Python shell is closed or the program
> terminates. Explicitly calling the Python garbage collector does not help.
Thanks for pointing that out, this is indeed a memory leak. Luckily, it
is easy to fix if you are willing to recompile the Python interface (the
core C library is unaffected). Here's a patch for the 0.5 branch:

http://bazaar.launchpad.net/~igraph/igraph/0.5-main/revision/1554

Best,
--
Tamas


_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help


reply via email to

[Prev in Thread] Current Thread [Next in Thread]