Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade: Flint 2.7.1 #31069

Closed
slel opened this issue Dec 17, 2020 · 63 comments
Closed

Upgrade: Flint 2.7.1 #31069

slel opened this issue Dec 17, 2020 · 63 comments

Comments

@slel
Copy link
Member

slel commented Dec 17, 2020

This is to upgrade to Flint 2.7.1.

Our last upgrade was to Flint 2.6.3 in #29719.

Changes in FLINT 2.7.0 (from NEWS file)

2.7.0 -- 11 Dec 2020

  • Multivariate factorisation
  • Square root and square testing for finite fields
  • Square root and square testing for multivariates
  • Zassenhaus factoring speedups (incl. degree pruning)
  • Fast factorisation of cubic univariate polynomials
  • Add context objects to fmpz_mod_poly functions
  • Use BLAS for matrix multiplication over Z/nZ (small n)
  • Linear solving for non-square/singular matrices (can_solve)
  • Speed up factorisation over Z/nZ (for multiprecision n)

From the packaging point of view the main changes will be

  • configuring BLAS
  • pthread support
  • context object in fmpz_mod_poly function (API change)

Related:

Depends on #25993

CC: @antonio-rojas @dimpase @kiwifb @timokau @isuruf @orlitzky @mkoeppe @slel @saraedum @videlec @kliem

Component: packages: standard

Keywords: upgrade, flint

Author: Vincent Delecroix, Matthias Koeppe

Branch/Commit: 8c71a1c

Reviewer: Dima Pasechnik

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

@slel slel added this to the sage-9.3 milestone Dec 17, 2020
@slel
Copy link
Member Author

slel commented Dec 17, 2020

comment:1

Flint 2.7-rc2 is out. Can someone test with Sage?

@kiwifb

This comment has been minimized.

@kiwifb

This comment has been minimized.

@slel
Copy link
Member Author

slel commented Dec 18, 2020

comment:4

Flint 2.7.0 was released today (2020-12-18).

@antonio-rojas
Copy link
Contributor

comment:5

singular and e-antic fail to build due to the API changes in fmpz_mod_poly

@antonio-rojas
Copy link
Contributor

comment:6

Actually, Singular is fixed in the (just released) 4.2.0 version. Unfortunately doesn't help much since the Singular upgrade has been stuck for years in #25993

@videlec

This comment has been minimized.

@antonio-rojas
Copy link
Contributor

comment:8

sagelib itself builds fine with flint 2.7 and passes doctests, modulo the singular upgrade.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Dec 27, 2020
@kedlaya
Copy link
Sponsor Contributor

kedlaya commented Jan 22, 2021

comment:10

For the record, we are now up to Flint 2.7.1. As the timing and numbering suggest, this is mainly a bugfix release.

@thierry-FreeBSD
Copy link

comment:11

e-antic has been fixed (in head, to be 1.0.0).

@slel

This comment has been minimized.

@slel slel changed the title Upgrade: Flint 2.7.0 Upgrade: Flint 2.7.1 Feb 19, 2021
@videlec

This comment has been minimized.

@videlec

This comment has been minimized.

@videlec
Copy link
Contributor

videlec commented Feb 20, 2021

New commits:

73bd1a731069: flint version upgrade
29c047731069: flint declarations

@videlec
Copy link
Contributor

videlec commented Feb 20, 2021

Commit: 29c0477

@videlec
Copy link
Contributor

videlec commented Feb 20, 2021

Author: Vincent Delecroix

@videlec
Copy link
Contributor

videlec commented Feb 20, 2021

Branch: public/31069

@videlec
Copy link
Contributor

videlec commented Feb 20, 2021

comment:16

I did not have any trouble to build singular. What was the issue?

@antonio-rojas
Copy link
Contributor

comment:17

Replying to @videlec:

I did not have any trouble to build singular. What was the issue?

Which version of singular?

@videlec
Copy link
Contributor

videlec commented Feb 20, 2021

comment:18

Replying to @antonio-rojas:

Replying to @videlec:

I did not have any trouble to build singular. What was the issue?

Which version of singular?

4.1.1p2.p0 shipped with sage 9.3.beta7

@antonio-rojas
Copy link
Contributor

comment:19

Replying to @videlec:

Replying to @antonio-rojas:

Replying to @videlec:

I did not have any trouble to build singular. What was the issue?

Which version of singular?

4.1.1p2.p0 shipped with sage 9.3.beta7

It builds because it's not using flint

checking for FLINT >= 2.4... problem
Sorry, your FLINT version is too old. Disabling.
configure: WARNING: Unable to find FLINT (which is strongly recommended) on your machine: please use --with-flint=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.3 Feb 20, 2021
@dimpase
Copy link
Member

dimpase commented Mar 24, 2021

comment:46

lgtm too

@dimpase
Copy link
Member

dimpase commented Mar 24, 2021

Changed reviewer from https://github.com/mkoeppe/sage/actions/runs/666698487 to Dima Pasechnik

@mkoeppe
Copy link
Member

mkoeppe commented Mar 24, 2021

comment:47

Thanks!

@mkoeppe
Copy link
Member

mkoeppe commented Mar 29, 2021

comment:48

Setting priority to blocker to bring this ticket to the attention of the release bot.

@roed314
Copy link
Contributor

roed314 commented Mar 30, 2021

comment:49

After merging this ticket into #31548 (since I want to use new functionality from FLINT 2.7.1 there) I'm getting errors starting Sage. I don't usually update spkgs outside of beta releases, so I could be doing something wrong (I'm running OS X 10.15.2).

