Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Sage 8.1 eats memory until system freeze

Hi, I have a quite long code (which uses arbitrary precision real numbers) which runs perfectly on Sage 7.5.1 (ppa for Mint 17.3 - Ubuntu 14.04). On Sage 8.1 (sage-8.1-Ubuntu_14.04-x86_64.tar.bz2) it starts to eat the memory until it freezes the system. I would like to help in debugging. Is there something that I can try/run/test? I can also upload the code, if necessary.

Sage 8.1 eats memory until system freeze

Hi, I have a quite long code (which uses arbitrary precision real numbers) which runs perfectly on Sage 7.5.1 (ppa for Mint 17.3 - Ubuntu 14.04). On Sage 8.1 (sage-8.1-Ubuntu_14.04-x86_64.tar.bz2) it starts to eat the memory until it freezes the system. I would like to help in debugging. Is there something that I can try/run/test? I can also upload the code, if necessary.

Finally, I have a minimal working code

def test(m,c,precision):
    M = 3*m
    RRR = RealField(prec = precision)
    coef02 = [RRR(1/i) for i in [1..M+1]]
    g = coef02[M]
    for i in [M-1..2,step=-1]: # Horner
        g = x*g+coef02[i]
    ME = 32
    disk = [exp (2*pi.n(precision)*I*i/ME) for i in range(ME)]
    gamma = abs(c)/2
    ellipse = [(gamma*(w+c^2/(4*gamma^2)/w)) for w in disk]
    epsilon1 = max([abs(g(x=z)) for z in ellipse])
    return
m = 40
for c in [1/2..10,step=1/2]:
    for ell in [1..10]:
        test(m,c,165)

If I run this in 7.5.1, I see (in top) the memory percentage stable around 2.5. If I run in 8.1, it grows up to 7.3 before code termination. If I increase the length of the loops, memory usage continues to grow.