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

sagemath: update to 9.8 #42048

Merged
merged 3 commits into from
Feb 15, 2023
Merged

sagemath: update to 9.8 #42048

merged 3 commits into from
Feb 15, 2023

Conversation

tornaria
Copy link
Contributor

@tornaria tornaria commented Feb 2, 2023

This PR includes

  • update brial to 1.2.12 (it has to be built in sync because of boost)
  • update singular to 4.3.1.p3 (it has to be built in sync because an output difference)

Changes in sagemath package:

  • fix edge case of python 3.11 integer conversion on 32 bit
  • support tachyon 0.99.5
  • support singular 4.3.1p3
  • fix tests for giac 1.9.0.35
  • fix tests for numpy 1.24
  • skip unstable tests in klyachko.py
  • remove zn_poly dependency

Testing the changes

  • I tested the changes in this PR: YES

@tornaria tornaria changed the title Sagemath sagemath: rebuild for dep updates and fixes Feb 2, 2023
@tornaria
Copy link
Contributor Author

tornaria commented Feb 2, 2023

I'm doing system testing of this PR together with #40222, #41210, #41572, #41972, #41973, #42016, #42043, #42044.

@tornaria
Copy link
Contributor Author

tornaria commented Feb 3, 2023

So x86_64 (both glibc and musl) failed with this:

sage -t --warn-long 30.0 --random-seed=0 /builddir/sagemath-9.7/pkgs/sagemath-standard/build/lib.linux-x86_64-cpython-311/sage/interfaces/expect.py
**********************************************************************
File "/builddir/sagemath-9.7/pkgs/sagemath-standard/build/lib.linux-x86_64-cpython-311/sage/interfaces/expect.py", line 937, in sage.interfaces.expect.Expect._eval_line
Failed example:
    singular.interrupt()
Expected:
    True
Got:
    False
**********************************************************************
File "/builddir/sagemath-9.7/pkgs/sagemath-standard/build/lib.linux-x86_64-cpython-311/sage/interfaces/expect.py", line 943, in sage.interfaces.expect.Expect._eval_line
Failed example:
    singular('2+3')
Expected:
    Singular crashed -- automatically restarting.
    5
Got:
    5
**********************************************************************
1 item had failures:
   2 of  16 in sage.interfaces.expect.Expect._eval_line
    [101 tests, 2 failures, 23.40 s]