$ git trac fetch 31069 && git merge
$ make build
...
Sage build/upgrade complete!
$ sage
ImportError Python 3.9.1: /Users/roed/sage/sage-9.3.beta7/local/bin/python3
...
ImportError: dlopen(/Users/roed/sage/sage-9.3.beta7/local/lib/python3.9/site-packages/sage/matrix/matrix_mpolynomial_dense.cpython-39-darwin.so, 2): Library not loaded: /Users/roed/sage/sage-9.3.beta7/local/lib/libSingular-4.1.1.dylib
  Referenced from: /Users/roed/sage/sage-9.3.beta7/local/lib/python3.9/site-packages/sage/matrix/matrix_mpolynomial_dense.cpython-39-darwin.so
  Reason: image not found

Full install.log available here.

@kiwifb
Copy link
Member

kiwifb commented Mar 30, 2021

comment:50

I believe you need singular 4.2.0p1 (9.3.beta8 if I am not mistaken) with that. Singular uses flint so does need rebuilding and 4.2.0 is the first one that is compatible with flint-2.7.1.

@roed314
Copy link
Contributor

roed314 commented Mar 30, 2021

comment:51

Despite the folder name, this is based on sage-9.3.beta9, and when I did make build it appeared to be building singular-4.2.0p1+2021-03-13+sage.

@roed314
Copy link
Contributor

roed314 commented Mar 30, 2021

comment:52

I feel like I'm missing something basic here: when I try running sage -f flint it gives me lots of errors saying that flint-2.7.1 isn't found:

[flint-2.7.1] Attempting to download package flint-2.7.1.tar.gz from mirrors
[flint-2.7.1] http://mirrors.mit.edu/sage/spkg/upstream/flint/flint-2.7.1.tar.gz
[flint-2.7.1] [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
[flint-2.7.1] ERROR [transfer|run:135]: [Errno 404] Not Found: '//mirrors.mit.edu/sage/spkg/upstream/flint/flint-2.7.1.tar.gz'
[flint-2.7.1] http://www.mirrorservice.org/sites/www.sagemath.org/spkg/upstream/flint/flint-2.7.1.tar.gz
...
[flint-2.7.1] FileNotMirroredError: tarball does not exist on mirror network
[flint-2.7.1] ************************************************************************
[flint-2.7.1] ************************************************************************
[flint-2.7.1] Error downloading flint-2.7.1.tar.gz

Do I need to download a tarball manually from somewhere?

@kiwifb
Copy link
Member

kiwifb commented Mar 30, 2021

comment:53

Replying to @roed314:

Despite the folder name, this is based on sage-9.3.beta9, and when I did make build it appeared to be building singular-4.2.0p1+2021-03-13+sage.

OK, then it appears that somehow sage/matrix/matrix_mpolynomial_dense.cpython-39-darwin.so has not be rebuilt because it is still looking for libSingular-4.1.1 when it should look for libSingular-4.2.0.

@kiwifb
Copy link
Member

kiwifb commented Mar 30, 2021

comment:54

Replying to @roed314:

I feel like I'm missing something basic here: when I try running sage -f flint it gives me lots of errors saying that flint-2.7.1 isn't found:

[flint-2.7.1] Attempting to download package flint-2.7.1.tar.gz from mirrors
[flint-2.7.1] http://mirrors.mit.edu/sage/spkg/upstream/flint/flint-2.7.1.tar.gz
[flint-2.7.1] [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
[flint-2.7.1] ERROR [transfer|run:135]: [Errno 404] Not Found: '//mirrors.mit.edu/sage/spkg/upstream/flint/flint-2.7.1.tar.gz'
[flint-2.7.1] http://www.mirrorservice.org/sites/www.sagemath.org/spkg/upstream/flint/flint-2.7.1.tar.gz
...
[flint-2.7.1] FileNotMirroredError: tarball does not exist on mirror network
[flint-2.7.1] ************************************************************************
[flint-2.7.1] ************************************************************************
[flint-2.7.1] Error downloading flint-2.7.1.tar.gz

Do I need to download a tarball manually from somewhere?

This ticket is not merged, tarball are not usually mirrored before Volker attempt to merge the tickets. You'll have to fetch the source a different way. Matthias created a handy way of using a string called upstream_url in the file checksum.ini to do the fetching from upstream but I cannot remember how it works.

@slel
Copy link
Member Author

slel commented Mar 30, 2021

comment:55

Do this:

$ ./bootstrap -q
$ ./configure --enable-download-from-upstream-url -q
$ make -s V=0

@roed314
Copy link
Contributor

roed314 commented Mar 30, 2021

comment:56

Thanks! That seems to have worked.

@roed314
Copy link
Contributor

roed314 commented Mar 31, 2021

comment:57

For anyone else looking at this, I also had to do sage -f flint after the commands Samuel gave.

@slel
Copy link
Member Author

slel commented Mar 31, 2021

comment:58

This should do everything at once:

$ ./bootstrap -q
$ ./configure --enable-download-from-upstream-url -q
$ make -s V=0 flint-clean
$ make -s V=0

@mkoeppe
Copy link
Member

mkoeppe commented Apr 2, 2021

comment:59

Looks unrealistic to squeeze this into 9.3

@vbraun
Copy link
Member

vbraun commented May 27, 2021

Changed branch from public/31069 to 8c71a1c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests