On 8/28/07, Iftikhar Burhanuddin <[EMAIL PROTECTED]> wrote:
> Dear William,
>
> On Sun, 19 Aug 2007, William Stein wrote:
> > On 8/19/07, Iftikhar Burhanuddin <[EMAIL PROTECTED]> wrote:
> > > > There was a huge bug-squashing day today with many people at over
> > > > 30 SAGE bugs fixed.  The most interesting one whose fix turns out
> > > > to be pretty important was one you had reported:
> > > >    http://www.sagemath.org:9002/sage_trac/ticket/274
> > > > So this will be fixed in sage-2.8.2.
> > >
> > > That's great news. Now I can get back to some long runs of
> > > SupersingularModule computation. Thanks!
> >
> > Unfortunately there might be other memory leaks or bugs.  But if
> > you find them, definitely report them, as they will get fixed soon.
>
> The original code at
>
> http://www.sagemath.org:9002/sage_trac/ticket/274
>
> {{{
> sage: get_memory_usage()
> '276M'
> sage: K = GF(10007^2, 'a')
> sage: X = PolynomialRing(K, 'x').gen()
> sage: for i in range(1000):
>     s = K.random_element(); t = K.random_element()
>     poly = s + t*X
> ....:
> sage: get_memory_usage()
> '281M'
> }}}
>
> now only leaks about 0.1MB, but extending the for loop range from 10**3
> to 10**5 leaks about 6.3MB!
>
> Also the following code
>
> {{{
> def Supercomp():
>     p=ZZ(10**5).next_prime()
>     szfilename = "timings100k.txt"
>     mem_szfilename = "memory100k.txt"
>     while true:
>         t = cputime()
>         M = get_memory_usage()
>         X = SupersingularModule(p)
>         X.hecke_matrix(2)
>         f = open(szfilename, 'a')
>         f.write(str([p, cputime(t)]) + ", ")
>         f.close()
>         g = open(mem_szfilename, 'a')
>         g.write(str([p, get_memory_usage()-M]) + ", ")
>         g.close()
>         X.save('X' + str(p))
>         p = ZZ(p).next_prime()
>
> Supercomp()
> }}}
>
> had consumed 20% of memory on sage.math after a day of computation and I
> had to kill it.
>
> ===
>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 24320 burhanud  39  19 12.2g  11g  15m R  100 18.9   1453:36 sage-ipython
> ===
>
> I'll have to spend some time to pin down where the leaks are.

Thanks, Ifti.  I've made this trac #501:

http://trac.sagemath.org/sage_trac/ticket/501


> Regards,
> Ifti
>
>


-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://www.williamstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to