It has already happened before (#39876 (comment), #41085 (comment)).

This was already known upstream (https://trac.sagemath.org/ticket/33907) and it turns out I already fixed this (it's even merged upstream for 9.8!) but I forgot. This only happens under very heavy load (as here in CI, but not in my box even if I run 16 threads on 8 cores, it has to be way more loaded to trigger)

I'll push a new PR with the patch from https://git.sagemath.org/sage.git/commit?id=6f5c1c2fc8bcfb5e6555716d05ce70511795ffa1.

Meanwhile my local tests with all the above PR together are successful.

@tornaria tornaria force-pushed the sagemath branch 3 times, most recently from d8a48a5 to bd75ad9 Compare February 4, 2023 01:04
@tornaria
Copy link
Contributor Author

tornaria commented Feb 4, 2023

Tested locally together with #41210, #41572, #41972, #41973, #42016, #42043, #42044, #42050 on x86_64 (glibc/musl) and i686 (glibc).

@tornaria tornaria force-pushed the sagemath branch 2 times, most recently from 4bd37d8 to d61fbc7 Compare February 5, 2023 14:00
@tornaria
Copy link
Contributor Author

tornaria commented Feb 5, 2023

Rebased without changes to restart CI.

@tornaria
Copy link
Contributor Author

tornaria commented Feb 5, 2023

I had to make a change since the tarball was moved; a different dirname changes the sha256 of the tarball but I checked that the contents are identical -- other than the name of the top level dir which xbps-src renames anyway (that feature gets another 👍 ).

@tornaria
Copy link
Contributor Author

tornaria commented Feb 6, 2023

@dkwo @leahneukirchen this is good to merge IMO, as are #41210, #41572, #41972, #41973, #42016, #42043, #42044, #42050. I tested locally all together on the three non-cross arches.

@dkwo
Copy link
Contributor

dkwo commented Feb 6, 2023

On aarch64 (after rebuilding libtool and ntl), the following tests fail:

graphs/generators/{distance_regular.ptx, classical_geometries.py} # segfault
graphs/strongly_regular_db.pyx # segfault
combinat/matrices/hadamard_matrix.py # segfault
quadratic_forms/binary_qf.py # 2 failed
schemes/elliptic_curves/hom_velusqrt.py # 1 failed
graphs/generic_graph.py # timed out

@dkwo
Copy link
Contributor

dkwo commented Feb 6, 2023

I did not test with the linked PR's though.

@tornaria
Copy link
Contributor Author

tornaria commented Feb 6, 2023

On aarch64 (after rebuilding libtool and ntl), the following tests fail:

graphs/generators/{distance_regular.ptx, classical_geometries.py} # segfault
graphs/strongly_regular_db.pyx # segfault
combinat/matrices/hadamard_matrix.py # segfault
quadratic_forms/binary_qf.py # 2 failed
schemes/elliptic_curves/hom_velusqrt.py # 1 failed
graphs/generic_graph.py # timed out

Were these doctests passing before this PR?

@dkwo
Copy link
Contributor

dkwo commented Feb 6, 2023

If I build from Void's master branch, it fails to start the tests, with ImportError: ../sage/rings/polynomial/polynomial_integer_dense_flint.cpython-311-aarch64-linux-gno.so: undefined symbol: fmpz_set_ZZ. Strangely, in this last case I had to first build maxima without sbcl, as we discussed in the past, while in building the current PR I did not have to do it.

@dkwo
Copy link
Contributor

dkwo commented Feb 7, 2023

btw, flintlib currently fails checks on musl:

=> flintlib-2.9.0_1: running do_check ...
    CC   test_helpers.o
make[1]: Entering directory '/builddir/flintlib-2.9.0'
make[1]: Nothing to be done for 'shared'.
make[1]: Leaving directory '/builddir/flintlib-2.9.0'
make[1]: Entering directory '/builddir/flintlib-2.9.0'
make[1]: Nothing to be done for 'static'.
make[1]: Leaving directory '/builddir/flintlib-2.9.0'
make[1]: Entering directory '/builddir/flintlib-2.9.0'
mkdir -p build/test
    CC   build/test/t-add_ssaaaa
    CC   build/test/t-add_sssaaaaaa
    CC   build/test/t-add_ssssaaaaaaaa
    CC   build/test/t-byte_swap
    CC   build/test/t-count_leading_zeros
    CC   build/test/t-count_trailing_zeros
    CC   build/test/t-invert_limb
    CC   build/test/t-sdiv_qrnnd
    CC   build/test/t-smul_ppmm
    CC   build/test/t-sub_dddmmmsss
    CC   build/test/t-sub_ddmmss
    CC   build/test/t-udiv_qrnnd
    CC   build/test/t-udiv_qrnnd_preinv
    CC   build/test/t-umul_ppmm
make[1]: Leaving directory '/builddir/flintlib-2.9.0'
make[1]: Entering directory '/builddir/flintlib-2.9.0'
add_sssaaaaaa....add_ssaaaa....byte_swap....add_ssssaaaaaaaa....PASS
count_leading_zeros....PASS
count_trailing_zeros....PASS
invert_limb....PASS
sdiv_qrnnd....make[1]: *** [Makefile.subdirs:107: build/test/t-sdiv_qrnnd_RUN] Arithmetic exception
make[1]: *** Waiting for unfinished jobs....
PASS
PASS
PASS
make[1]: Leaving directory '/builddir/flintlib-2.9.0'
make: *** [Makefile:222: check] Error 2

@tornaria
Copy link
Contributor Author

sagemath 9.8 is released. I'll work on that.

Meanwhile, it would be helpful if all the other package updates can be merged.

Re: aarch64, can we move that to a separate issue? I'm not ready to support sagemath on aarch64 yet.

@dkwo
Copy link
Contributor

dkwo commented Feb 13, 2023

Re: aarch64, can we move that to a separate issue? I'm not ready to support sagemath on aarch64 yet.

That makes sense, sorry for pulluting this thread.

@tornaria tornaria force-pushed the sagemath branch 2 times, most recently from 8675dce to 7ed9dc7 Compare February 14, 2023 00:11
@tornaria
Copy link
Contributor Author

We had a few failures because I patched sagemath to support singular 4.3.1p3, but I didn't upgrade singular (see #42235).

Just to make it easy, I include #42235 here.

@tornaria tornaria changed the title sagemath: rebuild for dep updates and fixes sagemath: update to 9.8 Feb 14, 2023
Also:
 - fix edge case of python 3.11 integer conversion on 32 bit
 - support tachyon 0.99.5
 - support singular 4.3.1p3
 - fix tests for giac 1.9.0.35
 - fix tests for numpy 1.24
 - skip unstable tests in klyachko.py
 - remove zn_poly dependency
 - fix very slow test in stream.py
@tornaria
Copy link
Contributor Author

The only test failure in the previous run was a very slow test that triggered a timeout on i686. I fixed the slow test in sagemath/sage#35127 and include the fix here so the timeout doesn't trouble us again.

@tornaria
Copy link
Contributor Author

@leahneukirchen this is IMO ready to merge.

@leahneukirchen leahneukirchen merged commit a59f11f into void-linux:master Feb 15, 2023
@tornaria tornaria deleted the sagemath branch February 15, 2023 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants