Opened 6 years ago
Closed 6 years ago
#21756 closed enhancement (fixed)
Upgrade to PARI 2.9.1
Reported by:  Jeroen Demeyer  Owned by:  

Priority:  major  Milestone:  sage7.6 
Component:  packages: standard  Keywords:  atelierpari2017 
Cc:  Peter Bruin, John Cremona, Kiran Kedlaya, JeanPierre Flori  Merged in:  
Authors:  Jeroen Demeyer  Reviewers:  John Cremona, JeanPierre Flori, Vincent Delecroix 
Report Upstream:  N/A  Work issues:  
Branch:  1d577e1 (Commits, GitHub, GitLab)  Commit:  1d577e14640d5019790cf2272f52b856ba407607 
Dependencies:  Stopgaps: 
Description (last modified by )
Tarball: http://pari.math.ubordeaux.fr/pub/pari/unix/pari2.9.1.tar.gz
Numerous doctests have to be changed, due to different outputs from PARI (in particular the unit group of number fields).
One doctest change is potentially dubious but has been checked by John Cremona:
It can happen that no points are found if the height bounds used in the search are too small (see :trac:`10745`):: sage: K.<y> = NumberField(x^4 + x^2  7) sage: E = EllipticCurve(K, [1, 0, 5*y^2 + 16, 0, 0]) sage: E.gens(lim1=1, lim3=1) []  sage: E.rank(), E.gens() # long time (about 3 s)  (1, [(9/25*y^2 + 26/25 : 229/125*y^3  67/25*y^2  731/125*y  213/25 : 1)]) + sage: E.rank(), E.gens(lim3=12) # long time (about 4s) + (1, + [(369/25*y^3 + 539/25*y^2 + 1178/25*y + 1718/25 : 29038/125*y^3  43003/125*y^2  92706/125*y  137286/125 : 1)])
I had to increase the lim3
value for Simon's 2descent to find a point. The new point differs from the old point by a 3torsion point and a sign.
Change History (46)
comment:1 Changed 6 years ago by
Dependencies:  → #21765 

comment:2 Changed 6 years ago by
Dependencies:  #21765 → #21703 

comment:3 Changed 6 years ago by
Branch:  → u/jdemeyer/upgrade_to_pari_2_8_1 

comment:4 Changed 6 years ago by
Commit:  → a7099ae741973f0db3a767c8af1f57989ddacf15 

Description:  modified (diff) 
Summary:  Upgrade to PARI 2.8.1 → Upgrade to PARI 2.9.0 
comment:5 Changed 6 years ago by
Commit:  a7099ae741973f0db3a767c8af1f57989ddacf15 → 457bf6464a0a3efe1e397131457068e2d91e3ce3 

Branch pushed to git repo; I updated commit sha1. New commits:
457bf64  Upgrade to PARI 2.9.0

comment:6 Changed 6 years ago by
Commit:  457bf6464a0a3efe1e397131457068e2d91e3ce3 → 0f226f74fed5ebbfd623ecd88d8b9a76c66ffc70 

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
0f226f7  Upgrade to PARI 2.9.0

comment:7 Changed 6 years ago by
Commit:  0f226f74fed5ebbfd623ecd88d8b9a76c66ffc70 → 920252a6c8fe46490410c84ca508381e7f08393a 

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
920252a  Upgrade to PARI 2.9.0

comment:8 Changed 6 years ago by
Status:  new → needs_review 

comment:9 Changed 6 years ago by
Description:  modified (diff) 

comment:10 Changed 6 years ago by
Description:  modified (diff) 

comment:11 Changed 6 years ago by
Description:  modified (diff) 

comment:12 followup: 14 Changed 6 years ago by
Cc:  Peter Bruin John Cremona Kiran Kedlaya JeanPierre Flori added 

