Opened 2 years ago

Closed 21 months ago

#29719 closed enhancement (fixed)

upgrade to flint 2.6.3

Reported by: vdelecroix Owned by:
Priority: critical Milestone: sage-9.3
Component: packages: standard Keywords: upgrade
Cc: gh-timokau, kedlaya, jen, saraedum, isuruf, mkoeppe, gh-kliem, vdelecroix, Winfried, slelievre Merged in:
Authors: Dima Pasechnik, Matthias Koeppe Reviewers: Matthias Koeppe, Dima Pasechnik
Report Upstream: Reported upstream. Developers acknowledge bug. Work issues:
Branch: 7681b1a (Commits, GitHub, GitLab) Commit: 7681b1a38b797ccacdaaa0de473bab8116084fdb
Dependencies: #30805 Stopgaps:

Status badges

Description (last modified by dimpase)

Flint 2.6.3 has been released

tarball: see checksums.ini [upstream_url]

Attachments (2)

e_antic-0.1.5.log (816.4 KB) - added by gh-kliem 2 years ago.
flint-2.6.3.log (1.7 MB) - added by gh-BrentBaccala 22 months ago.
Build attempt on commit 01271cb

Change History (147)

comment:1 Changed 2 years ago by dimpase

  • Authors set to Dima Pasechnik
  • Branch set to public/packages/flint260
  • Commit set to 3bb2c705097dd49e1e5d9a8e9d8e78ca96eb2d42
  • Description modified (diff)

this is from the latest alpha2 (commit a960857c7d8e5ea7c4d4c2958e38ec52778d85d9)

Patches still need to be sorted out.


New commits:

3bb2c70update flint to 2.6.0 (alpha version)

comment:2 Changed 2 years ago by git

  • Commit changed from 3bb2c705097dd49e1e5d9a8e9d8e78ca96eb2d42 to 9b6e67c07dcd30ce200c8e514d28b1fc9c9f06e5

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

9b6e67cupdate flint to 2.6.0 (alpha version), remove patches

comment:3 Changed 2 years ago by dimpase

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

OK, can be tested now. All our patches got upstreamed, so they are gone now.

comment:4 Changed 2 years ago by dimpase

  • Status changed from needs_review to needs_work

Neither arb 2.16 nor 2.17 work with this version of Flint.

One gets

gcc -fPIC -ansi -pedantic -Wall -O2 -funroll-loops -g -mpopcnt  -I/home/scratch2/dimpase/sage/sage/local/var/tmp/sage/build/arb-2.17.0/src -I/home/scratch2/dimpase/sage/sage/local/include -I/home/scratch2/dimpase/sage/sage/local/include -I/home/scratch2/dimpase/sage/sage/local/include -c mul_mpn.c -o ../build/fmpr/mul_mpn.lo -MMD -MP -MF "../build/fmpr/mul_mpn.d" -MT "../build/fmpr/mul_mpn.d" -MT "../build/fmpr/mul_mpn.lo"
In file included from ../fmpr.h:26,
                 from get_si.c:12:
../fmpz_extras.h:47:1: error: redefinition of 'fmpz_add_si'
   47 | fmpz_add_si(fmpz_t z, const fmpz_t x, slong y)
      | ^~~~~~~~~~~
In file included from ../fmpr.h:23,
                 from get_si.c:12:
../../../../../../../include/flint/fmpz.h:479:18: note: previous definition of 'fmpz_add_si' was here
  479 | FMPZ_INLINE void fmpz_add_si(fmpz_t f, const fmpz_t g, slong x)
      |                  ^~~~~~~~~~~
In file included from ../fmpr.h:26,
                 from get_si.c:12:
../fmpz_extras.h:56:1: error: redefinition of 'fmpz_sub_si'
   56 | fmpz_sub_si(fmpz_t z, const fmpz_t x, slong y)
      | ^~~~~~~~~~~
In file included from ../fmpr.h:23,
                 from get_si.c:12:
../../../../../../../include/flint/fmpz.h:487:18: note: previous definition of 'fmpz_sub_si' was here
  487 | FMPZ_INLINE void fmpz_sub_si(fmpz_t f, const fmpz_t g, slong x)
      |                  ^~~~~~~~~~~
make[5]: *** [../Makefile.subdirs:60: ../build/fmpr/get_si.lo] Error 1

comment:5 Changed 2 years ago by dimpase

One apparently may use arb patch: https://github.com/fredrik-johansson/arb/commit/d3d9983231e0f034e86a1e75761627eb8213b704.patch - trying this with arb 2.17.0 now.

comment:6 follow-up: Changed 2 years ago by fredrik.johansson

Yes, there will be an immediate new Arb release. The current git master ought to work.

comment:7 Changed 2 years ago by gh-timokau

  • Cc gh-timokau added

comment:8 in reply to: ↑ 6 Changed 2 years ago by dimpase

Replying to fredrik.johansson:

Yes, there will be an immediate new Arb release. The current git master ought to work.

there are doctest errors (I made https://github.com/dimpase/arb/releases/tag/2.17.1, and removed all the arb patches)

sage -t --warn-long 59.4 src/sage/rings/complex_arb.pyx
**********************************************************************
File "src/sage/rings/complex_arb.pyx", line 4554, in sage.rings.complex_arb.ComplexBall.elliptic_pi
Failed example:
    CBF(2,3).elliptic_pi(CBF(1,1))
Expected:
    [0.27029997361983 +/- ...e-15] + [0.715676058329095 +/- ...e-16]*I
Got:
    [0.2702999736198 +/- 4.51e-14] + [0.7156760583291 +/- 1.78e-14]*I
**********************************************************************
File "src/sage/rings/complex_arb.pyx", line 4662, in sage.rings.complex_arb.ComplexBall.elliptic_pi_inc
Failed example:
    n.elliptic_pi_inc(CBF.pi()/2, m)
Expected:
    [0.8934793755173 +/- ...e-14] + [0.95707868710750 +/- ...e-15]*I
Got:
    nan + nan*I
**********************************************************************
File "src/sage/rings/complex_arb.pyx", line 4664, in sage.rings.complex_arb.ComplexBall.elliptic_pi_inc
Failed example:
    n.elliptic_pi(m)
Expected:
    [0.89347937551733 +/- ...e-15] + [0.95707868710750 +/- ...e-15]*I
Got:
    [0.8934793755173 +/- 4.27e-14] + [0.9570786871075 +/- 9.91e-15]*I
**********************************************************************
File "src/sage/rings/complex_arb.pyx", line 4669, in sage.rings.complex_arb.ComplexBall.elliptic_pi_inc
Failed example:
    n.elliptic_pi_inc(CBF.pi()/2, m)
Expected:
    [0.2969588746419 +/- ...e-14] + [1.3188795332738 +/- ...e-14]*I
Got:
    nan + nan*I
**********************************************************************
File "src/sage/rings/complex_arb.pyx", line 4671, in sage.rings.complex_arb.ComplexBall.elliptic_pi_inc
Failed example:
    n.elliptic_pi(m)
Expected:
    [0.29695887464189 +/- ...e-15] + [1.31887953327376 +/- ...e-15]*I
Got:
    [0.2969588746419 +/- 3.79e-14] + [1.3188795332738 +/- 7.19e-14]*I
**********************************************************************
File "src/sage/rings/complex_arb.pyx", line 4747, in sage.rings.complex_arb.ComplexBall.elliptic_rj
Failed example:
    CBF(0,1).elliptic_rj(CBF(-1/2,1), CBF(-1,-1), CBF(2))
Expected:
    [1.004386756285733 +/- ...e-16] + [-0.2451626834391645 +/- ...e-17]*I
Got:
    [1.00438675628573 +/- 6.85e-15] + [-0.24516268343916 +/- 8.11e-15]*I
**********************************************************************
3 items had failures:
   1 of   2 in sage.rings.complex_arb.ComplexBall.elliptic_pi
   4 of  10 in sage.rings.complex_arb.ComplexBall.elliptic_pi_inc
   1 of   2 in sage.rings.complex_arb.ComplexBall.elliptic_rj
    [639 tests, 6 failures, 8.14 s]

and

sage -t --warn-long 59.4 src/sage/rings/real_arb.pyx
**********************************************************************
File "src/sage/rings/real_arb.pyx", line 295, in sage.rings.real_arb.arb_to_mpfi
Failed example:
    RIF(RBF(2)**(2**100)) # indirect doctest
Expected:
    Traceback (most recent call last):
    ...
    ArithmeticError: Error converting arb to mpfi. Overflow?
Got:
    [5.8756537891115869e1388255822130839282 .. +infinity]
**********************************************************************
File "src/sage/rings/real_arb.pyx", line 1660, in sage.rings.real_arb.RealBall.mid
Failed example:
    b.mid()
Expected:
    Traceback (most recent call last):
    ...
    RuntimeError: unable to convert to MPFR (exponent out of range?)
Got:
    +infinity
**********************************************************************
2 items had failures:
   1 of   7 in sage.rings.real_arb.RealBall.mid
   1 of   2 in sage.rings.real_arb.arb_to_mpfi
    [542 tests, 2 failures, 0.64 s]

comment:9 Changed 2 years ago by dimpase

OK, I ended up using arb patch: ​https://github.com/fredrik-johansson/arb/commit/d3d9983231e0f034e86a1e75761627eb8213b704.patch with arb 2.16.0 (the arb version in Sage now), and get one flint-related regression (a segfault)

sage: R.<x> = QQ['x']
sage: A,f = monsky_washnitzer.matrix_of_frobenius_hyperelliptic(x^5 - 2*x + 3, 5, 3)
-------------------------------------------------------------------------------------
/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/cysignals/signals.cpython-37m-x86_64-linux-gnu.so(+0x84a4)[0x7f98890224a4]
/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/cysignals/signals.cpython-37m-x86_64-linux-gnu.so(+0x8679)[0x7f9889022679]
/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/cysignals/signals.cpython-37m-x86_64-linux-gnu.so(+0xae41)[0x7f9889024e41]
/lib64/libc.so.6(+0x37ec0)[0x7f988a679ec0]
/lib64/libc.so.6(gsignal+0x145)[0x7f988a679e35]
/lib64/libc.so.6(abort+0x127)[0x7f988a664895]
/home/scratch2/dimpase/sage/sage/local/lib/libflint.so.14(+0x85dcd)[0x7f9880a64dcd]
/home/scratch2/dimpase/sage/sage/local/lib/libflint.so.14(flint_throw+0xe0)[0x7f9880a64eb0]
/home/scratch2/dimpase/sage/sage/local/lib/libflint.so.14(_nmod_poly_rem_q1+0xa1)[0x7f9880bd8bd1]
/home/scratch2/dimpase/sage/sage/local/lib/libflint.so.14(_nmod_poly_rem+0x195)[0x7f9880bc39f5]
/home/scratch2/dimpase/sage/sage/local/lib/libflint.so.14(_nmod_poly_gcd_euclidean+0x60)[0x7f9880babd50]
/home/scratch2/dimpase/sage/sage/local/lib/libflint.so.14(nmod_poly_gcd+0x95)[0x7f9880bb28b5]
/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/sage/rings/polynomial/polynomial_zmod_flint.cpython-37m-x86_64-linux-gnu.so(+0x1201c)[0x7f983d7b401c]
/lib64/libpython3.7m.so.1.0(_PyMethodDef_RawFastCallDict+0x33a)[0x7f988a402bea]
/lib64/libpython3.7m.so.1.0(+0x1ccd3f)[0x7f988a4c1d3f]
/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/sage/structure/element.cpython-37m-x86_64-linux-gnu.so(+0x134fc)[0x7f98897424fc]
/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/sage/structure/element.cpython-37m-x86_64-linux-gnu.so(+0x338a4)[0x7f98897628a4]
/lib64/libpython3.7m.so.1.0(_PyObject_FastCallKeywords+0x4bc)[0x7f988a433eec]
/lib64/libpython3.7m.so.1.0(+0x1404e9)[0x7f988a4354e9]
/lib64/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x55da)[0x7f988a46fdea]
/lib64/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0x2f0)[0x7f988a4227e0]
/lib64/libpython3.7m.so.1.0(_PyFunction_FastCallKeywords+0x2a2)[0x7f988a423822]
/lib64/libpython3.7m.so.1.0(+0x14035f)[0x7f988a43535f]
...

comment:10 Changed 2 years ago by git

  • Commit changed from 9b6e67c07dcd30ce200c8e514d28b1fc9c9f06e5 to d943e59a12766370b1633af5519b6a9f78921265

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

d943e59backport flint compat patch from arb's trunk

comment:11 Changed 2 years ago by git

  • Commit changed from d943e59a12766370b1633af5519b6a9f78921265 to f80e3151fd2dbb582a212452813c73b18f49697c

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

f80e315url in checksum, for convenience (to be changed)

comment:12 Changed 2 years ago by dimpase

experiments tell that precision needs to be at least 25 for this example to run, i.e. this works:

sage: monsky_washnitzer.matrix_of_frobenius_hyperelliptic(x^5 - 2*x + 3, 5, 25)

comment:13 Changed 2 years ago by dimpase

  • Cc kedlaya jen saraedum added

But this works:

sage: R.<x> = QQ['x']
sage: C=HyperellipticCurve(x^5 - 2*x + 3)
sage: A,f=monsky_washnitzer.matrix_of_frobenius_hyperelliptic(C,5,3)
sage: A
[            4*5 + O(5^3)       5 + 2*5^2 + O(5^3) 2 + 3*5 + 2*5^2 + O(5^3)     2 + 5 + 5^2 + O(5^3)]
[      3*5 + 5^2 + O(5^3)             3*5 + O(5^3)             4*5 + O(5^3)         2 + 5^2 + O(5^3)]
[    4*5 + 4*5^2 + O(5^3)     3*5 + 2*5^2 + O(5^3)       5 + 3*5^2 + O(5^3)     2*5 + 2*5^2 + O(5^3)]
[            5^2 + O(5^3)       5 + 4*5^2 + O(5^3)     4*5 + 3*5^2 + O(5^3)             2*5 + O(5^3)]

So, apparently, some initialisation is missing, if C is created on the fly.

comment:14 Changed 2 years ago by dimpase

This is reproducible on the ticket branch, on Fedora 30 and on Debian 10. This works:

sage: R.<x> = QQ['x']
sage: C=HyperellipticCurve(x^5 - 2*x + 3)
sage: A,f=monsky_washnitzer.matrix_of_frobenius_hyperelliptic(C,5,3)
sage: A

but

sage: R.<x> = QQ['x']
sage: A,f = monsky_washnitzer.matrix_of_frobenius_hyperelliptic(x^5 - 2*x + 3, 5, 3)

segfaults.

comment:15 Changed 2 years ago by fredrik.johansson

Dima, thanks for reporting the Arb doctest failures.

The slight regressions in accuracy for elliptic_pi, elliptic_pi_inc and elliptic_rj are due to using a different algorithm to compute the R_J function for certain complex parameters. The new algorithm is a bit slower and less accurate, but unlike the old algorithm always gives the right branch. These doctest results just need to be updated.

Unfortunately, the new algorithm doesn't work when phi is an inexact multiple of pi/2, leading to the NaN values. There is a workaround: acb_elliptic_pi_inc takes a pi flag to multiply the argument by pi exactly, so if you add a pi flag to the Sage wrapper and pass in phi=0.5 with pi=True in the doctest, it should give the expected result.

It's theoretically possible to fix these regressions, and I will open an Arb issue for it, but I'm not keen to spend time on it any time soon.

The other two examples look correct: converting an Arb number to an MPFR now rounds according to MPFR semantics (including rounding to infinity) instead of abort()ing when the exponents are out of range for MPFR.

comment:16 Changed 2 years ago by dimpase

This works too:

sage: sage: R.<x> = QQ['x']
....: sage: C=HyperellipticCurve(x^5 - 2*x + 7)
....: sage: A,f = monsky_washnitzer.matrix_of_frobenius_hyperelliptic(x^5-2*x+3, 5, 3)

That is, apparently, some kind of Flint initialisation needs to happen before the latter function can be called.

comment:17 Changed 2 years ago by dimpase

here it is one step closer to the bug:

sage: from sage.schemes.hyperelliptic_curves.monsky_washnitzer import SpecialHyperellipticQuotientRing
sage: R.<x> = QQ['x']
sage: Q=x^5 - 2*x + 3
sage: SpecialHyperellipticQuotientRing(Q, Integers(5**4), True)
Flint exception (Impossible inverse):
    Cannot invert modulo 5*0
------------------------------------------------------------------------
/home/dimpase/sage-src/local/lib/python3.7/site-packages/cysignals/signals.cpython-37m-x86_64-linux-gnu.so(+0x7ccb)[0x795d3c2ccccb]
/home/dimpase/sage-src/local/lib/python3.7/site-packages/cysignals/signals.cpython-37m-x86_64-linux-gnu.so(+0x7e98)[0x795d3c2cce98]
/home/dimpase/sage-src/local/lib/python3.7/site-packages/cysignals/signals.cpython-37m-x86_64-linux-gnu.so(+0xa70d)[0x795d3c2cf70d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x795d3f372730]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b)[0x795d3edec7bb]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x121)[0x795d3edd7535]
/home/dimpase/sage-src/local/lib/libflint.so.14(+0x84cfd)[0x795d2f868cfd]
/home/dimpase/sage-src/local/lib/libflint.so.14(flint_throw+0xe0)[0x795d2f868de0]
/home/dimpase/sage-src/local/lib/libflint.so.14(_nmod_poly_rem_q1+0x8f)[0x795d2f9e26ef]
/home/dimpase/sage-src/local/lib/libflint.so.14(_nmod_poly_rem+0x145)[0x795d2f9d0d85]
/home/dimpase/sage-src/local/lib/libflint.so.14(_nmod_poly_gcd_euclidean+0x60)[0x795d2f9b3da0]
/home/dimpase/sage-src/local/lib/libflint.so.14(nmod_poly_gcd+0x93)[0x795d2f9db6a3]
/home/dimpase/sage-src/local/lib/python3.7/site-packages/sage/rings/polynomial/polynomial_zmod_flint.cpython-37m-x86_64-linux-gnu.so(+0x117e4)[0x795cbaa107e4]
/home/dimpase/sage-src/local/bin/python3(_PyMethodDef_RawFastCallDict+0x2d8)[0x5d7518]
/home/dimpase/sage-src/local/bin/python3[0x4d77be]
...

with Flint 2.5.2, it prints

SpecialHyperellipticQuotientRing K[x,y,y^-1] / (y^2 = x^5 + 623*x + 3) over Ring of integers modulo 625

as it should.

Last edited 2 years ago by dimpase (previous) (diff)

comment:18 Changed 2 years ago by dimpase

and one more step further - basically, creating HyperellipticCurve over Z mod 625 does not work:

sage: R.<x> = QQ['x']
sage: Q=x^5 - 2*x + 3
sage: HyperellipticCurve(Q.change_ring(Integers(5**4)))
Flint exception (Impossible inverse):
    Cannot invert modulo 5*0
------------------------------------------------------------------------
/home/dimpase/sage-src/local/lib/python3.7/site-packages/cysignals/signals.cpython-37m-x86_64-linux-gnu.so(+0x7ccb)[0x7d0ea9c75ccb]
/home/dimpase/sage-src/local/lib/python3.7/site-packages/cysignals/signals.cpython-37m-x86_64-linux-gnu.so(+0x7e98)[0x7d0ea9c75e98]
/home/dimpase/sage-src/local/lib/python3.7/site-packages/cysignals/signals.cpython-37m-x86_64-linux-gnu.so(+0xa70d)[0x7d0ea9c7870d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7d0eacd1b730]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b)[0x7d0eac7957bb]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x121)[0x7d0eac780535]
/home/dimpase/sage-src/local/lib/libflint.so.14(+0x84cfd)[0x7d0ea1684cfd]
/home/dimpase/sage-src/local/lib/libflint.so.14(flint_throw+0xe0)[0x7d0ea1684de0]
/home/dimpase/sage-src/local/lib/libflint.so.14(_nmod_poly_rem_q1+0x8f)[0x7d0ea17fe6ef]
/home/dimpase/sage-src/local/lib/libflint.so.14(_nmod_poly_rem+0x145)[0x7d0ea17ecd85]
/home/dimpase/sage-src/local/lib/libflint.so.14(_nmod_poly_gcd_euclidean+0x60)[0x7d0ea17cfda0]
/home/dimpase/sage-src/local/lib/libflint.so.14(nmod_poly_gcd+0x93)[0x7d0ea17f76a3]
/home/dimpase/sage-src/local/lib/python3.7/site-packages/sage/rings/polynomial/polynomial_zmod_flint.cpython-37m-x86_64-linux-gnu.so(+0x117e4)[0x7d0e28f387e4]
/home/dimpase/sage-src/local/bin/python3(_PyMethodDef_RawFastCallDict+0x2d8)[0x5d7518]

comment:19 Changed 2 years ago by dimpase

OK, so this seems to be a basic Polynomial_zmod_flint problem:

sage: R.<x> = QQ['x']
sage: Q=x^5 - 2*x + 3
sage: Qm=Q.change_ring(Integers(5**4))
sage: F=4*Qm
sage: F.gcd(F.derivative())
Flint exception (Impossible inverse):
    Cannot invert modulo 5*0
-------------------------
boom...

(this happily returns 1 with Flint 2.5.2)

So this is not really a specific p-adic problem at all.

comment:20 Changed 2 years ago by git

  • Commit changed from f80e3151fd2dbb582a212452813c73b18f49697c to 73b06adb48ca50d49b0028cadee8e7ac47f84bdc

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

73b06adskip square-freeness test for polynomials non-fields

comment:21 Changed 2 years ago by git

  • Commit changed from 73b06adb48ca50d49b0028cadee8e7ac47f84bdc to 210c40bf38acc760a4bdef7fc0b88822d398aec3

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

210c40bfix and make robust related doctests

comment:22 Changed 2 years ago by dimpase

related discussion with Flint people (Bill): https://github.com/wbhart/flint2/issues/743

comment:23 Changed 2 years ago by dimpase

  • Status changed from needs_work to needs_review

Probably one would need to revise the handling of GCDs of polynomials in general, but this is for another ticket, I guess.

comment:24 Changed 2 years ago by git

  • Commit changed from 210c40bf38acc760a4bdef7fc0b88822d398aec3 to 6f5f158cdb13c0883fc2cd43101edc6cbfb3df88

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

