Hi Thomas,
   Sorry for taking so long to respond as I was away from my computer last 
week to test.

Yes, I seem to be seeing it as well. However, if it is within bliss, then 
it needs to be solved upstream (and/or with a patch here).

Best,
Travis


On Tuesday, April 26, 2022 at 5:47:07 AM UTC+9 t.will...@gmail.com wrote:

> Hi Travis,
> I do not know whether the leak is caused within bliss or by sage's wrapper 
> unfortunately.
> But can you reproduce the problem?
> Best,
> Thomas
>
>
>
> On Monday, April 25, 2022 at 2:49:07 AM UTC+2 Travis Scrimshaw wrote:
>
>> Hi Thomas,
>>    Could the memleak be coming from within bliss?
>>
>> Best,
>> Travis
>>
>>
>> On Sunday, April 24, 2022 at 1:50:26 AM UTC+9 t.will...@gmail.com wrote:
>>
>>> Dear all,
>>>
>>> there seems to be a memory leak in canonical_label(...), using bliss.
>>> Here is a test script to demonstrate the problem:
>>>
>>> -----------------
>>>
>>> import os, psutil
>>>
>>> from sage.all import *
>>>
>>> process = psutil.Process(os.getpid())
>>> oldmem = process.memory_info().rss
>>>
>>> for i in range(1000000):
>>>     G = graphs.RandomGNM(10,20)
>>>     canonG = G.canonical_label(algorithm='bliss')
>>>     # canonG = G.canonical_label(algorithm='sage')
>>>
>>>     if i%1000 == 0:
>>>        print(f"graph count {i}, mem usage (Delta) {process.memory_info
>>> ().rss - oldmem}")
>>>        oldmem = process.memory_info().rss
>>>
>>> --------
>>>
>>> This uses up more and more memory if I use 'bliss' as algorithm:
>>> On my machine around 260KB/1000 calls are lost.
>>> Invoking garbage collection manually does not help.
>>> I believe this might be a bug.
>>>
>>> There is no memory leak using 'sage' as algorithm.
>>>
>>> Info on my system:
>>> MacBook Pro with M1 processor, macOS Monterey,
>>> sage 9.4, bliss 0.73
>>>
>>> Thanks a lot for your help,
>>>
>>> Thomas
>>>
>>> P.S.: The amount of memory lost in the sample script is small on an 
>>> absolute scale, but our  programs run for a week or two and we end up 
>>> losing many GB.
>>> The obvious bugfix is to use algorithm='sage', but this is twice slower 
>>> than bliss.
>>>
>>>
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/b249581b-e41c-4763-98ff-3e7be47991e9n%40googlegroups.com.

Reply via email to