CC'ing random number theory people.
Given that the sum of the two result is of 3torsion, the new point is still a generator, so should we really worry? @Jeroen: do you think the precision change is worrying?
comment:13 Changed 6 years ago by
Nothing to worry about (in answer to the first question). The algorithm is computing E(Q)/2E(Q) anyway.
comment:14 Changed 6 years ago by
My worry is that PARI 2.8.0 found a point with the default settings of Simon's 2descent, while PARI 2.9.0 does not find a point (it only finds a point after increasing some bound).
comment:15 Changed 6 years ago by
I am having trouble with the new stackwarn patch and a pristine pari2.9.0 tarball.
patching file src/gp/gp.c patching file src/language/init.c Hunk #1 succeeded at 740 (offset 34 lines). Hunk #2 succeeded at 755 (offset 34 lines). Hunk #3 FAILED at 804. 1 out of 3 hunks FAILED  saving rejects to file src/language/init.c.rej
Am I doing something wrong?
comment:19 Changed 6 years ago by
Replying to jpflori:
Did you ask about the prec issue on paridevel?
No. Do you think that I should? It's not really a PARI issue, but a potential issue with the 2descent script.
comment:20 Changed 6 years ago by
Sure, but Karim or someone else there could be more knowledgeable than us.
comment:21 Changed 6 years ago by
Allow me to comment, since I know Simon's script quite well (he first wrote it at my suggestion in 1997 when he was Henri Cohen's grad student in Bordeaux and I was visiting). In the algorithm, various auxiliary curves ("homogeneous spaces") are constructed on which one must find rational points (one on each such curve is enough). The construction of these is dependent on some purely algebraic number field computations, of class groups and units, where the results are representatives of some equivalence classes, or generators of some group, and are not canonical. As we well know, new versions of pari often result in such representatives and/or generators changing. For Simon's code this means that the equations of the auxiliary curves will change but the curves represented by those equations are equivalent (in a technical sense which is all that matters for the algorithm). Now the new curves / equations will have rational points if and only if the old ones did, but they may be larger and harder to find, so as a side effect of a theoretically unimportant change in number fields code, one has to increase some search (*not* precision) bounds to get equally informative output.
comment:22 Changed 6 years ago by
So, John, can I conclude that you consider the change to be harmless (even though it looks like a regression).
comment:24 Changed 6 years ago by
Reviewers:  → John Cremona, JeanPierre Flori 

Status:  needs_review → positive_review 
Then LGTM.
comment:25 followup: 31 Changed 6 years ago by
Status:  positive_review → needs_work 

I'm getting
3348sage t long src/sage/interfaces/gp.py 3349********************************************************************** 3350File "src/sage/interfaces/gp.py", line 433, in sage.interfaces.gp.Gp._eval_line 3351Failed example: 3352 gp._eval_line('a='+str(list(range(2*10^5))))[:70] 3353Exception raised: 3354 Traceback (most recent call last): 3355 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/doctest/forker.py", line 498, in _run 3356 self.compile_and_execute(example, compiler, test.globs) 3357 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/doctest/forker.py", line 861, in compile_and_execute 3358 exec(compiled, globs) 3359 File "<doctest sage.interfaces.gp.Gp._eval_line[1]>", line 1, in <module> 3360 gp._eval_line('a='+str(list(range(Integer(2)*Integer(10)**Integer(5)))))[:Integer(70)] 3361 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/gp.py", line 441, in _eval_line 3362 wait_for_prompt=wait_for_prompt) 3363 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/expect.py", line 902, in _eval_line 3364 return self._eval_line_using_file(line) 3365 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/expect.py", line 790, in _eval_line_using_file 3366 raise RuntimeError('%s terminated unexpectedly while reading in a large line:\n%s'%(self,msg[0])) 3367 RuntimeError: PARI/GP interpreter terminated unexpectedly while reading in a large line: 3368 PARI/GP interpreter terminated unexpectedly while reading in a large line 3369********************************************************************** 3370File "src/sage/interfaces/gp.py", line 628, in sage.interfaces.gp.Gp._next_var_name 3371Failed example: 3372 for n in [1..13000]: # long time 3373 a = g(n) # long time 3374Exception raised: 3375 Traceback (most recent call last): 3376 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/doctest/forker.py", line 498, in _run 3377 self.compile_and_execute(example, compiler, test.globs) 3378 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/doctest/forker.py", line 861, in compile_and_execute 3379 exec(compiled, globs) 3380 File "<doctest sage.interfaces.gp.Gp._next_var_name[5]>", line 2, in <module> 3381 a = g(n) # long time 3382 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/interface.py", line 246, in __call__ 3383 return self._coerce_from_special_method(x) 3384 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/interface.py", line 272, in _coerce_from_special_method 3385 return (x.__getattribute__(s))(self) 3386 File "sage/structure/sage_object.pyx", line 715, in sage.structure.sage_object.SageObject._gp_ (/Users/buildslavesage/slave/sage_git/build/src/build/cythonized/sage/structure/sage_object.c:7387) 3387 return self._interface_(G) 3388 File "sage/structure/sage_object.pyx", line 680, in sage.structure.sage_object.SageObject._interface_ (/Users/buildslavesage/slave/sage_git/build/src/build/cythonized/sage/structure/sage_object.c:6554) 3389 X = I(s) 3390 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/interface.py", line 244, in __call__ 3391 return cls(self, x, name=name) 3392 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/expect.py", line 1380, in __init__ 3393 self._name = parent._create(value, name=name) 3394 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/interface.py", line 434, in _create 3395 self.set(name, value) 3396 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/gp.py", line 557, in set 3397 raise TypeError("Error executing code in GP:\nCODE:\n\t%s\nPARI/GP ERROR:\n%s"%(cmd, out)) 3398 TypeError: Error executing code in GP: 3399 CODE: 3400 sage[12001]=12001; 3401 PARI/GP ERROR: 3402 *** at toplevel: sage[12001]=12001 3403 *** ^ 3404 *** nonexistent component: index > 12000 3405********************************************************************** 34062 items had failures: 3407 1 of 3 in sage.interfaces.gp.Gp._eval_line 3408 1 of 8 in sage.interfaces.gp.Gp._next_var_name 3409 [155 tests, 2 failures, 10.25 s]
comment:26 followup: 32 Changed 6 years ago by
Since 2.9.1 was released today surely we might as well get that in rather than working more on 2.9.0?
comment:27 Changed 6 years ago by
They ignored my two reports to the "maintainer" issues list. It is minor but not cool.
comment:28 Changed 6 years ago by
Description:  modified (diff) 

