igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Python-igraph: Possible memory leak in GraphBase.get_all_sh


From: Tamas Nepusz
Subject: Re: [igraph] Python-igraph: Possible memory leak in GraphBase.get_all_shortest_paths()
Date: Mon, 7 Dec 2015 22:23:19 +0100

Hi,

I have tested it now on a Mac with the following code:

#!/usr/bin/env python

from psutil import Process
from igraph import Graph

import gc

self = Process()
g = Graph.GRG(400, 0.1)
for i in xrange(100):
    sps = g.get_all_shortest_paths(0)
    del sps
    gc.collect()
    mem_info = self.memory_info()
    print i, mem_info.rss, mem_info.vms

The memory usage seems pretty stable to me; these are the results
(iteration count, resident set size, virtual memory size):

0 23523328 2532331520
1 24576000 2535403520
2 24584192 2535411712
3 23535616 2534363136
4 24584192 2535411712
5 25657344 2536476672
6 23560192 2534379520
7 23564288 2534379520
8 24788992 2534354944
9 25837568 2535403520
10 23744512 2533306368
11 24698880 2533339136
12 23773184 2533339136
13 24817664 2534387712
14 26710016 2535436288
15 23773184 2533339136
16 24825856 2534387712
17 24825856 2534387712
18 24821760 2534387712
19 23773184 2533339136
20 24821760 2534387712

So I don't think there's a leak there, at least not on Mac OS X. If
you can send me a small, self-contained program, equipped with a
similar instrumentation (see the code above) that seems to leak on
your machine, that would be great. (Note that you'll need to install
psutil from pip).

All the best,
T.


On Mon, Dec 7, 2015 at 9:29 AM,  <address@hidden> wrote:
> Hi,
>
> I am developing a network analysis tool for evolutionary biology, which uses
> python-igraph. It appears that repeatedly calling get_all_shortest_paths()
> on the graph results in the consumption of available memory quite quickly. I
> have narrowed the memory leak down to get_all_shortest_paths() by using a
> memory profiler.
>
> I was using python-igraph-0.6 earlier and then upgraded to
> python-igraph-0.7.1.post6. The upgrade did not solve the problem. The OS is
> Ubuntu 14.04 LTS, with python 2.7.6.
>
> Has someone else come across the same issue?
>
> Regards,
> /Fahad
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



reply via email to

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