Hi, I have been chasing a leak in modular symbols for well over a year and a half. Since then we had the test case below that clearly illustrates the problem:
mabsh...@sage:/scratch/release-cycle/sage-3.2.3.alpha0$ ./sage ---------------------------------------------------------------------- | Sage Version 3.2.2, Release Date: 2008-12-18 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: for i in range(10): ....: m = ModularSymbols(501,2).decomposition(3); del m; ModularSymbols_clear_cache(); get_memory_usage() ....: 725.77734375 742.2265625 744.3359375 755.8515625 762.125 763.8046875 776.29296875 778.55859375 781.6640625 785.88671875 sage: Exiting SAGE (CPU time 0m44.66s, Wall time 1m54.73s). So I was sitting around and I had some idle cycles, so I figured I would take another shot at the problem. And all the sudden the problem vanished since I was running each part (the creation as well as the decomposition) in its own loop without calling ModularSymbols_clear_cache() in the meantime. To my surprise the leak vanishes: mabsh...@sage:/scratch/release-cycle/sage-3.2.3.alpha0$ ./sage ---------------------------------------------------------------------- | Sage Version 3.2.2, Release Date: 2008-12-18 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: for i in range(10): ....: m = ModularSymbols(501,2).decomposition(3); del m; get_memory_usage() ....: 725.77734375 725.77734375 725.77734375 725.77734375 725.77734375 725.77734375 725.77734375 725.77734375 725.77734375 725.77734375 sage: sage: Exiting SAGE (CPU time 0m4.54s, Wall time 0m27.15s). So: The interesting question now is why? One possibility is that the content of the ModularSymbol's cache() is leaked when ModularSymbols_clear_cache() is called. Another one is that some other part of the computation is cached and maybe due to randomness in the algorithm the cached computation is in another part of Sage. Anyway, happy digging. Cheers, Michael --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---