-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Meta-ticket: Port to Apple silicon #30592
Comments
comment:1
Does GitHub Actions provide that kind of machines for CI? Somewhat related: |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:5
gFortran is now working natively on Apple Silicon (ARM64) as part of GCC.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:8
Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date. |
comment:9
If I wanted to help test this, what could I do? I tried upgrading my Sage yesterday (finally!) but ran into problems with pari and some other packages; then I did
that look scary. Anyway, I'd be quite interested in testing anything directly from source that does not use Homebrew, which after all the warnings many years ago about Macports and Fink conflicts I'm skeptical of. |
comment:10
Homebrew is the most popular "missing package manager" for macOS, and I really do not understand why you are sceptical about. Sage on x86_64 Homebrew mostly works, with many, many packages used rather than built from source. (Besides, do you have any idea how much effort went into this, supporting Sage using Homebrew packages? No, well, you many be "sceptical" about it, but it does work.) Macports doesn't work with Sage, and Fink is mostly dead, IMHO Homebrew surely does have ready Apple M1 GMP, cf. Maintaining the Sage status quo - porting patches from Hombrew back to Sage, etc, it's such a waste of time if you ask me. |
comment:11
I guess bad experiences in the past with the other "managers" we will not name again - and, separately, liking to maintain ability for Mac users to download source and just type However, as to the main topic of this ticket, is this simply "use Homebrew/Rosetta" or is there presumably some other testing I can do to help? |
comment:12
Replying to @dimpase:
Just curious -- is there work underway to make sagemath itself a homebrew package, so one could do "brew install sagemath"? That would be pretty awesome. |
comment:13
Making sage into a homebrew package is on the wishlist. (I don't think anyone is doing anything about it.) I think further discussion of this should go to #29395. |
comment:14
Replying to @williamstein:
I played with creating Homebrew formulae a while ago, see https://github.com/sagemath/homebrew-science/commits/master It's not that hard - and in fact e.g. arb and flint made it into mainline Homebrew since I touched this last time. It's more annoying that we sometimes need a variation of what's in Homebrew, e.g. it ships single-threaded Pari, but we need multi-threaded (as that's what giac requires). |
comment:15
Replying to @kcrisman:
no, no Rosetta, just pure, unfiltered, Homebrew. Give it a try please, I'd like to know how far we are there. |
comment:16
by the way, this ticket says "need gfortran first" (for M1), but it's already there. |
This comment has been minimized.
This comment has been minimized.
comment:18
Exactly; so homebrew will be using ARM stuff natively in this case?
Wish I hadn't destroyed my working install :( but I think I have a few old binaries I can use if under duress. That's why I waited for the semester to finish! I'll post on devel if I achieve anything interesting. One note in prereqs: With respect to BLAS (mentioned in one of the threads) I get
so hopefully accelerate will continue to work here for Sage as an option. |
comment:19
Replying to @kcrisman:
yes. They have a setup for this now (IIRC they use /opt/local for native M1, and /usr/local for Rosetta)
it's not an option if you want to use more external Homebrew packages, which depend on (open)blas. |
This comment has been minimized.
This comment has been minimized.
comment:21
We may also need to add |
comment:22
Replying to @kcrisman:
I see no need for this. |
comment:23
While we have had a bit of trouble getting complete information, it appears that the current version of the SageMath app (based on rc0) for macOS works fine in the Intel emulation mode on M1 macs. This was not always the case, but we are now taking care to avoid AVX, AVX2 and BMI instructions unless they are enabled at runtime by the "fat" version of gmp. This appears to eliminate the crashes that were seen before in emulation mode. |
Attachment: install.2.log |
comment:66
Attachment: openblas-0.3.19.log This looks similar to https://trac.macports.org/ticket/61700; it sounds like we would have to configure openblas differently. We can probably get this from homebrew's build script. This won't make it into Sage 9.5. Thanks again for testing! |
comment:67
And
|
Attachment: config.3.log |
Attachment: install.3.log Attachment: ptestlong.log |
comment:68
Just in case, things I think can be taken into account (besides #33191 and #33195):
|
comment:69
The |
comment:70
Thanks for writing this summary - it will be helpful for those who find their way here from https://wiki.sagemath.org/ReleaseTours/sage-9.5#Sources |
comment:71
New report of build failures with 9.5.rc3 on M1 with macOS 12.1: https://groups.google.com/g/sage-release/c/1YV0dNtEZz4/m/2kQ-fKfaAQAJ From the singular log:
(resolved by removing stuff in |
comment:72
bump to 9.6 |
This comment has been minimized.
This comment has been minimized.
comment:76
Maybe we can close this. |
comment:77
how about #31905 ? |
comment:78
Replying to Dima Pasechnik:
I think we now agree that's not an issue. I don't know what to do with #30494, but maybe we don't need both this ticket and that one. So I propose closing this one and thinking about what to do with #30494 separately. |
Reviewer: Dima Pasechnik |
comment:80
close as done |
... on top of homebrew, which provides gfortran 11 and many usable packages.
Tickets:
numpy
to 1.21.3,networkx
to 2.6.3Discussions:
See also:
CC: @dimpase @isuruf @kcrisman @kiwifb @williamstein
Component: porting
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/30592
The text was updated successfully, but these errors were encountered: