-
Notifications
You must be signed in to change notification settings - Fork 447
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
Support Apple's transitioning of Macs to new ARM CPU & GPU #3827
Comments
As much as i would like to help with this, I am not a Mac developer. I don't really know how Xcode works very well. I could potentially help with checking arm compatibility with my raspberry pi, but I don't know how to help much past that |
The move to ARM has now been officially announced. It's possible to compile ARM apps on an Intel Mac (needs macOS Catalina and Xcode 12 beta), so some initial porting work can be done already, but it's not possible to execute and test the result yet. Unless you trade your soul for a Developer Transition Kit. We need a BOINC platform name for Mac on ARM. I was concerned about the obvious choice |
I added that to the platform name list. |
I don't yet know what designation Apple plans to use for their new Mac architecture. Apple has used the names powerpc, i686 and x86_64 for its previous 3 Mac architectures, and we have kept BOINC's platform names consistent with Apple's designations: powerpc-apple-darwin, i686-apple-darwin and x86_64-apple-darwin. I recommend we continue to keep BOINC's platform names for Macs consistent with Apple's nomenclature. Apple's press release and other materials I have seen calls their new architecture "Apple silicon." @nicolas17 do you know for certain that Apple plans to call their new architecture aarch64? A quick check of Xcode 10 for iOS offers these architecture names: arm64, arm64e, armv7, armv7s. We have named the downloadable files for BOINC's Mac installers boinc_x.y.z_macOSX_universal.zip, boinc_x.y.z_macOSX_i686.zip and boinc_x.y.z_macOSX_x86_64.zip for the different architectures. We named the downloadable bare client (without Manager, installer, uninstaller or screensaver) boinc_x.y.z_universal-apple-darwin.zip, boinc_x.y.z_i686-apple-darwin.zip, boinc_x.y.z_x86_64-apple-darwin.zip. Apple facilitated its transition from the PowerPC to the Intel 32-bit architecture by doing two things:
Apple's press release (referenced above) indicates they will be using the same strategy for this transition form Intel to "Apple silicon" Macs:
Though the first Macs using "Apple silicon" will be released at the end of 2020, Apple expects to continue releasing new Macs with Intel chips into 2022. As @nicolas17 wrote, Apple is offering developers a Developer Transition Kit for $500, which includes a temporary loan of a prototype Apple silicon based Mac and the use of beta software. But I think it is a bit early to start developing for the new architecture. In my experience, Apple's beta software can be pretty unreliable (you must use both a beta OS and beta development tools), and the new ARM based Macs should continue to run Intel software under emulation. Note that not only BOINC's code, but also the dependent libraries will need to be compiled for both architectures. I have provided shell scripts for building all the libraries, and we were building universal binaries as late as BOINC 6.12.43 (11 July 2011), which involved building universal binary versions of the dependent libraries. Although those universal binaries were for PowerPC and i686 architectures, those scripts can serve as a guide / reminder for how to update the current scripts for multiple architectures. |
What I understand from all the news articles and is also said in the article Charlie points to, is that this ARM CPU is being designed by Apple themselves, so it may not be possible to compare this one to existing ARM CPUs out there.
|
Ugh, you have a good point. I was worrying about what to use as OS name and didn't really think of the CPU architecture in the first component. I used aarch64 for consistency with the other BOINC platform strings: Linux and Android call it "aarch64", and the existing "powerpc", "i686" and "x86_64" match between Linux and Mac. But Apple calls it "arm64" (compiler -arch flag, uname, etc) just like on iOS. I don't know if it's more important to have consistency with Apple or consistency with other platform strings, that choice is best left to you :) Note that Apple officially uses "x86_64-apple-macos10.12" as the target triple when running the compiler (yes, they even include the OS "minimum deployment version"), while autoconf has always used "darwin" as the third component, so we were already not using their exact platform string. |
Today I received an email from Apple pointing to this web page which says:
and
That implies that BOINC's existing Xcode project should automatically build code that can run on both Intel and Apple silicon Macs without any changes, as long as we build using Xcode 12. Since the BuildMacBOINC.sh script invokes xcodebuild, that should probably do the same. Note, however, that the dependent libraries are built using configure / make, so their build scripts will probably need to be updated. |
If the Macs have big.LITTLE configuration, the current benchmark will not reflect its potential. So some work are needed there. |
Please change the platform name to arm64-apple-darwin instead of aarch64-apple-darwin to be consistent with BOINC's other Macintosh platform names i686-apple-darwin and x86_64-apple-darwin and ppc-apple-darwin, as this is the platform name I added in my PR#3956. |
Done. |
I have a Developer Transition Kit (Apple Silicon Mac). Can I be added to receive BOINC test builds for macOS @davidpanderson? |
I believe that the Mac version of 7.16.11 will run natively on ARM; Charlie Fenton could say for sure. However, I don't think any projects have Mac/ARM app versions yet. |
@AustinConlon: That's great! Thank you. I'm a bit surprised they are still shipping them, since industry analysts have been predicting that the first production Apple Silicon Macs will be out soon. The Mac public release of BOINC version 7.6.11 is Intel only. It won't run natively on an Apple Silicon Mac, but it should run under Rosetta 2. (I don't know if Rosetta 2 uses emulation or a virtual machine.) It is of special interest to know whether Intel-based BOINC OpenCL GPU project applications run correctly, and also whether Intel-based BOINC graphics apps (which use GLUT / OpenGL) run correctly under Rosetta 2. It would be great if you can test the default BOINC screensaver boincscr as well as project graphics (both running as a screensaver and via the "Show graphics" feature from the BOINC Manager Tasks tab.) You can also run boincscr as a stand-alone graphics app from Terminal as follows:
I will privately send you a Universal 2 binary of BOINC 7.6.11 (x86_64 / arm64) which I've built, with more information about things I'd like you to test. |
@CharlieFenton I'm a bit surprised too. Apple did say they'd start shipping Apple Silicon Macs by the end of the year, but it's also been not uncommon for them in the past to have Mac product releases in October.
Noted. |
Rosetta 2 uses translation. |
@AustinConlon I gather from #4040 that you've already received your Developer Transition Kit (and I now see you've edited that comment.) Let me know when you've finished testing BOINC 7.16.11 under Rosetta 2 and I'll build you an ARM64 / x86_64 Universal 2 binary to try, (You should also be able to build it yourself by following the build instructions at mac_build/HowToBuildBOINC_XCode.rtf in the BOINC GitHub client_release/7/7.16 branch.) My biggest unknown is my build of the OpenSSL libraries libcrypto.a and libssl.a. These are used by the BOINC client when downloading and uploading files from and to projects. The OpenSSL configure script has limited options, so I configured for ios64-cross and then patched the make file to build for arm64-apple-macos10.7. If the code built that way doesn't work, we can try (as a temporary workaround) linking with the dynamic OpenSSL libraries that are normally included as |
Tasks are not automatically reported until 1 hour after completion.
Judging by the newly started tasks, that interval hasn't passed yet
(unless you had other reasons to expect that tasks would be reported
immediately?)
Is there any sign of the client attempting, but failing, to report the
tasks - in the Event Log, for instance?
…------ Original Message ------
From: "Austin Conlon" <notifications@github.com>
To: "BOINC/boinc" <boinc@noreply.github.com>
Cc: "Subscribed" <subscribed@noreply.github.com>
Sent: Wednesday, 30 Sep, 20 At 20:59
Subject: Re: [BOINC/boinc] Support Apple's transitioning of Macs to new
ARM CPU & GPU (#3827)
Tasks appear to be stuck with the "ready to report" status. I can file
this as a separate issue if you want.
Screen Shot 2020-09-30 at 12 57 29 PM
<https://user-images.githubusercontent.com/1305957/94733416-9513c300-031c-11eb-9ed6-09614b4e31c1.png>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3827 (comment)> , or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADRSMJAVQ2O4U4YIIXWQS53SIOEY3ANCNFSM4N3FL6TA>
.
|
I deleted the comment since the interval passed and the tasks went away. Thanks for clearing up the misunderstanding. |
I've noticed that the screensaver can show that message for quite some time, especially when the overall Mac system is acting sluggish (for example, when Spotlight is doing a lot of indexing of disk contents after upgrading the OS.) Please try this: set the manager's Activity menu to "Suspend" and run the screensaver (perhaps by putting the mouse in the appropriate Hot Corner.) Then allow a few minutes to see if the default ("overview") screensaver appears. |
Ah okay, I tried shortly after getting the DTK and updating the OS when I commented. I see the screensaver now with the four credits progress bars. |
That's terrific news! So it appears that BOINC 7.16.11 built for Intel x86_64 is working fully on Apple Silicon. I have one other question: have you tried running any GPU-based project applications? Or does the DTK not have any GPU known to BOINC? |
I have cross-compiled BOINC 7.6.11 for Apple Silicon (arm64) and sent it to @AustinConlon privately by email for testing on his DTK. |
Macs with Apple's new SoC ship next week, and macOS Big Sur is being released this Thursday. |
Bloomberg and others report that Apple is developing its own ARM processors for use in Macs starting in 2021, gradually replacing the current Intel processors in various Mac models.
https://www.bloomberg.com/news/articles/2020-04-23/apple-aims-to-sell-macs-with-its-own-chips-starting-in-2021
When Apple transitioned Macs from PowerPC to Intel CPUs in 2006, they temporarily provided an emulator (which Apple called "Rosetta") to allow the new computers to run the older software. They also added a capability in the development tools to create "fat binaries", which contained two copies of software, one for PowerPC architecture and one for Intel architecture. It seems likely that Apple will use a similar approach again.
Rosetta was introduced in Mac OS 10.4.4 (January 2006) and discontinued as of OS 10.7 (July 2011.) The ability to generate both PowerPC and Intel code and generate a fat binary was introduced in Xcode 2.1 (June 2005); PowerPC code generation was discontinued as of Xcode 4 (March 2011.)
Assuming Apple follows the same pattern, current Intel-based BOINC code will probably run on the new ARM based Macs for a few years, though at a reduced efficiency due to emulation. However, it is not clear whether BOINC Mac GPU code will be able to run on the Apple GPU.
To take full advantage of the new Mac hardware, we will need to update all Xcode projects, build scripts and autoconf / make files to build both Apple ARM and Intel architectures and release fat binaries. Note that this applies to building all the dependent libraries (cURL, OpenSSL, wxWidgets, etc.), as well as BOINC projects.
I hope that some of the Mac developers who have more recently expressed interest in helping BOINC will be able to take this on. I especially want to bring this to the attention of @ShanghaiTimes and @RoboticMind.
The text was updated successfully, but these errors were encountered: