Opened 9 years ago

Last modified 8 years ago

#11130 closed defect

Update PARI to a more recent SVN version — at Version 38

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 Stopgaps:

Description (last modified by jdemeyer)

We need to add bugfixes for

  1. http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1147 (#9334)
  2. http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1153 (#10195)
  3. http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1184 (related to #9937)
  4. http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1185 (PARI bug discovered by a Sage doctest)
  5. http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1186 (PARI performance regression discovered by a Sage doctest)
  6. http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1187 (PARI bug discovered by a Sage doctest)
  7. http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1188 (PARI bug discovered by a Sage doctest)
  8. #10240 (pari-2.4.3.svn-12577.p9 incorrectly checks for the shared library on Cygwin). We simply use the spkg patch from that ticket.
  9. http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1192 (#10767)

However, since adding more and more patches to PARI is becoming unmaintainable, we simply should move to a more recent svn revision instead of revision 12623 (pari-2.4.3). We plan to update to svn revision 13162.

See also #9343, #10430 (previous PARI upgrades). See also #10247 (Sage 4.6 has PARI problems on Cygwin).

Preliminary spkg: http://boxen.math.washington.edu/home/jdemeyer/spkg/pari-2.4.4.svn13162.p0.spkg

Apply 11130_sagelib.patch and trac_11130-doctest-poly.patch and 11130_sagelib32.patch.

All doctest failures related to simon_two_descent will be fixed in #11005 and should be ignored for this ticket.

Change History (40)

comment:1 Changed 9 years ago by jdemeyer

  • Description modified (diff)
  • Summary changed from Add some patches to PARI to Update PARI to a more recent SVN version

comment:2 Changed 9 years ago by jdemeyer

  • Description modified (diff)
  • Status changed from new to needs_work

comment:3 Changed 9 years ago by jdemeyer

  • Description modified (diff)

comment:4 Changed 9 years ago by mstreng

  • Cc mstreng added

comment:5 Changed 9 years ago by jdemeyer

  • Milestone changed from sage-4.7 to sage-4.7.1

comment:6 Changed 9 years ago by jdemeyer

  • Description modified (diff)

comment:7 Changed 9 years ago by jdemeyer

  • Description modified (diff)

comment:8 Changed 9 years ago by jdemeyer

  • Description modified (diff)

comment:9 Changed 9 years ago by jdemeyer

  • Description modified (diff)

comment:10 Changed 9 years ago by jdemeyer

  • Description modified (diff)

comment:11 Changed 9 years ago by jdemeyer

  • Description modified (diff)

comment:12 Changed 9 years ago by jdemeyer

  • Dependencies set to #11230
  • Description modified (diff)

comment:13 Changed 9 years ago by jdemeyer

  • Description modified (diff)

comment:14 Changed 9 years ago by jdemeyer

  • Description modified (diff)

comment:15 Changed 9 years ago by dimpase

  • Cc dimpase added

comment:16 Changed 9 years ago by jdemeyer

  • Description modified (diff)

comment:17 follow-up: Changed 9 years ago by cremona

I am currently testing this. To avoid duplication of effort, I'll fix things I find in the elliptic_curves directory only.

comment:18 follow-up: Changed 9 years ago by cremona

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: Changed 9 years ago by jdemeyer

Replying to cremona:

Did I do something wrong?

This ticket depends on #11230.

comment:20 in reply to: ↑ 19 Changed 9 years ago by cremona

Replying to jdemeyer:

Replying to cremona:

Did I do something wrong?

This ticket depends on #11230.

I see! I'll have some time to spend on this tomorrow (Monday) so I'll have another go.

comment:21 Changed 9 years ago by jdemeyer

  • Dependencies changed from #11230 to #11230, #11234
  • Description modified (diff)
  • Owner changed from tbd to jdemeyer

comment:22 in reply to: ↑ 17 Changed 9 years ago by jdemeyer

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.

Changed 9 years ago by cremona

Applies after previous

comment:23 Changed 9 years ago by cremona

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 9 years ago by cremona

  • 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: Changed 9 years ago by 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.

comment:26 in reply to: ↑ 25 Changed 9 years ago by cremona

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 9 years ago by jdemeyer

  • Description modified (diff)
  • Work issues set to Test on various systems

comment:28 Changed 9 years ago by jdemeyer

  • Description modified (diff)

comment:29 Changed 9 years ago by jdemeyer

  • Description modified (diff)

comment:30 Changed 9 years ago by jdemeyer

  • Work issues changed from Test on various systems to Test on various systems with #10247 applied

comment:31 Changed 9 years ago by jdemeyer

  • 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 9 years ago by jdemeyer

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 9 years ago by jdemeyer

  • Authors changed from Jeroen Demeyer to Jeroen Demeyer, John Cremona

comment:34 follow-up: Changed 9 years ago by cremona

Testing now on a 32-bit ubuntu system.

comment:35 in reply to: ↑ 34 Changed 9 years ago by cremona

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.

Changed 9 years ago by cremona

Apply after previous

comment:36 Changed 9 years ago by cremona

  • 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 9 years ago by jdemeyer

  • Description modified (diff)
  • Work issues Test on various systems with #10247 applied deleted

comment:38 Changed 9 years ago by jdemeyer

  • Description modified (diff)
Note: See TracTickets for help on using tickets.