6b1a70eupdate flint to 2.6.0 (alpha version), remove patches
a9fb26dbackport flint compat patch from arb's trunk
68ab717url in checksum, for convenience (to be changed)
2cc30a6skip square-freeness test for polynomials non-fields
ca1c621fix and make robust related doctests
6f5f158testing upstream rc

comment:25 Changed 2 years ago by git

  • Commit changed from 6f5f158cdb13c0883fc2cd43101edc6cbfb3df88 to 5a81220cbf221435a3f31e2388f594a367044aac

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

5a81220testing upstream rc

comment:26 Changed 2 years ago by git

  • Commit changed from 5a81220cbf221435a3f31e2388f594a367044aac to 0d5a2e6b53dca951fb225d38ef9abc45ce264b62

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

6b1a70eupdate flint to 2.6.0 (alpha version), remove patches
f9d850fbackport flint compat patch from arb's trunk
a3981f6skip square-freeness test for polynomials non-fields
0d5a2e6fix and make robust related doctests

comment:27 Changed 2 years ago by dimpase

  • Description modified (diff)
  • Priority changed from major to critical

New commits:

6b1a70eupdate flint to 2.6.0 (alpha version), remove patches
f9d850fbackport flint compat patch from arb's trunk
a3981f6skip square-freeness test for polynomials non-fields
0d5a2e6fix and make robust related doctests

New commits:

6b1a70eupdate flint to 2.6.0 (alpha version), remove patches
f9d850fbackport flint compat patch from arb's trunk
a3981f6skip square-freeness test for polynomials non-fields
0d5a2e6fix and make robust related doctests

comment:28 Changed 2 years ago by dimpase

OK, now the real reviewing/testing may commence!

comment:29 Changed 2 years ago by dimpase

  • Cc isuruf mkoeppe gh-kliem added

Changed 2 years ago by gh-kliem

comment:31 Changed 2 years ago by gh-kliem

e_antic fails to build on this flint.

comment:32 Changed 2 years ago by mkoeppe

  • Cc vdelecroix added

comment:33 Changed 2 years ago by gh-kliem

I just was about to do this :-)

comment:34 Changed 2 years ago by dimpase

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -fopenmp -march=native -O2 -c poly_extra/descartes_bound.c  -fPIC -DPIC -o poly_extra/.libs/descartes_bound.o
In file included from ./e-antic/poly_extra.h:15,
                 from poly_extra/bisection_step_arb.c:12:
./e-antic/e-antic.h:24:2: error: #error FLINT 2.5.2 or 2.5.3 required
 #error FLINT 2.5.2 or 2.5.3 required
  ^~~~~

Why is this done in a header, not in ./configure ?

using --enable-flint-devel in configure doesn't help, by the way.

Last edited 2 years ago by dimpase (previous) (diff)

comment:35 Changed 2 years ago by dimpase

  • Report Upstream changed from N/A to Reported upstream. No feedback yet.

comment:36 Changed 2 years ago by mkoeppe

Let's take care of e_antic on a follow-up ticket.

comment:37 Changed 2 years ago by gh-kliem

I don't like this. It breaks normaliz. Yes, it is only an optional package, but that is basically downgrading it to experimental. Isn't it?

Or is the fix already pretty much done? The order of things makes sense (first upgrade flint and then fix optional packages it breaks) but I would like that the fix is available (and ideally is even merged in the same beta).

comment:38 Changed 2 years ago by mkoeppe

Of course we must fix it before the next release, but not everything can be done within one beta. We need to do LOTS of package upgrades!

comment:39 Changed 2 years ago by mkoeppe

  • Cc Winfried added

In particular, a big Normaliz update is coming. Not sure if Winfried is already testing with the new FLINT release?

comment:40 Changed 2 years ago by Winfried

I had not noticed that Flint 2.6.0 is available. Therefore it is not installed with Normaliz 3.8.5 that was just released (not a big release).

As soon as possible, I will test Flint 2.6.0. I need the backport to the 0 series of e-antic.

comment:41 Changed 2 years ago by gh-kliem

There is some mac problem:

https://github.com/kliem/sage-test-27122/runs/743556771 local-macos (homebrew-macos-python3_xcode, standard)

 [dochtml]     File "/Applications/Xcode_11.4.1.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/runpy.py", line 109, in _get_module_details
  [dochtml]       __import__(pkg_name)
  [dochtml]     File "/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_xcode-standard/local/lib/python3.7/site-packages/sage_setup/docbuild/__init__.py", line 60, in <module>
  [dochtml]       import sage.all
  [dochtml]     File "/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_xcode-standard/local/lib/python3.7/site-packages/sage/all.py", line 119, in <module>
  [dochtml]       from sage.misc.all       import *         # takes a while
  [dochtml]     File "/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_xcode-standard/local/lib/python3.7/site-packages/sage/misc/all.py", line 84, in <module>
  [dochtml]       from .functional import (additive_order,
  [dochtml]     File "/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_xcode-standard/local/lib/python3.7/site-packages/sage/misc/functional.py", line 26, in <module>
  [dochtml]       from sage.rings.complex_double import CDF
  [dochtml]     File "sage/rings/integer.pxd", line 7, in init sage.rings.complex_double (build/cythonized/sage/rings/complex_double.c:23890)
  [dochtml]   ImportError: dlopen(/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_xcode-standard/local/lib/python3.7/site-packages/sage/rings/integer.cpython-37m-darwin.so, 2): Library not loaded: /Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_xcode-standard/local/var/tmp/sage/build/flint-2.6.0/inst/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_xcode-standard/local/lib/libflint-14.dylib
  [dochtml]     Referenced from: /Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_xcode-standard/local/lib/python3.7/site-packages/sage/rings/integer.cpython-37m-darwin.so
  [dochtml]     Reason: image not found
  [dochtml] Full log file: logs/dochtml.log
make[1]: *** [doc-html] Error 1

homebrew https://github.com/kliem/sage-test-27122/runs/743556743

[dochtml]     File "/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-standard/homebrew/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 109, in _get_module_details
  [dochtml]       __import__(pkg_name)
  [dochtml]     File "/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-standard/local/lib/python3.7/site-packages/sage_setup/docbuild/__init__.py", line 60, in <module>
  [dochtml]       import sage.all
  [dochtml]     File "/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-standard/local/lib/python3.7/site-packages/sage/all.py", line 119, in <module>
  [dochtml]       from sage.misc.all       import *         # takes a while
  [dochtml]     File "/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-standard/local/lib/python3.7/site-packages/sage/misc/all.py", line 84, in <module>
  [dochtml]       from .functional import (additive_order,
  [dochtml]     File "/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-standard/local/lib/python3.7/site-packages/sage/misc/functional.py", line 26, in <module>
  [dochtml]       from sage.rings.complex_double import CDF
  [dochtml]     File "sage/rings/integer.pxd", line 7, in init sage.rings.complex_double (build/cythonized/sage/rings/complex_double.c:23890)
  [dochtml]   ImportError: dlopen(/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-standard/local/lib/python3.7/site-packages/sage/rings/integer.cpython-37m-darwin.so, 2): Library not loaded: /Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-standard/local/var/tmp/sage/build/flint-2.6.0/inst/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-standard/local/lib/libflint-14.dylib
  [dochtml]     Referenced from: /Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-standard/local/lib/python3.7/site-packages/sage/rings/integer.cpython-37m-darwin.so
  [dochtml]     Reason: image not found

https://github.com/kliem/sage-test-27122/runs/743556808

local-macos (homebrew-macos-python3_pythonorg, standard)

 [dochtml]   Traceback (most recent call last):
  [dochtml]     File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 183, in _run_module_as_main
  [dochtml]       mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  [dochtml]     File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 142, in _get_module_details
  [dochtml]       return _get_module_details(pkg_main_name, error)
  [dochtml]     File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 109, in _get_module_details
  [dochtml]       __import__(pkg_name)
  [dochtml]     File "/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_pythonorg-standard/local/lib/python3.7/site-packages/sage_setup/docbuild/__init__.py", line 60, in <module>
  [dochtml]       import sage.all
  [dochtml]     File "/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_pythonorg-standard/local/lib/python3.7/site-packages/sage/all.py", line 119, in <module>
  [dochtml]       from sage.misc.all       import *         # takes a while
  [dochtml]     File "/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_pythonorg-standard/local/lib/python3.7/site-packages/sage/misc/all.py", line 84, in <module>
  [dochtml]       from .functional import (additive_order,
  [dochtml]     File "/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_pythonorg-standard/local/lib/python3.7/site-packages/sage/misc/functional.py", line 26, in <module>
  [dochtml]       from sage.rings.complex_double import CDF
  [dochtml]     File "sage/rings/integer.pxd", line 7, in init sage.rings.complex_double (build/cythonized/sage/rings/complex_double.c:23890)
  [dochtml]   ImportError: dlopen(/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_pythonorg-standard/local/lib/python3.7/site-packages/sage/rings/integer.cpython-37m-darwin.so, 2): Library not loaded: /Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_pythonorg-standard/local/var/tmp/sage/build/flint-2.6.0/inst/Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_pythonorg-standard/local/lib/libflint-14.dylib
  [dochtml]     Referenced from: /Users/runner/runners/2.263.0/work/sage-test-27122/sage-test-27122/.tox/local-homebrew-macos-python3_pythonorg-standard/local/lib/python3.7/site-packages/sage/rings/integer.cpython-37m-darwin.so
  [dochtml]     Reason: image not found

comment:42 Changed 2 years ago by mkoeppe

Sounds like the install_name business has been messed up again

comment:43 Changed 2 years ago by mkoeppe

Indeed, broken again with DESTDIR, in https://github.com/wbhart/flint2/blob/v2.6.0/Makefile.in#L216:

	$(AT)if [ "$(OS)" = "Darwin" ] && [ "$(FLINT_SHARED)" -eq "1" ]; then \
		install_name_tool -id "$(DESTDIR)$(PREFIX)/$(LIBDIR)/$(FLINT_LIB)" "$(DESTDIR)$(PREFIX)/$(LIBDIR)/$(FLINT_LIBNAME)"; \
	fi

comment:44 Changed 2 years ago by mkoeppe

  • Status changed from needs_review to needs_work

comment:45 Changed 2 years ago by dimpase

please open an issue with upstream

comment:46 follow-up: Changed 2 years ago by mkoeppe

Here's a branch that should fix it. Please try: https://github.com/mkoeppe/flint2/tree/v2.6.0-sage

Last edited 2 years ago by mkoeppe (previous) (diff)

comment:47 Changed 2 years ago by git

  • Commit changed from 0d5a2e6b53dca951fb225d38ef9abc45ce264b62 to 77401d8a16c98ecd08201a01338a3f0f2e52d4c4

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

77401d8build/pkgs/flint: Add DESTDIR patch

comment:48 Changed 2 years ago by mkoeppe

I'm running some tests at https://github.com/mkoeppe/sage/actions/runs/128112212 (updated2)

Last edited 2 years ago by mkoeppe (previous) (diff)

comment:49 Changed 2 years ago by mkoeppe

  • Status changed from needs_work to needs_review

comment:50 follow-up: Changed 2 years ago by vdelecroix

e-antic should be fixed by #29826

comment:51 Changed 2 years ago by gh-kliem

Appears to work for me. Also the normaliz doesn't make any problems (at least all doctests in geometry pass and it did install cleanly with flint 2.6.0).

comment:52 in reply to: ↑ 50 ; follow-up: Changed 2 years ago by dimpase

Replying to vdelecroix:

e-antic should be fixed by #29826

should we add here the patch you produced for flint? https://github.com/wbhart/flint2/pull/766 as mentioned on https://github.com/videlec/e-antic/issues/93 ?

comment:53 in reply to: ↑ 52 Changed 2 years ago by vdelecroix

Replying to dimpase:

Replying to vdelecroix:

e-antic should be fixed by #29826

should we add here the patch you produced for flint? https://github.com/wbhart/flint2/pull/766 as mentioned on https://github.com/videlec/e-antic/issues/93 ?

The patch is not required for e-antic. Without the patch the fmpq_poly_add_fmpq from flint is broken. But this function does not seem to be used anywhere in sage.

comment:54 Changed 2 years ago by Winfried

I have tried to build Normaliz natively with Flint 2.6.0.

Then compiling e-antic fails with

configure: WARNING: arb.h: present but cannot be compiled
configure: WARNING: arb.h:     check for missing prerequisite headers?
configure: WARNING: arb.h: see the Autoconf documentation
configure: WARNING: arb.h:     section "Present But Cannot Be Compiled"
configure: WARNING: arb.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------------------- ##
configure: WARNING:     ## Report this to vincent.delecroix@math.cnrs.fr ##
configure: WARNING:     ## --------------------------------------------- ##

O.K. So we try to rebuild arb 2.17. This fails with

In file included from /home/winfried/Dropbox/git_normaliz/nmz_opt_lib/ARB_source/arb-2.17.0/fmpr.h:26:0,
                 from add_naive.c:12:
/home/winfried/Dropbox/git_normaliz/nmz_opt_lib/ARB_source/arb-2.17.0/fmpz_extras.h:47:1: error: redefinition of ‘fmpz_add_si’
 fmpz_add_si(fmpz_t z, const fmpz_t x, slong y)

comment:55 Changed 2 years ago by dimpase

Unpatched arb 2.16 and 2.17 do not work with flint 2.6.0. You need a patch - e.g. for arb 2.16 it is included in the branch of this ticket (IIRC the same patch will work for 2.17 too).

comment:56 in reply to: ↑ 46 ; follow-up: Changed 2 years ago by mkoeppe

Replying to mkoeppe:

Here's a branch that should fix it. Please try: https://github.com/mkoeppe/flint2/tree/v2.6.0-sage

This is now https://github.com/wbhart/flint2/pull/768

comment:57 Changed 2 years ago by mkoeppe

  • Authors changed from Dima Pasechnik to Dima Pasechnik, Matthias Koeppe

comment:58 in reply to: ↑ 56 Changed 2 years ago by mkoeppe

Replying to mkoeppe:

Replying to mkoeppe:

Here's a branch that should fix it. Please try: https://github.com/mkoeppe/flint2/tree/v2.6.0-sage

This is now https://github.com/wbhart/flint2/pull/768

It has been merged upstream.

comment:59 Changed 2 years ago by Winfried

I will update Normaliz to Flint 2.6.0 as soon as arb and e-antic are in complete harmony with it. I hope for some increase in performance, but that is not so urgent.

comment:60 Changed 2 years ago by mkoeppe

  • Dependencies set to #29826

comment:61 Changed 2 years ago by git

  • Commit changed from 77401d8a16c98ecd08201a01338a3f0f2e52d4c4 to 5f5fa6c9ac7b8c41bc0fb63279bb6af917b0be20

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

c05a5ebupgrade to e-antic 0.1.6
5f5fa6cMerge branch 't/29826/e-antic-0.1.6' into t/29719/public/packages/flint260

comment:62 Changed 2 years ago by mkoeppe

  • Reviewers set to Matthias Koeppe, ...

comment:63 Changed 2 years ago by mkoeppe

  • Report Upstream changed from Reported upstream. No feedback yet. to Completely fixed; Fix reported upstream

Another round of tests (this time just this ticket) at https://github.com/mkoeppe/sage/actions/runs/131411841

comment:64 Changed 2 years ago by mkoeppe

Looking good now. I'd be ready to set it to positive review, but we need another reviewer for the changes that I added.

comment:65 Changed 2 years ago by Winfried

I have updated Normaliz on GitHub/master to Flint 2.6.0/arb 2.18.0/e-antic 0.1.7. This required no change in the Normaliz code, as expected. The only visible change in the tests is that the floating point approximations to number field elements have one more decimal digit.

The version number is now 3.8.6. Note that the source file structure has been changed considerably: every cpp file is now comiled in a translation unit of its own. Moreover, some small files have been merged and some cpp files have been inserted into h files.

If it should be helpful, I can make a new Normaliz release the next days.

comment:66 Changed 2 years ago by Winfried

It seems that PyNormaliz? has a problem with the new version. Therefore please wait until further notice.

comment:67 Changed 2 years ago by mkoeppe

Arb update is #28623

comment:68 Changed 2 years ago by mkoeppe

  • Dependencies changed from #29826 to #29826, #28623
  • Work issues set to merge #28623 (arb)

comment:69 Changed 2 years ago by mkoeppe

  • Status changed from needs_review to needs_work

comment:70 Changed 2 years ago by Winfried

The problem was in Normaliz itself. Should be fixed now. The PyNormaliz? tests go through. PyNormaliz? 2.11 has not been changed.

comment:71 follow-up: Changed 2 years ago by git

  • Commit changed from 5f5fa6c9ac7b8c41bc0fb63279bb6af917b0be20 to 7eaeef225c1438c470d0778819817b5a640ae977

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

f9be33abuild/pkgs/arb: Update to 2.18.0
e7a25cbbuild/pkgs/arb/patches/silence-stderr-exponent-too-large.patch: Remove
e1d3d2aMerge branch 'u/mkoeppe/upgrade_arb_to_2_18_0' of trac.sagemath.org:sage into flint260arb218
7eaeef2removed no longer needed arb patch

comment:72 Changed 2 years ago by dimpase

  • Status changed from needs_work to needs_review
  • Work issues merge #28623 (arb) deleted

comment:73 Changed 2 years ago by Winfried

I did some computations yesterday. My impression: no performance gains or losses compared to the e-antic version based on Flint 2.5.2.

comment:74 in reply to: ↑ 71 ; follow-up: Changed 2 years ago by mkoeppe

Replying to git:

e1d3d2aMerge branch 'u/mkoeppe/upgrade_arb_to_2_18_0' of trac.sagemath.org:sage into flint260arb218

If you are running the CI on this already, please post the link

comment:75 follow-up: Changed 2 years ago by Winfried

The pill request has been merged, as you have see. Now action yet. Can I force it to happen?

comment:76 in reply to: ↑ 74 Changed 2 years ago by dimpase

Replying to mkoeppe:

Replying to git:

e1d3d2aMerge branch 'u/mkoeppe/upgrade_arb_to_2_18_0' of trac.sagemath.org:sage into flint260arb218

If you are running the CI on this already, please post the link

no,I haven't started these yet, I was waiting whether there are any more things to deal with here.

comment:77 in reply to: ↑ 75 Changed 2 years ago by dimpase

Replying to Winfried:

The pill request has been merged, as you have see. Now action yet. Can I force it to happen?

I am not sure I undestand what PR you mean. Could you post a link?

comment:78 follow-up: Changed 2 years ago by Winfried

Sorry, I meant the Normaliz pull request

https://github.com/Normaliz/Normaliz/pull/336

comment:79 in reply to: ↑ 78 ; follow-up: Changed 2 years ago by dimpase

Replying to Winfried:

Sorry, I meant the Normaliz pull request

https://github.com/Normaliz/Normaliz/pull/336

this does not seem to be related to updating flint/arb/e_antic. Did you need to do any changes to accommodate these updates?

comment:80 Changed 2 years ago by git

  • Commit changed from 7eaeef225c1438c470d0778819817b5a640ae977 to 4804674f034767b8110faf8ec32a53f03234269d

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

de6b953build/pkgs/e_antic: Update to 0.1.7
4804674Merge remote-tracking branch 'trac/u/mkoeppe/e-antic-0.1.6' into flint260

comment:82 in reply to: ↑ 79 Changed 2 years ago by Winfried

Replying to dimpase:

Replying to Winfried:

Sorry, I meant the Normaliz pull request

https://github.com/Normaliz/Normaliz/pull/336

this does not seem to be related to updating flint/arb/e_antic. Did you need to do any changes to accommodate these updates?

Sorry. The comment was misplaced. Too may threads to follow.

comment:83 Changed 2 years ago by dimpase

tests are being spoiled by the e_antic distro on LABRI server being inaccessible :-(

comment:84 Changed 2 years ago by fbissey

Volker just tried to pull #28623 which of course has doctest failures on its own. If everything is happening in this ticket, should we close #28623 as a duplicate?

comment:85 Changed 2 years ago by dimpase

  • Reviewers changed from Matthias Koeppe, ... to Matthias Koeppe, Dima Pasechnik
  • Status changed from needs_review to positive_review

I think this looks good.

comment:86 Changed 2 years ago by mkoeppe

  • Dependencies changed from #29826, #28623 to #29826
  • Description modified (diff)
  • Summary changed from upgrade to flint 2.6.0 to upgrade to flint 2.6.0, arb 2.18.0

comment:87 Changed 2 years ago by arojas

I am seeing the same failures that gh-timokau reported in https://trac.sagemath.org/ticket/28623#comment:9

With arb 2.17 (patched for flint 2.6 support) those tests pass.

comment:88 Changed 2 years ago by mkoeppe

  • Status changed from positive_review to needs_work

comment:89 Changed 2 years ago by mkoeppe

Indeed, they can also be seen in the archlinux-standard run in https://github.com/dimpase/sage/pull/12/checks?check_run_id=785953750

comment:91 Changed 2 years ago by git

  • Commit changed from 4804674f034767b8110faf8ec32a53f03234269d to 5fb82562161addacbbafd13947ccddbe9e6d7ada

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

9fca80bMerge tag '9.2.beta2' into t/29719/public/packages/flint260
5fb8256Merge branch 'u/mkoeppe/e-antic-0.1.6' of git://trac.sagemath.org/sage into t/29719/public/packages/flint260

comment:92 Changed 2 years ago by mkoeppe

  • Description modified (diff)
  • Summary changed from upgrade to flint 2.6.0, arb 2.18.0 to upgrade to flint 2.6.0

OK, backed out the arb upgrade.

comment:93 Changed 2 years ago by mkoeppe

Tests run at https://github.com/mkoeppe/sage/actions/runs/149186528

Sorry for missing the failures in the previous runs!

comment:94 Changed 2 years ago by mkoeppe

  • Status changed from needs_work to needs_review

comment:95 Changed 2 years ago by git

  • Commit changed from 5fb82562161addacbbafd13947ccddbe9e6d7ada to c39befba1a870fd1a5a31418a857be630493e531

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

c39befbMerge tag '9.2.beta3' into t/29719/public/packages/flint260

comment:96 Changed 2 years ago by dimpase

where are we here?

comment:97 follow-ups: Changed 2 years ago by fbissey

The arb ticket has been closed but this branch doesn't upgrade arb. It includes a patch for the current shipped arb but it doesn't revbump the arb package which means that the patch is only applied to fresh builds and not to incremental upgrades.

At the minimum I think this branch needs to include a revbump for arb, but since we obsoleted the arb ticket I would favor upgrade arb in this ticket too.

comment:98 in reply to: ↑ 97 Changed 2 years ago by dimpase

Replying to fbissey:

The arb ticket has been closed but this branch doesn't upgrade arb. It includes a patch for the current shipped arb but it doesn't revbump the arb package which means that the patch is only applied to fresh builds and not to incremental upgrades.

At the minimum I think this branch needs to include a revbump for arb, but since we obsoleted the arb ticket I would favor upgrade arb in this ticket too.

As this ticket updates a dependency of arb, it will rebuild arb regardless of the presense of revbump (or at least it should - it it doesn't it's a bug in the build system)

comment:99 Changed 2 years ago by slelievre

Flint 2.6.1 seems to have been released on 2020-07-23.

But maybe that should be a new ticket if things are ready here.

comment:100 in reply to: ↑ 97 Changed 2 years ago by mkoeppe

Replying to fbissey:

since we obsoleted the arb ticket I would favor upgrade arb in this ticket too.

The arb ticket #28623 has been un-obsoleted.

comment:101 Changed 2 years ago by git

  • Commit changed from c39befba1a870fd1a5a31418a857be630493e531 to a05842dbdd5b1db32cd2e3fcaaeb11121bbadf85

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

1273c98build/pkgs/arb: Bump patch level
a05842dMerge tag '9.2.beta6' into t/29719/public/packages/flint260

comment:102 in reply to: ↑ 97 Changed 2 years ago by mkoeppe

Replying to fbissey:

At the minimum I think this branch needs to include a revbump for arb

Done

comment:103 Changed 2 years ago by git

  • Commit changed from a05842dbdd5b1db32cd2e3fcaaeb11121bbadf85 to 656f4c8078c37d2d065d9d940371d5a3a34fa460

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

656f4c8build/pkgs/flint: Update to 2.6.1, drop upstreamed patch

comment:104 Changed 2 years ago by mkoeppe

  • Description modified (diff)
  • Report Upstream changed from Completely fixed; Fix reported upstream to N/A
  • Summary changed from upgrade to flint 2.6.0 to upgrade to flint 2.6.1

comment:106 in reply to: ↑ 105 Changed 2 years ago by slelievre

  • Cc slelievre added
  • Keywords upgrade added

Replying to mkoeppe:

Tests run at https://github.com/mkoeppe/sage/actions/runs/183335441

45 passed, 18 failed, 14 cancelled, 1 skipped

comment:107 Changed 2 years ago by mkoeppe

These summary statistics don't mean much because they do not distinguish sporadic errors (from the unreliable computing platform) from actual failures - one needs to look at the details. If you want, I can walk you through on how to read these runs...

comment:108 follow-up: Changed 2 years ago by dimpase

  • Status changed from needs_review to needs_work

e_antic needs a bump:

[e_antic-0.1.7] In file included from ./e-antic/poly_extra.h:15,
[e_antic-0.1.7]                  from poly_extra/bisection_step_arb.c:12:
[e_antic-0.1.7] ./e-antic/e-antic.h:24:2: error: #error FLINT 2.5.2 or 2.5.3 required
[e_antic-0.1.7]  #error FLINT 2.5.2 or 2.5.3 required
[e_antic-0.1.7]   ^~~~~
[e_antic-0.1.7] In file included from poly_extra/bisection_step_arb.c:12:
[e_antic-0.1.7] ./e-antic/poly_extra.h:267:8: error: static declaration of ‘fmpq_get_d’ follows non-static declaration
[e_antic-0.1.7]  double fmpq_get_d(const fmpq_t q)
[e_antic-0.1.7]         ^~~~~~~~~~
[e_antic-0.1.7] In file included from /mnt/opt/Sage/sage-dev/local/include/flint/fmpz_poly.h:36,
[e_antic-0.1.7]                  from ./e-antic/poly_extra.h:17,
[e_antic-0.1.7]                  from poly_extra/bisection_step_arb.c:12:
[e_antic-0.1.7] /mnt/opt/Sage/sage-dev/local/include/flint/fmpq.h:183:18: note: previous declaration of ‘fmpq_get_d’ was here
[e_antic-0.1.7]  FLINT_DLL double fmpq_get_d(const fmpq_t a);
[e_antic-0.1.7]                   ^~~~~~~~~~
[e_antic-0.1.7] In file included from poly_extra/bisection_step_arb.c:12:
[e_antic-0.1.7] ./e-antic/poly_extra.h:356:2: error: #error "Invalid flint release: e-antic needs flint-2.5.2, flint-2.5.3 or flint-2.6.0"
[e_antic-0.1.7]  #error "Invalid flint release: e-antic needs flint-2.5.2, flint-2.5.3 or flint-2.6.0"
[e_antic-0.1.7]   ^~~~~
[e_antic-0.1.7] make[5]: *** [Makefile:2696: poly_extra/bisection_step_arb.lo] Error 1

comment:109 Changed 2 years ago by slelievre

comment:110 Changed 2 years ago by mkoeppe

  • Dependencies changed from #29826 to #29826, #30262
  • Description modified (diff)
  • Summary changed from upgrade to flint 2.6.1 to upgrade to flint 2.6.2

comment:111 in reply to: ↑ 108 Changed 2 years ago by mkoeppe

Replying to dimpase:

e_antic needs a bump:

Done in #30262, needs merging

comment:112 Changed 2 years ago by slelievre

comment:113 Changed 2 years ago by dimpase

  • Description modified (diff)
  • Summary changed from upgrade to flint 2.6.2 to upgrade to flint 2.6.3

I propose to do 2.6.3.

comment:114 Changed 2 years ago by mkoeppe

I agree

comment:115 follow-up: Changed 2 years ago by gh-BrentBaccala

I'm working on getting multi-variate polynomials running with the new flint code.

I expect to be opening a dependent ticket for that soon.

In the meantime, every time I type 'make build' on this branch (without any local mods), it rebuilds sage.rings.polynomial.pbori. Every time. Takes about 60 seconds, too.

Any ideas why it keeps rebuilding pbori?

comment:116 in reply to: ↑ 115 ; follow-up: Changed 2 years ago by mkoeppe

Replying to gh-BrentBaccala:

every time I type 'make build' on this branch (without any local mods), it rebuilds sage.rings.polynomial.pbori. Every time. Takes about 60 seconds, too.

Any ideas why it keeps rebuilding pbori?

Sounds like there is something wrong with the Cython dependencies. You could investigate this by setting a breakpoint or printing data in sage_setup.command.sage_build_cython.sage_build_cython.create_extension

comment:117 in reply to: ↑ 116 Changed 2 years ago by dimpase

Replying to mkoeppe:

Replying to gh-BrentBaccala:

every time I type 'make build' on this branch (without any local mods), it rebuilds sage.rings.polynomial.pbori. Every time. Takes about 60 seconds, too.

Any ideas why it keeps rebuilding pbori?

Sounds like there is something wrong with the Cython dependencies. You could investigate this by setting a breakpoint or printing data in sage_setup.command.sage_build_cython.sage_build_cython.create_extension

I think this problem has fixed itself in the latest beta.

comment:118 Changed 2 years ago by slelievre

Rebase on 9.2.beta9?

comment:119 Changed 2 years ago by dimpase

postpone till 9.3?

comment:120 Changed 2 years ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

I agree

comment:121 follow-up: Changed 2 years ago by dimpase

  • Report Upstream changed from N/A to Reported upstream. Developers acknowledge bug.

an experiment with flint 2.6.3, which is a package on Gentoo, built with cmake, reveals that this breaks its recognition, as HAVE_GC may be undefined (it is just not there if GC is not "found" in some sense.

I opened https://github.com/wbhart/flint2/issues/837

comment:122 Changed 2 years ago by git

  • Commit changed from 656f4c8078c37d2d065d9d940371d5a3a34fa460 to add7970dd19e7ea0bc5eb3f6fe68d5d3fd62609e

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

48f70d0update flint to 2.6.0 (alpha version), remove patches
0055c56backport flint compat patch from arb's trunk
7559750skip square-freeness test for polynomials non-fields
d2e055afix and make robust related doctests
1dfd3c2build/pkgs/flint: Add DESTDIR patch
c84f9f1build/pkgs/arb: Bump patch level
add7970build/pkgs/flint: Update to 2.6.1, drop upstreamed patch

comment:123 Changed 23 months ago by git

  • Commit changed from add7970dd19e7ea0bc5eb3f6fe68d5d3fd62609e to fd5ff14797f3fc845003222eceea78c572edaba7

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

fd5ff14flint 2.6.3

comment:124 in reply to: ↑ 121 Changed 23 months ago by dimpase

Replying to dimpase:

an experiment with flint 2.6.3, which is a package on Gentoo, built with cmake, reveals that this breaks its recognition, as HAVE_GC may be undefined (it is just not there if GC is not "found" in some sense.

I opened https://github.com/wbhart/flint2/issues/837

fixed by #30642

comment:125 Changed 23 months ago by dimpase

  • Milestone changed from sage-9.3 to sage-9.2
  • Status changed from needs_work to needs_review

should we perhaps try getting this into 9.2?

comment:126 Changed 23 months ago by mkoeppe

Is this update needed for supporting Xcode 12?

comment:127 Changed 22 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:128 Changed 22 months ago by git

  • Commit changed from fd5ff14797f3fc845003222eceea78c572edaba7 to 333973dac6d1afb8225cd3985d2e19c045d7e121

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

a75a4c4update flint to 2.6.0 (alpha version), remove patches
e6da720backport flint compat patch from arb's trunk
e47c42cskip square-freeness test for polynomials non-fields
cba2cf9fix and make robust related doctests
81e3c39build/pkgs/flint: Add DESTDIR patch
de52816build/pkgs/arb: Bump patch level
aff940dbuild/pkgs/flint: Update to 2.6.1, drop upstreamed patch
333973dflint 2.6.3

comment:129 Changed 22 months ago by dimpase

rebased over 9.2.rc3

comment:130 Changed 22 months ago by mkoeppe

  • Dependencies changed from #29826, #30262 to #30805
  • Work issues set to rebase on top of #30805

comment:131 Changed 22 months ago by git

  • Commit changed from 333973dac6d1afb8225cd3985d2e19c045d7e121 to 01271cb54df9a43111f4d9070d0c2a6dbe6768b0

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

14fd292prevent segfaults with flint 2.6
6898cc6update flint to 2.6.0 (alpha version), remove patches
436f15abackport flint compat patch from arb's trunk
5de748dfix and make robust related doctests
df7f4c2build/pkgs/flint: Add DESTDIR patch
ee7b2bbbuild/pkgs/arb: Bump patch level
1088accbuild/pkgs/flint: Update to 2.6.1, drop upstreamed patch
01271cbflint 2.6.3

comment:132 Changed 22 months ago by dimpase

rebased over #30805

comment:133 follow-up: Changed 22 months ago by gh-BrentBaccala

To build the current version of this branch (commit 01271cb) on Ubuntu I had to apt install libgmp-dev.

I don't think that's listed as a build requirement.

comment:134 Changed 22 months ago by mkoeppe

Logs please

Changed 22 months ago by gh-BrentBaccala

Build attempt on commit 01271cb

comment:135 follow-up: Changed 22 months ago by gh-BrentBaccala

I attached a log file.

There's really not much to see - a bunch of failed downloads because flint 2.6.3 isn't in any of the Sage mirrors yet, then a compile failure because it couldn't find "gmp.h", which I resolved with apt install libgmp-dev.

Last edited 22 months ago by gh-BrentBaccala (previous) (diff)

comment:136 in reply to: ↑ 135 ; follow-up: Changed 22 months ago by dimpase

Replying to gh-BrentBaccala:

I attached a log file.

There's really not much to see - a bunch of failed downloads because flint 2.6.3 isn't in any of the Sage mirrors yet,

./configure has --enable-download-from-upstream-url option, which use would allow an automatic download from the url in checksums.iniof the package.

then a compile failure because it couldn't find "gmp.h", which I resolved with apt install libgmp-dev.

look at what ./configure tries to tell at the end of its run - there should be a list of system packages to install to make one's life easier. On Debian like 90% of Sage's (non-python) libs, as well as Python itself, etc etc, are unvendored, see #27330

comment:137 in reply to: ↑ 136 Changed 22 months ago by gh-BrentBaccala

Replying to dimpase:

look at what ./configure tries to tell at the end of its run - there should be a list of system packages to install to make one's life easier. On Debian like 90% of Sage's (non-python) libs, as well as Python itself, etc etc, are unvendored, see #27330

I had to re-run configure after installing libgmp-dev, and I didn't keep the old log, but I don't remember any glaring complaints. Furthermore, I found this in the (new) config.log:

configure:37965: result: gmp-6.1.2: using system package; SPKG will not be installed

I infer from this that a SPKG is available and should have been used by the original build.

I don't know enough about Sage packaging to know how a SPKG gmp should be used by flint.

comment:138 in reply to: ↑ 133 ; follow-up: Changed 22 months ago by dimpase

Replying to gh-BrentBaccala:

To build the current version of this branch (commit 01271cb) on Ubuntu I had to apt install libgmp-dev.

I don't think that's listed as a build requirement.

How did you start the build?

I only can see this happening on an unconfigured tree if one does not start by running ./configure, but rather by doing something like ./sage -p flint (which indeed does not check dependencies)

comment:139 in reply to: ↑ 138 Changed 22 months ago by gh-BrentBaccala

Replying to dimpase:

Replying to gh-BrentBaccala:

To build the current version of this branch (commit 01271cb) on Ubuntu I had to apt install libgmp-dev.

I don't think that's listed as a build requirement.

How did you start the build?

I only can see this happening on an unconfigured tree if one does not start by running ./configure, but rather by doing something like ./sage -p flint (which indeed does not check dependencies)

After git checkout, I ran ./bootstrap, then ./configure, then MAKE="make -j8" make.

comment:140 Changed 22 months ago by dimpase

could be stale leftovers - how about make bootstrap-clean && make distclean ? (for the former possibly #30795 is needed)

comment:141 Changed 21 months ago by git

  • Commit changed from 01271cb54df9a43111f4d9070d0c2a6dbe6768b0 to 7681b1a38b797ccacdaaa0de473bab8116084fdb

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

6b3a2edupdate flint to 2.6.0 (alpha version), remove patches
b53bf8efix and make robust related doctests
7731c60build/pkgs/flint: Add DESTDIR patch
24ff512build/pkgs/flint: Update to 2.6.1, drop upstreamed patch
7681b1aflint 2.6.3

comment:142 Changed 21 months ago by dimpase

rebased over 9.3.beta0, squashed few things. Let us get this in please!

In particular, here are patches that need to fix doctest on distros that ship flint 2.6.3 already, e.g. Homebrew, Ubuntu 20.10.

comment:143 Changed 21 months ago by mkoeppe

  • Status changed from needs_review to positive_review

comment:144 Changed 21 months ago by dimpase

  • Work issues rebase on top of #30805 deleted

comment:145 Changed 21 months ago by vbraun

  • Branch changed from public/packages/flint260 to 7681b1a38b797ccacdaaa0de473bab8116084fdb
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.