Opened 11 years ago
Last modified 10 years ago
#11130 closed defect
Update PARI to version 2.5.0 — at Version 71
Reported by: | jdemeyer | Owned by: | jdemeyer |
---|---|---|---|
Priority: | critical | Milestone: | sage-4.8 |
Component: | packages: standard | Keywords: | pari spkg sd32 |
Cc: | mstreng, dimpase, jpflori | Merged in: | |
Authors: | Jeroen Demeyer, John Cremona | Reviewers: | John Cremona |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #11230, #11234, #11321 (install this after building PARI) | Stopgaps: |
Description (last modified by )
We need to add bugfixes for
- http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1147 (#9334)
- http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1153 (#10195)
- http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1154 (#11604)
- http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1184 (related to #9937)
- http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1185 (PARI bug discovered by a Sage doctest)
- http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1186 (PARI performance regression discovered by a Sage doctest)
- http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1187 (PARI bug discovered by a Sage doctest)
- http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1188 (PARI bug discovered by a Sage doctest)
- http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1192 (#10767)
We will do this by updating to PARI version 2.5.0, which is equal to svn revision 13228.
See also:
- #9343, #10430 (previous PARI upgrades)
- #10247 (Sage 4.6 has PARI problems on Cygwin)
- #10240 (pari-2.4.3.svn-12577.p9 incorrectly checks for the shared library on Cygwin), included in the 2.4.3.alpha.p7 spkg at #11605
- #11605 (Typos in PARI's spkg-install (2.4.3.alpha.p5)), included in the 2.4.3.alpha.p7 spkg at #11605
Apply:
- spkg http://boxen.math.washington.edu/home/jdemeyer/spkg/pari-2.5.0.p2.spkg (jdemeyer)
- spkg http://boxen.math.washington.edu/home/jdemeyer/spkg/lcalc-1.23.p8.spkg (from #11321)
- 11130_sagelib.patch (jdemeyer)
- trac_11130-doctest-poly.patch (cremona)
- 11130_sagelib32.patch (cremona)
- 11130-sagelib-simon.patch (cremona)
- 11130_reviewer32.patch (jdemeyer)
- extcode patch 11130-extcode-simon.patch (cremona)
Change History (75)
comment:1 Changed 11 years ago by
- Description modified (diff)
- Summary changed from Add some patches to PARI to Update PARI to a more recent SVN version
comment:2 Changed 11 years ago by
- Description modified (diff)
- Status changed from new to needs_work
comment:3 Changed 11 years ago by
- Description modified (diff)
comment:4 Changed 11 years ago by
- Cc mstreng added
comment:5 Changed 11 years ago by
- Milestone changed from sage-4.7 to sage-4.7.1
comment:6 Changed 11 years ago by
- Description modified (diff)
comment:7 Changed 11 years ago by
- Description modified (diff)
comment:8 Changed 11 years ago by
- Description modified (diff)
comment:9 Changed 11 years ago by
- Description modified (diff)
comment:10 Changed 11 years ago by
- Description modified (diff)
comment:11 Changed 11 years ago by
- Description modified (diff)
comment:12 Changed 11 years ago by
- Dependencies set to #11230
- Description modified (diff)
comment:13 Changed 11 years ago by
- Description modified (diff)
comment:14 Changed 11 years ago by
- Description modified (diff)
comment:15 Changed 11 years ago by
- Cc dimpase added
comment:16 Changed 11 years ago by
- Description modified (diff)
comment:17 follow-up: ↓ 22 Changed 11 years ago by
comment:18 follow-up: ↓ 19 Changed 11 years ago by
After (1) Building a fresh 4.7.alpha5 from scratch, (2) installing the spkg lined here with "sage -f", (3) applying the patch here to the sage library and (4) running "sage -b", I find that the Sage build will not start up properly:
ImportError Traceback (most recent call last) ... /home/jec/sage-4.7.alpha5.11130/local/lib/python2.6/site-packages/sage/misc/functional.py in <module>() 36 37 ---> 38 from sage.rings.complex_double import CDF 39 from sage.rings.real_double import RDF, RealDoubleElement 40 /home/jec/sage-4.7.alpha5.11130/local/bin/gen.pxd in init sage.rings.complex_double (sage/rings/complex_double.c:15178)() ImportError: /home/jec/sage-4.7.alpha5.11130/local/lib/python2.6/site-packages/sage/libs/pari/gen.so: undefined symbol: defaultOut Error importing ipy_profile_sage - perhaps you should run %upgrade? WARNING: Loading of ipy_profile_sage failed.
so I cannot test anything.
Did I do something wrong?
comment:19 in reply to: ↑ 18 ; follow-up: ↓ 20 Changed 11 years ago by
comment:20 in reply to: ↑ 19 Changed 11 years ago by
comment:21 Changed 11 years ago by
- Dependencies changed from #11230 to #11230, #11234
- Description modified (diff)
- Owner changed from tbd to jdemeyer
comment:22 in reply to: ↑ 17 Changed 11 years ago by
Replying to cremona:
I am currently testing this. To avoid duplication of effort, I'll fix things I find in the elliptic_curves directory only.
Sounds good, I will look at everything else.
comment:23 Changed 11 years ago by
I added a patch which fixes the doctest failures in sage/rings/polynomial/polynomial_quotient_ring.py . In all cases the new output was equivalent to the old.
There are now just some failures in sage/schemes/elliptic_curves/ell_rational_field.py (2 doctests failed) and sage/schemes/elliptic_curves/ell_number_field.py (1 doctests failed).
comment:24 Changed 11 years ago by
- Reviewers set to John Cremona
- Status changed from needs_work to needs_review
ell_rational_field.py: only one failure, looks completely trivial but will be left until #11005 to be fixed.
ell_number_field.py: one failure, even more trivial: the final output is exactly the same as it was but the verbose output is a little different, so this can be easily cleaned up at #11005.
As far as I am concerned this needs *no more work* on this ticket, but I'll delay marking it positive review until the same is possible at #11005. Still, it certainly gets "needs review" on that basis.
comment:25 follow-up: ↓ 26 Changed 11 years ago by
This patch should also be tested on various systems first, PARI is known to produce different results on 32-bit and 64-bit systems.
comment:26 in reply to: ↑ 25 Changed 11 years ago by
Replying to jdemeyer:
This patch should also be tested on various systems first, PARI is known to produce different results on 32-bit and 64-bit systems.
Good point. I can test it on my 32-bit laptop.
comment:27 Changed 11 years ago by
- Description modified (diff)
- Work issues set to Test on various systems
comment:28 Changed 11 years ago by
- Description modified (diff)
comment:29 Changed 11 years ago by
- Description modified (diff)
comment:30 Changed 11 years ago by
- Work issues changed from Test on various systems to Test on various systems with #10247 applied
comment:31 Changed 11 years ago by
- Status changed from needs_review to needs_work
In sage/rings/number_field/number_field.py
, there is a test which fails only when -long
is not used.
comment:32 Changed 11 years ago by
New patch fixes the long time issue (by setting a random seed explicitly). I will test on a Mac OS X 10.4 32-bit PPC system.
comment:33 Changed 11 years ago by
comment:34 follow-up: ↓ 35 Changed 11 years ago by
Testing now on a 32-bit ubuntu system.
comment:35 in reply to: ↑ 34 Changed 11 years ago by
Replying to cremona:
Testing now on a 32-bit ubuntu system.
... which gave several more failures:
sage -t devel/sage-main/sage/rings/number_field/number_field.py # 1 doctests failed sage -t devel/sage-main/sage/schemes/elliptic_curves/ell_number_field.py # 2 doctests failed sage -t devel/sage-main/sage/schemes/elliptic_curves/ell_rational_field.py # 1 doctests failed sage -t devel/sage-main/sage/rings/number_field/number_field_element.pyx # 1 doctests failed sage -t devel/sage-main/sage/rings/polynomial/polynomial_quotient_ring.py # 3 doctests failed sage -t devel/sage-main/sage/rings/integer.pyx # 1 doctests failed
Details:
sage -t "devel/sage-main/sage/rings/number_field/number_field.py" ********************************************************************** File "/home/john/sage-4.7.alpha5/devel/sage-main/sage/rings/number_field/number_field.py", line 3616: sage: L.factor(a + 1) Expected: (Fractional ideal (1/2*a*b + a + 1/2)) * (Fractional ideal (-1/2*b - 1/2*a + 1)) Got: (Fractional ideal (-1/2*a*b - a - 1/2)) * (Fractional ideal (1/2*b + 1/2*a - 1))
is trivial,
sage -t "devel/sage-main/sage/rings/number_field/number_field_element.pyx" ********************************************************************** File "/home/john/sage-4.7.alpha5/devel/sage-main/sage/rings/number_field/number_field_element.pyx", line 1142: sage: t = (2*a + b)._rnfisnorm(L); t[1] Expected: (b - 2)*a + 2*b - 3 Got: (-4*b - 5)*a + 5*b + 6
needs looking at,
sage -t "devel/sage-main/sage/rings/polynomial/polynomial_quotient_ring.py"
are just like the ones I fixed before on the other machine, and
sage -t "devel/sage-main/sage/rings/integer.pyx" ********************************************************************** File "/home/john/sage-4.7.alpha5/devel/sage-main/sage/rings/integer.pyx", line 4389: sage: 7._bnfisnorm(CyclotomicField(7)) Expected: (-zeta7 + 1, 1) Got: (-zeta7^5 + zeta7^4, 1)
is also trivial (multiplying by a power of zeta does not change the norm!).
That's all I have time for today, so I hope things look similar on the other 32-bit system being tested.
comment:36 Changed 11 years ago by
- Description modified (diff)
I have added a new patch (which affects 4 files in sage/rings) after which all doctests pass on both 32- and 64-bit, apart from the simon-related ones.
That means that it is time to check #11005 on top of all this.
comment:37 Changed 11 years ago by
- Description modified (diff)
- Work issues Test on various systems with #10247 applied deleted
comment:38 Changed 11 years ago by
- Description modified (diff)
comment:39 Changed 11 years ago by
- Description modified (diff)
- Summary changed from Update PARI to a more recent SVN version to Update PARI to version 2.4.4.BETA
comment:40 Changed 11 years ago by
- Description modified (diff)
comment:41 follow-up: ↓ 42 Changed 11 years ago by
lcalc fails to build with the new PARI:
Lcommandline.cc: In function 'int main(int, char**)': Lcommandline.cc:476:54: error: 'allocatemoremem' was not declared in this scope Lcommandline.cc:403:16: warning: unused variable 'C' [-Wunused-variable] Lcommandline.cc:38:9: warning: unused variable 'i' [-Wunused-variable] In file included from ../include/L.h:537:0, from ../include/Lcommandline.h:36, from Lcommandline.cc:31: ../include/Lvalue.h: In member function 'Complex L_function<ttype>::find_delta(Complex, Double) [with ttype = int, Complex = std::complex<double>, Double = double]': Lcommandline.cc:463:50: instantiated from here ../include/Lvalue.h:37:21: warning: unused variable 'f2' [-Wunused-variable] make[1]: *** [Lcommandline.o] Error 1 make[1]: Leaving directory `/usr/local/src/sage-4.7.alpha5/spkg/build/lcalc-20100428-1.23.p6/src/src' make: *** [all] Error 2 Error building lcalc 'make'
comment:42 in reply to: ↑ 41 ; follow-up: ↓ 45 Changed 11 years ago by
Replying to jdemeyer:
lcalc fails to build with the new PARI:
Mike Rubenstein needs to be made aware of this.
comment:43 follow-up: ↓ 44 Changed 11 years ago by
What about genus2reduction? I am assuming John already made sure eclib is working.
comment:44 in reply to: ↑ 43 Changed 11 years ago by
Replying to fbissey:
What about genus2reduction? I am assuming John already made sure eclib is working.
A reasonable assumption, but...for a while now I have used Sage's Pari and NTL builds rather than building them myself independently, so I cannot yet confirm. (However, eclib's use of Pari is minimal, it's only for integer factorization.)
I am also preparing a new version of eclib, so I will combine these two tasks, though I don't have any time for this this week.
comment:45 in reply to: ↑ 42 Changed 11 years ago by
comment:46 Changed 11 years ago by
- Dependencies changed from #11230, #11234 to #11230, #11234, #11321
- Description modified (diff)
See #11321 for lcalc.
comment:47 Changed 11 years ago by
- Dependencies changed from #11230, #11234, #11321 to #11230, #11234, #11321 (install this '''after''' building PARI)
comment:48 follow-up: ↓ 49 Changed 11 years ago by
- Work issues set to Fix simon_two_descent doctests
I built Sage completely from scratch with the new PARI and lcalc packages, everything works. All tests pass except for the ones related to simon_two_descent.
comment:49 in reply to: ↑ 48 ; follow-up: ↓ 50 Changed 11 years ago by
Replying to jdemeyer:
I built Sage completely from scratch with the new PARI and lcalc packages, everything works. All tests pass except for the ones related to simon_two_descent.
So is the "Needs work" just because this ticket is dependent on #11005? I am planning to look now at the doctest failures relating to the Simon scripts and fix them, so that this ticket can then be closed, and the additional work needed on #11005 can depend on this.
comment:50 in reply to: ↑ 49 ; follow-up: ↓ 51 Changed 11 years ago by
- Description modified (diff)
comment:51 in reply to: ↑ 50 Changed 11 years ago by
Replying to jdemeyer:
Replying to cremona:
I am planning to look now at the doctest failures relating to the Simon scripts and fix them, so that this ticket can then be closed, and the additional work needed on #11005 can depend on this.
That's precisely what I proposed.
OK, so that's what I am working on doing. Patch up shortly. However, I ran into something awkward: the script ellQ.gp in data/extcode/pari/simon crashed randomly in the function ellredgen (using this new pari version). I saw that the offending lines had been changed in the newer ellQ.gp as found in #11005, so I made the same changes. This sorts the problem, but it means that for this ticket to be finished we need to also make a small patch to extcode. Any problems with that?
comment:52 Changed 11 years ago by
- Description modified (diff)
- Status changed from needs_work to needs_review
comment:53 Changed 11 years ago by
- Description modified (diff)
comment:54 Changed 11 years ago by
- Description modified (diff)
- Work issues Fix simon_two_descent doctests deleted
comment:55 Changed 11 years ago by
Is the only thing stopping this going forward the latest reviewer patch?
comment:56 follow-up: ↓ 57 Changed 11 years ago by
As far as I know, all patches and spkgs still need review. I can review your patches (but give me some time).
comment:57 in reply to: ↑ 56 Changed 11 years ago by
Replying to jdemeyer:
As far as I know, all patches and spkgs still need review. I can review your patches (but give me some time).
Well I considered that I had reviewed (positively) everything except my last patch fixing the Simon doctests so that's the only thing left needing a review (from you perhaps, especially as you made some extra fixes for 32/64 bit issues).
comment:58 Changed 11 years ago by
Also lcalc (#11321) needs review.
comment:59 Changed 10 years ago by
The part of the ticket that fixes #10240 is okay, I think.
comment:60 Changed 10 years ago by
- Description modified (diff)
- Status changed from needs_review to needs_work
- Summary changed from Update PARI to version 2.4.4.BETA to Update PARI to version 2.5.0
comment:61 Changed 10 years ago by
See #10240 for a request to merge that in 4.7.2 (or whatever the next version is) if this isn't getting merged quickly.
comment:62 Changed 10 years ago by
comment:63 Changed 10 years ago by
- Description modified (diff)
comment:64 Changed 10 years ago by
- Description modified (diff)
Needs to be rebased to sage-2.4.3.alpha7.spkg (#11605).
comment:65 Changed 10 years ago by
- Work issues set to Rebase on PARI(!) 2.4.3.alpha.p7 spkg from #11605
comment:66 Changed 10 years ago by
- Description modified (diff)
comment:67 Changed 10 years ago by
- Description modified (diff)
- Work issues Rebase on PARI(!) 2.4.3.alpha.p7 spkg from #11605 deleted
comment:68 Changed 10 years ago by
- Description modified (diff)
- Status changed from needs_work to needs_review
comment:69 Changed 10 years ago by
- Status changed from needs_review to needs_work
The spkg does not build on Mac OS X because of an upstream bug. There is a fix in PARI svn revision 13318 which I should add to this spkg.
comment:70 Changed 10 years ago by
My comment refered to a Mac OS X 10.4 PPC machine, other machines might still work.
comment:71 Changed 10 years ago by
- Description modified (diff)
- Status changed from needs_work to needs_review
New spkg fixing the OS X issue: http://boxen.math.washington.edu/home/jdemeyer/spkg/pari-2.5.0.p2.spkg
I am currently testing this. To avoid duplication of effort, I'll fix things I find in the elliptic_curves directory only.