sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.43k stars 478 forks source link

Upgrade to pari 2.15.2 #34537

Closed videlec closed 1 year ago

videlec commented 2 years ago

PARI/GP 2.15 is out, and homebrew, gentoo, arch, debian-unstable already have the new version.

Upstream: Workaround found; Bug reported upstream.

CC: @antonio-rojas @collares @JohnCremona

Component: number theory

Author: Bill Allombert, Vincent Delecroix, Antonio Rojas

Branch: e8cfad0

Reviewer: Dima Pasechnik, John Cremona

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

videlec commented 2 years ago

Attachment: giac-1.9.0.15p0.log

videlec commented 2 years ago

Description changed:

--- 
+++ 
@@ -1 +1,3 @@
 PARI/GP is about to release a new version
+
+- giac does not build, see [giac-1.9.0.15p0.log](https://github.com/sagemath/sage-prod/files/10659652/giac-1.9.0.15p0.log)
videlec commented 2 years ago
comment:2

Indeed, according to Bill Allombert ANYARG is gone in PARI/GP 2.15.0.

videlec commented 2 years ago
comment:3

a solution

#ifdef __cplusplus
#  define ANYARG ...
#else
#  define ANYARG
#endif
videlec commented 2 years ago

Author: Bill Allombert, Vincent Delecroix

videlec commented 2 years ago

Commit: c9fec46

videlec commented 2 years ago

Branch: u/vdelecroix/34537

videlec commented 2 years ago

New commits:

d3058fechange pari version
c9fec46ANYARG giac patch
videlec commented 2 years ago
comment:5

Attachment: testall.log

For the complete log, see testall.log

geometry/polyhedron/backend_normaliz.py  # 1 doctest failed
geometry/polyhedron/backend_field.py  # 2 doctests failed
dynamics/arithmetic_dynamics/projective_ds.py  # 1 doctest failed
arith/misc.py  # 4 doctests failed
libs/pari/tests.py  # 2 doctests failed
doctest/forker.py  # 1 doctest failed
doctest/sources.py  # 1 doctest failed
modular/cusps_nf.py  # 1 doctest failed
modular/modform/l_series_gross_zagier.py  # 1 doctest failed
modular/modsym/p1list_nf.py  # 3 doctests failed
modular/modform_hecketriangle/hecke_triangle_group_element.py  # 1 doctest failed
interfaces/genus2reduction.py  # 15 doctests failed
plot/plot3d/index_face_set.pyx  # Timed out
modules/free_quadratic_module_integer_symmetric.py  # 6 doctests failed
lfunctions/pari.py  # 1 doctest failed
lfunctions/dokchitser.py  # 4 doctests failed
rings/qqbar.py  # 28 doctests failed
rings/function_field/function_field.py  # 1 doctest failed
rings/number_field/selmer_group.py  # 1 doctest failed
rings/number_field/class_group.py  # 3 doctests failed
rings/number_field/number_field_ideal_rel.py  # 3 doctests failed
rings/number_field/bdd_height.py  # 1 doctest failed
rings/number_field/order.py  # 1 doctest failed
rings/number_field/S_unit_solver.py  # 4 doctests failed
rings/number_field/number_field.py  # 20 doctests failed
rings/number_field/number_field_rel.py  # 2 doctests failed
rings/number_field/number_field_ideal.py  # 1 doctest failed
rings/number_field/number_field_element.pyx  # 3 doctests failed
rings/number_field/galois_group.py  # 1 doctest failed
rings/finite_rings/finite_field_prime_modn.py  # 1 doctest failed
rings/finite_rings/residue_field.pyx  # 12 doctests failed
rings/polynomial/polynomial_quotient_ring.py  # 1 doctest failed
rings/polynomial/polynomial_element.pyx  # 2 doctests failed
rings/polynomial/polynomial_number_field.pyx  # 1 doctest failed
groups/fqf_orthogonal.py  # 1 doctest failed
groups/matrix_gps/isometries.py  # 1 doctest failed
schemes/curves/affine_curve.py  # 3 doctests failed
schemes/plane_conics/con_rational_function_field.py  # 3 doctests failed
schemes/elliptic_curves/gal_reps_number_field.py  # 2 doctests failed
schemes/elliptic_curves/ell_rational_field.py  # 17 doctests failed
schemes/elliptic_curves/isogeny_small_degree.py  # 1 doctest failed
schemes/elliptic_curves/gp_simon.py  # 1 doctest failed
schemes/elliptic_curves/modular_parametrization.py  # 3 doctests failed
schemes/elliptic_curves/BSD.py  # 3 doctests failed
schemes/elliptic_curves/ell_generic.py  # 1 doctest failed
schemes/elliptic_curves/heegner.py  # 181 doctests failed
schemes/elliptic_curves/ell_field.py  # 1 doctest failed
schemes/elliptic_curves/ell_number_field.py  # 6 doctests failed
schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py  # 4 doctests failed
schemes/hyperelliptic_curves/jacobian_generic.py  # 10 doctests failed
schemes/affine/affine_morphism.py  # 1 doctest failed
quadratic_forms/binary_qf.py  # 25 doctests failed
quadratic_forms/quadratic_form__automorphisms.py  # 1 doctest failed
quadratic_forms/qfsolve.py  # 1 doctest failed
quadratic_forms/genera/genus.py  # 5 doctests failed
antonio-rojas commented 2 years ago

Changed branch from u/vdelecroix/34537 to u/arojas/34537

antonio-rojas commented 2 years ago
comment:7

Pushed fixes for test failures caused by different choice of generators and syntax changes so we have a clear picture of the actual issues. Remaining failures:

sage -t --long /usr/lib/python3.10/site-packages/sage/quadratic_forms/qfsolve.py  # 1 doctest failed
sage -t --long /usr/lib/python3.10/site-packages/sage/quadratic_forms/binary_qf.py  # 25 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/quadratic_forms/genera/genus.py  # 4 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/modular/modform/l_series_gross_zagier.py  # 1 doctest failed
sage -t --long /usr/lib/python3.10/site-packages/sage/schemes/plane_conics/con_rational_function_field.py  # 3 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/schemes/curves/affine_curve.py  # 3 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/schemes/elliptic_curves/heegner.py  # 181 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/schemes/elliptic_curves/ell_rational_field.py  # 17 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/schemes/elliptic_curves/BSD.py  # 3 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/schemes/elliptic_curves/modular_parametrization.py  # 3 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/schemes/elliptic_curves/gp_simon.py  # 1 doctest failed
sage -t --long /usr/lib/python3.10/site-packages/sage/schemes/hyperelliptic_curves/jacobian_generic.py  # 10 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py  # 4 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/modules/free_quadratic_module_integer_symmetric.py  # 1 doctest failed
sage -t --long /usr/lib/python3.10/site-packages/sage/lfunctions/dokchitser.py  # 4 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/groups/fqf_orthogonal.py  # 1 doctest failed
sage -t --long /usr/lib/python3.10/site-packages/sage/rings/number_field/number_field.py  # 11 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/rings/number_field/number_field_element.pyx  # 1 doctest failed
sage -t --long /usr/lib/python3.10/site-packages/sage/rings/polynomial/polynomial_element.pyx  # 2 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/rings/polynomial/polynomial_number_field.pyx  # 1 doctest failed
sage -t --long /usr/lib/python3.10/site-packages/sage/rings/function_field/function_field.py  # 1 doctest failed

New commits:

6a83955Adjust tests for pari 2.15
antonio-rojas commented 2 years ago

Changed commit from c9fec46 to 6a83955

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

24e9e51Binary quadratic forms are of t_QFB type in pari 2.15
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 6a83955 to 24e9e51

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 24e9e51 to e9f6662

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

e9f6662Remove qfminimize function from qfsolve.gp, it is unused and conflicts with the builtin qfminimize in gp 2.15
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from e9f6662 to 72ff826

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

72ff826Rename custom ellrank function as it conflicts with a native ellrank from gp 2.15
antonio-rojas commented 2 years ago
comment:11

Upstream report for the failures in schemes.curves.affine_curve and rings.number_field.number_field:

https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2414

antonio-rojas commented 2 years ago

Upstream: Reported upstream. No feedback yet.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 72ff826 to 330e7d7

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

0e44b62Another test fix
330e7d7Update test in gp_simon.py
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

b1e9677Update to 2.15.0 final
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 330e7d7 to b1e9677

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from b1e9677 to da87326

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

07020f0Merge remote-tracking branch 'origin/develop' into t/34537/34537
da87326Add workaround for PARI bug#2414
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from da87326 to 9fbb886

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

cd0cac6Another workaround for PARI bug#2414
9fbb886Filter out gp warnings that break parsing output in dokchitser.py
antonio-rojas commented 2 years ago

Changed author from Bill Allombert, Vincent Delecroix to Bill Allombert, Vincent Delecroix, Antonio Rojas

antonio-rojas commented 2 years ago
comment:16

Only two remaining issues that are going to need more help from experts:

sage -t --long /usr/lib/python3.10/site-packages/sage/interfaces/genus2reduction.py  # 15 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/schemes/hyperelliptic_curves/jacobian_generic.py  # 10 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py  # 4 doctests failed

These are caused by the changes in gp's genus2red output from https://pari.math.u-bordeaux.fr/cgi-bin/gitweb.cgi?p=pari.git;a=commitdiff;h=a41e4fa95925eae42830217313583efc80628763

Sage's genus2reduction.py needs to be adapted to those changes.

sage -t --long /usr/lib/python3.10/site-packages/sage/groups/fqf_orthogonal.py  # 1 doctest failed

This is a weird issue that involves pari and gap code. Needs further investigation.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 9fbb886 to 328f043

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

328f043Fix one more test in docs
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 328f043 to a019adc

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

a019adcRevert "Fix one more test in docs"
antonio-rojas commented 2 years ago
comment:19

Replying to Antonio Rojas:

Upstream report for the failures in schemes.curves.affine_curve and rings.number_field.number_field:

https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2414

The bug was fixed upstream, but we may want to keep the workaround. It's not particularly hackish and will allow to use an unpatched system pari 2.15.0

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,3 +1,3 @@
-PARI/GP is about to release a new version
+PARI/GP 2.15 is out, and homebrew, gentoo, arch, debian-unstable already have the new version.

 - giac does not build, see [giac-1.9.0.15p0.log](https://github.com/sagemath/sage-prod/files/10659652/giac-1.9.0.15p0.log)
mkoeppe commented 2 years ago
comment:21

Is this ready to go, or should we put the giac build fix on a separate ticket?

antonio-rojas commented 2 years ago
comment:22

It's not ready, see comment:16

mkoeppe commented 2 years ago

Dependencies: #34586

mkoeppe commented 2 years ago
comment:24

That's now #34586

videlec commented 2 years ago
comment:25

Instead of using the ellQ_ellrank from Denis Simon script we should be using the ellrank from PARI/GP (available from version 2.15). Though, the latter only works over rational numbers.

antonio-rojas commented 2 years ago
comment:26

Replying to Vincent Delecroix:

Instead of using the ellQ_ellrank from Denis Simon script we should be using the ellrank from PARI/GP (available from version 2.15). Though, the latter only works over rational numbers.

That should go in a follow-up ticket, I think. The branch is already big enough.

videlec commented 2 years ago
comment:27

Replying to Antonio Rojas:

Replying to Vincent Delecroix:

Instead of using the ellQ_ellrank from Denis Simon script we should be using the ellrank from PARI/GP (available from version 2.15). Though, the latter only works over rational numbers.

That should go in a follow-up ticket, I think. The branch is already big enough.

Sure: #34608

videlec commented 2 years ago
comment:28

I am with Bill. I will push a fix for the genus 2 reduction.

videlec commented 2 years ago

New commits:

7c7d626fix call to pari genus2red
eb7db0dfix doc associated to genus 2 reduction
videlec commented 2 years ago

Changed commit from a019adc to eb7db0d

videlec commented 2 years ago

Changed branch from u/arojas/34537 to public/34537

videlec commented 2 years ago
comment:30

The modifications I have done are incompatible with PARI < 2.15. I think it would be simpler to enforce PARI >= 2.15 in the next sage version.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

6b250d3Merge remote-tracking branch 'origin/develop' into t/34537/public/34537
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from eb7db0d to 6b250d3