OK, here's a version with all the objects I can think of deleted after
the loops, and with some other tweaks I thought might help, except
they don't. It still rapidly eats memory up in 5 MB chunks on geom.
So it might be an Integer memory leak, which I seem to recall used to
happen quite a bit but I thought was fixed.
for c in srange(1,5000):
for i in prime_range(2,100):
c2=1
c1=1
while c1<30:
a4=c1*i
c1+=1
while c2<30:
a7=c2*i
c2+=1
a1=Integer(randint(3,100))
a2=Integer(randint(3,100))
a3=Integer(randint(3,100))
a5=Integer(randint(3,100))
a6=Integer(randint(3,100))
a8=Integer(randint(3,100))
a9=Integer(randint(3,100))
A = matrix(ZZ,[[a1,a2,a3], [a4,a5,a6],[a7,a8,a9]])
f = A.charpoly()
if f.is_irreducible() == True:
K=NumberField(f,'t',cache = False);
if K.is_galois()==True:
if f.discriminant()%i != 0:
print A, f
print "disc = ",factor(f.discriminant())
print "prime=",i
L = FiniteField(i,'q');
P.<w>=L[]
f.factor_mod(i)
print "(2,1) is in prime:",0==a4%i
print "(3,1) is in prime:",0==a7%i
print "(3,2) is in prime:",0==a8%i
del K
del A
del f
del a1,a2,a3,a5,a6,a7,a8,a9
del a4
On Mar 4, 4:28 pm, Marshall Hampton <[email protected]> wrote:
> Ah, right, thanks.
>
> On Mar 4, 4:20 pm, Yann <[email protected]> wrote:
>
> > the "del a4" should be indented one step more to the left (otherwise
> > you try to use it to define your matrix but it doesn't exist anymore)
--
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-support
URL: http://www.sagemath.org