Summary:  Upgrade to PARI 2.9.0 → Upgrade to PARI 2.9.1 
comment:29 Changed 6 years ago by
Dependencies:  #21703 

Description:  modified (diff) 
Milestone:  sage7.5 → sage7.6 
comment:30 Changed 6 years ago by
Commit:  920252a6c8fe46490410c84ca508381e7f08393a → 768635d691ef52cebbc6b005b25ccc5c7f7f465a 

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
768635d  Upgrade to PARI 2.9.1

comment:31 Changed 6 years ago by
Replying to vbraun:
I'm getting
3348sage t long src/sage/interfaces/gp.py 3349********************************************************************** 3350File "src/sage/interfaces/gp.py", line 433, in sage.interfaces.gp.Gp._eval_line 3351Failed example: 3352 gp._eval_line('a='+str(list(range(2*10^5))))[:70] 3353Exception raised: 3354 Traceback (most recent call last): 3355 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/doctest/forker.py", line 498, in _run 3356 self.compile_and_execute(example, compiler, test.globs) 3357 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/doctest/forker.py", line 861, in compile_and_execute 3358 exec(compiled, globs) 3359 File "<doctest sage.interfaces.gp.Gp._eval_line[1]>", line 1, in <module> 3360 gp._eval_line('a='+str(list(range(Integer(2)*Integer(10)**Integer(5)))))[:Integer(70)] 3361 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/gp.py", line 441, in _eval_line 3362 wait_for_prompt=wait_for_prompt) 3363 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/expect.py", line 902, in _eval_line 3364 return self._eval_line_using_file(line) 3365 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/expect.py", line 790, in _eval_line_using_file 3366 raise RuntimeError('%s terminated unexpectedly while reading in a large line:\n%s'%(self,msg[0])) 3367 RuntimeError: PARI/GP interpreter terminated unexpectedly while reading in a large line: 3368 PARI/GP interpreter terminated unexpectedly while reading in a large line 3369********************************************************************** 3370File "src/sage/interfaces/gp.py", line 628, in sage.interfaces.gp.Gp._next_var_name 3371Failed example: 3372 for n in [1..13000]: # long time 3373 a = g(n) # long time 3374Exception raised: 3375 Traceback (most recent call last): 3376 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/doctest/forker.py", line 498, in _run 3377 self.compile_and_execute(example, compiler, test.globs) 3378 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/doctest/forker.py", line 861, in compile_and_execute 3379 exec(compiled, globs) 3380 File "<doctest sage.interfaces.gp.Gp._next_var_name[5]>", line 2, in <module> 3381 a = g(n) # long time 3382 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/interface.py", line 246, in __call__ 3383 return self._coerce_from_special_method(x) 3384 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/interface.py", line 272, in _coerce_from_special_method 3385 return (x.__getattribute__(s))(self) 3386 File "sage/structure/sage_object.pyx", line 715, in sage.structure.sage_object.SageObject._gp_ (/Users/buildslavesage/slave/sage_git/build/src/build/cythonized/sage/structure/sage_object.c:7387) 3387 return self._interface_(G) 3388 File "sage/structure/sage_object.pyx", line 680, in sage.structure.sage_object.SageObject._interface_ (/Users/buildslavesage/slave/sage_git/build/src/build/cythonized/sage/structure/sage_object.c:6554) 3389 X = I(s) 3390 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/interface.py", line 244, in __call__ 3391 return cls(self, x, name=name) 3392 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/expect.py", line 1380, in __init__ 3393 self._name = parent._create(value, name=name) 3394 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/interface.py", line 434, in _create 3395 self.set(name, value) 3396 File "/Users/buildslavesage/slave/sage_git/build/local/lib/python2.7/sitepackages/sage/interfaces/gp.py", line 557, in set 3397 raise TypeError("Error executing code in GP:\nCODE:\n\t%s\nPARI/GP ERROR:\n%s"%(cmd, out)) 3398 TypeError: Error executing code in GP: 3399 CODE: 3400 sage[12001]=12001; 3401 PARI/GP ERROR: 3402 *** at toplevel: sage[12001]=12001 3403 *** ^ 3404 *** nonexistent component: index > 12000 3405********************************************************************** 34062 items had failures: 3407 1 of 3 in sage.interfaces.gp.Gp._eval_line 3408 1 of 8 in sage.interfaces.gp.Gp._next_var_name 3409 [155 tests, 2 failures, 10.25 s]
Confirmed (with PARI2.9.1).
comment:32 Changed 6 years ago by
Replying to cremona:
Since 2.9.1 was released today surely we might as well get that in rather than working more on 2.9.0?
Done. Since this is a minor change, I don't expect any new doctest failures.
comment:34 Changed 6 years ago by
Report Upstream:  N/A → Reported upstream. No feedback yet. 

