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

Build still non-portable despite SAGE_FAT_BINARY=yes because of numpy #31565

Closed
mkoeppe opened this issue Mar 26, 2021 · 47 comments
Closed

Build still non-portable despite SAGE_FAT_BINARY=yes because of numpy #31565

mkoeppe opened this issue Mar 26, 2021 · 47 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 26, 2021

Follow-up from #29537, #31521.

Observed on cygwin-standard but likely also affects the Docker images and the Sage binary distribution.

With the upgrade to numpy 1.20.x (#31008), the non-portability shows as an error message instead of a crash:

  [sagelib-9.4.beta0]       from numpy.core._multiarray_umath import (
  [sagelib-9.4.beta0]   RuntimeError: NumPy was built with baseline optimizations: 
  [sagelib-9.4.beta0]   (SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_SKX) but your machine doesn't support:
  [sagelib-9.4.beta0]   (AVX512F).
  [sagelib-9.4.beta0]   ************************************************************************
  [sagelib-9.4.beta0]   Error building the Sage library
  [sagelib-9.4.beta0]   ************************************************************************
  [sagelib-9.4.beta0] Full log file: /cygdrive/d/a/sage/sage/logs/pkgs/sagelib-9.4.beta0.log

Report withs the 9.3 Linux binary:

Depends on #32257

CC: @embray @kliem @dimpase @vbraun @kiwifb @slel

Component: build

Keywords: sdl

Author: Jonathan Kliem

Branch/Commit: 49e531d

Reviewer: Thierry Monteil

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

@mkoeppe mkoeppe added this to the sage-9.3 milestone Mar 26, 2021
@kiwifb
Copy link
Member

kiwifb commented Mar 29, 2021

comment:2

What are the symptoms? I don't really do cygwin but I may do docker one day.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 3, 2021

comment:3

The symptom is that something you build on one machine does not run on another machine, aborting with SIGILL.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 10, 2021

comment:5

Moving to 9.4, as 9.3 has been released.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 May 10, 2021
@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 4, 2021

Dependencies: #31008

@kliem
Copy link
Contributor

kliem commented Jun 4, 2021

comment:7

I guess we need to unwind #31521 now??

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 4, 2021

comment:8

Ah, that's right!

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 19, 2021

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 19, 2021

New commits:

b249c47Revert "Revert "do not allow numpy intrinsics when building fat binary""

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 19, 2021

Author: Jonathan Kliem

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 19, 2021

Commit: b249c47

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 19, 2021

@kliem
Copy link
Contributor

kliem commented Jun 19, 2021

comment:14

Thanks for taking care of this.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 20, 2021

comment:15

The cygwin-standard build looked rather promising (no "baseline optimizations" message, no crash when just importing numpy) but I am getting crashes again https://github.com/mkoeppe/sage/runs/2867645468 when the doctests do any plotting.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 20, 2021

Changed reviewer from https://github.com/mkoeppe/sage/actions/runs/952966309 to Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 20, 2021

comment:16

The other runs at https://github.com/mkoeppe/sage/runs/2865933225?check_suite_focus=true look clean.

So I consider this ticket already an improvement. We'll have to chase the crash on cygwin when switching CPUs between build stages in ... yet another ... follow-up ticket.

@kliem
Copy link
Contributor

kliem commented Jun 23, 2021

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 19, 2021

comment:26

Unclear whether this is still needed now that #32021 is merged in 9.4.beta5

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 21, 2021

Changed dependencies from #31008 to #32257

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 21, 2021

comment:28

With #32021 and the pynac build failure fixed by #32257, we are back to being able to build and run the testsuite on Cygwin. https://github.com/mkoeppe/sage/runs/3126612760?check_suite_focus=true

Numerous SIGSEGVs whenever plotting is involved point to more trouble with numpy.

I'll try out the branch of the present ticket on top of #32257.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 21, 2021

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

d4156f7build/pkgs/singular/patches/0001-factory-canonicalform.h-Add-more-FACTORY_PUBLIC.patch: New
49e531ddisable baseline in case of SAGE_FAT_BINARY

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 21, 2021

Changed commit from 82ae485 to 49e531d

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 21, 2021

Changed reviewer from Matthias Koeppe to https://github.com/mkoeppe/sage/actions/runs/1054288431

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 21, 2021

comment:30

That's now running at https://github.com/mkoeppe/sage/actions/runs/1054288431

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 22, 2021

comment:31

Replying to @mkoeppe:

Numerous SIGSEGVs whenever plotting is involved point to more trouble with numpy.

I'll try out the branch of the present ticket on top of #32257.

Same issues as before.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 22, 2021

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 22, 2021

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 23, 2021

comment:33

Also with #32080 no change. Segfaults on every plot.

Next step would be to try to reproduce this in a local installation in Cygwin.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 26, 2021

comment:35

Reduced to critical - see https://groups.google.com/g/sage-release/c/91CGN0cra2k/m/1WwPZNshBQAJ

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Aug 3, 2021

Changed keywords from none to sdl

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Aug 3, 2021

Reviewer: Thierry Monteil

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Aug 3, 2021

comment:36

I confirm that this branch fixes SSE2 bug for numpy in a quemulated Pentium 3. Note however that the error appeared at run time not build time.

As this will allow me to rebuild 32bit patchbots and a new SDL for bullseye release (which i did not do for a while), i am +1 for setting this ticket a blocker and get it merged in 9.4.

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Aug 3, 2021

comment:37

If nobody complains.

@vbraun
Copy link
Member

vbraun commented Aug 8, 2021

Changed branch from public/31565 to 49e531d

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

5 participants