Opened 12 years ago

Closed 11 years ago

#4835 closed defect (duplicate)

pari starts up without initializing enough primes?

Reported by: cremona Owned by: was
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: interfaces Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

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)

Change History (8)

comment:1 follow-up: Changed 12 years ago by cremona

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.

comment:2 Changed 12 years ago by mabshoff

  • Milestone set to sage-3.4

comment:3 in reply to: ↑ 1 Changed 12 years ago by cremona

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

comment:4 Changed 12 years ago by AlexGhitza

  • Summary changed from pari starts up without inititializing enough primes? to pari starts up without initializing enough primes?

comment:5 Changed 12 years ago by AlexGhitza

  • Component changed from algebra to interfaces
  • Owner changed from tbd to was

comment:6 Changed 11 years ago by jdemeyer

  • Milestone changed from sage-4.5.2 to sage-duplicate/invalid/wontfix
  • Report Upstream set to N/A

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

comment:7 Changed 11 years ago by jdemeyer

  • Status changed from new to needs_review

comment:8 Changed 11 years ago by mpatel

  • Resolution set to duplicate
  • Status changed from needs_review to closed
Note: See TracTickets for help on using tickets.