comment:37 Changed 6 years ago by
Description:  modified (diff) 

Report Upstream:  Reported upstream. No feedback yet. → N/A 
comment:38 Changed 6 years ago by
Commit:  768635d691ef52cebbc6b005b25ccc5c7f7f465a → 5e91b6dc38e4fff0427a2dc7494c2dab5e917399 

comment:39 Changed 6 years ago by
Commit:  5e91b6dc38e4fff0427a2dc7494c2dab5e917399 → a0feccc84f6bc4c8da30c5d3840d6f6f9cc365ba 

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
a0feccc  Update prot_none.patch

comment:40 Changed 6 years ago by
Commit:  a0feccc84f6bc4c8da30c5d3840d6f6f9cc365ba → f7fabb3ba3fe07345ba1eaffdeb5ba4a5f640486 

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
f7fabb3  Update prot_none.patch

comment:41 Changed 6 years ago by
Commit:  f7fabb3ba3fe07345ba1eaffdeb5ba4a5f640486 → 3da9565a84c0704740e521feb9958ea0dce9c5ef 

comment:42 Changed 6 years ago by
Status:  needs_work → needs_review 

This now passes all tests on 32bit and 64bit.
comment:43 Changed 6 years ago by
Commit:  3da9565a84c0704740e521feb9958ea0dce9c5ef → 1d577e14640d5019790cf2272f52b856ba407607 

comment:44 Changed 6 years ago by
Reviewers:  John Cremona, JeanPierre Flori → John Cremona, JeanPierre Flori, Vincent Delecroix 

Status:  needs_review → positive_review 
Probably unrelated but I had one doctest failure running all tests in parallel
sage t src/sage/libs/gap/assigned_names.py # 1 doctest failed
I am not able to reproduce it.
comment:45 Changed 6 years ago by
Keywords:  atelierpari2017 added 

comment:46 Changed 6 years ago by
Branch:  u/jdemeyer/upgrade_to_pari_2_8_1 → 1d577e14640d5019790cf2272f52b856ba407607 

Resolution:  → fixed 
Status:  positive_review → closed 
New commits:
Interface PARI precision in bits
Remove obsolete comment about stack increasing
Add reference to precision guide in PariInstance.__init__
Merge tag '7.5.beta1' into t/21703/ticket/21703
Only use precisions which are in [33,64] mod 64
Improve documentation