Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pari starts up without initializing enough primes? #4835

Closed
JohnCremona opened this issue Dec 20, 2008 · 3 comments
Closed

pari starts up without initializing enough primes? #4835

JohnCremona opened this issue Dec 20, 2008 · 3 comments

Comments

@JohnCremona
Copy link
Member

In 3.2.2, this looks ok:

sage: pari.default("primelimit")
500000

but nevertheless,

sage: K.<zeta>=CyclotomicField(23)
sage: K.ideal(2).factor()
...
---------------------------------------------------------------------------
PariError                                 Traceback (most recent call last)
...
PariError: not enough precomputed primes, need primelimit ~  (35)

Component: interfaces

Issue created by migration from https://trac.sagemath.org/ticket/4835

@JohnCremona
Copy link
Member Author

comment:1

I have narrowed it down to here:

sage: K.<z> = CyclotomicField(23)
sage: pK = K.pari_bnf(certify=False, units=True)
sage: pK.bnfcertify()

  ***   Warning: large Minkowski bound: certification will be VERY long.
---------------------------------------------------------------------------
PariError                                 Traceback (most recent call last)

/home/john/sage-3.2.2.rc1/<ipython console> in <module>()

/home/john/sage-3.2.2.rc1/local/lib/python2.5/site-packages/sage/libs/pari/gen.so in sage.libs.pari.gen._pari_trap (sage/libs/pari/gen.c:38663)()

PariError: not enough precomputed primes, need primelimit ~  (35)

sage: pari.default("primelimit")
500000

I uncommented line 6903 in sage/libs/pari/gen.pyx so I know that pari_init() was called with maxprime=500000 (the default) exactly once on startup and not again. So the question in the ticket description seems to have a negative answer.

However in a gp session ("pari -gp", so the same version) I get:

? bnfcertify(bnfinit(polcyclo(23),1))
  *** bnfcertify: Warning: large Minkowski bound: certification will be VERY long.
  *** bnfcertify: not enough precomputed primes, need primelimit ~ 9324407.

so perhaps pari really cannot certify this field with having all primes up to 9.3 million, and the problem is that the error message report the wrong value for some reason when called from within Sage. This is confirmed by continuing the above Sage session like this:

sage: pari.init_primes(10^7)
sage: pK.bnfcertify()
  ***   Warning: large Minkowski bound: certification will be VERY long.

followed by a long wait but no error message.

@sagetrac-mabshoff sagetrac-mabshoff mannequin added this to the sage-3.4 milestone Dec 20, 2008
@JohnCremona
Copy link
Member Author

comment:3
sage: pari.init_primes(10^7)
sage: pK.bnfcertify()
  ***   Warning: large Minkowski bound: certification will be VERY long.

followed by a long wait(*) but no error message.

3h 20m later:

1

@aghitza aghitza changed the title pari starts up without inititializing enough primes? pari starts up without initializing enough primes? Dec 21, 2008
@jdemeyer
Copy link

jdemeyer commented Aug 2, 2010

comment:6

This issue does not appear anymore after upgrading PARI (ticket #9343), so I'm marking this invalid/duplicate/wontfix.

@jdemeyer jdemeyer removed this from the sage-4.5.2 milestone Aug 2, 2010
@qed777 qed777 mannequin added r: duplicate and removed p: major / 3 labels Sep 10, 2010
@qed777 qed777 mannequin closed this as completed Sep 10, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants