Closed JohnCremona closed 15 years ago
Attachment: sage-trac-4715.patch.gz
There's another problem, watch this space:
sage: E=EllipticCurve('153c2')
sage: E.tamagawa_exponent(3)
<boom>
Attachment: sage-trac-4715-2.patch.gz
Fixing that also showed up the following completely independent bug (only on 32-bit machines though):
sage: E=EllipticCurve('903b3')
sage: E.pari_curve()
<boom> (PariError: precision too low)
The second patch fixes that as well as the other (which only applied to type I*0). Now I have checked tamagawa_index() for all curves in the database up to conductor 10000 and all bad primes for each, so I hope that's that.
To fix the pari precision problem I did a try/except which keeps doubling the precision until it's ok. I hope that is not against the rules: if pari's ellinit every crashes for a reason other than precision, this would be an infinite loop.
In the course of this testing I found that looping through thousands of curves ate up a lot of memory. I made a change so that for curves over QQ, local_data() uses prime integers arther than prime ideals, and that helps a bit, but there is still more memory begin eaten up than I would like. For example:
sage: for e in cremona_curves(srange(11,10000)):
for p in e.conductor().support():
ld = e.local_data(p)
print e.cremona_label()
On my machine the used RAM creeps up gradually, hits 1GB at around conductor 2400, and if I let it continue it starts to make my machine really suffer at 1.7GB (no prizes for guessing the amount of RAM I have).
This might deserve a separate ticket.
Hi John,
please open a ticket for the memory issues/leaks you are seeing. We are current chasing a number of leaks, most of which seem coercion related.
Cheers,
Michael
Merged both patches in Sage 3.2.2.alpha1
In #9931, I plan to revert this ticket's patch to sage/schemes/elliptic_curves/ell_rational_field.py
, since the workaround seems not needed anymore.
4412 had a buglet: for Kodaira Class Im the _roman field was not being set (it should be 1). This is only currently used in the tamagawa_exponent() function for elliptic curves over number fields.
One-line patch coming up, plus a corresponding doctest.
This was reported by Tobias Nagel:
CC: @sagetrac-tnagel
Component: number theory
Issue created by migration from https://trac.sagemath.org/ticket/4715