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

Make Python binary wheels compatible with macOS 12 #543

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .github/workflows/python_build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,22 @@ jobs:
with:
package-dir: 'python/finufft'
env:
CIBW_BEFORE_ALL_MACOS: brew install gcc@14 fftw
CIBW_BEFORE_ALL_MACOS: |
# In order to reinstall a version of GCC compatible with older versions of macOS, we need to first uninstall the existing version.
brew uninstall gcc
pkg=$(brew fetch --force --bottle-tag=monterey gcc | grep 'Downloaded to' | cut -d' ' -f3)
brew install $pkg

pkg=$(brew fetch --force --bottle-tag=monterey fftw | grep 'Downloaded to' | cut -d' ' -f3)
brew install $pkg
CIBW_ARCHS_MACOS: "x86_64"
# Need following versions of GCC for compatibility with fftw
# installed by homebrew. Similarly, we set the macOS version
# for compatibility with those libraries.
CIBW_ENVIRONMENT_MACOS: >
CC=gcc-14
CXX=g++-14
MACOSX_DEPLOYMENT_TARGET=13
MACOSX_DEPLOYMENT_TARGET=12

- uses: actions/upload-artifact@v4
with:
Expand All @@ -46,18 +53,18 @@ jobs:
package-dir: 'python/finufft'
env:
CIBW_ARCHS_MACOS: "arm64"
# Make sure to install the ARM64-specific versions of FFTW and GCC.
# Perhaps this is done automatically on the macos-14 image. We should
# look into this further.
CIBW_BEFORE_ALL_MACOS: |
pkg=$(brew fetch --force --bottle-tag=arm64_ventura fftw | grep 'Downloaded to' | cut -d' ' -f3)
# In order to reinstall a version of GCC compatible with older versions of macOS, we need to first uninstall the existing version.
brew uninstall gcc
pkg=$(brew fetch --force --bottle-tag=arm64_monterey gcc | grep 'Downloaded to' | cut -d' ' -f3)
brew install $pkg
pkg=$(brew fetch --force --bottle-tag=arm64_ventura gcc | grep 'Downloaded to' | cut -d' ' -f3)

pkg=$(brew fetch --force --bottle-tag=arm64_monterey fftw | grep 'Downloaded to' | cut -d' ' -f3)
brew install $pkg
CIBW_ENVIRONMENT_MACOS: >
CC=gcc-14
CXX=g++-14
MACOSX_DEPLOYMENT_TARGET=14
MACOSX_DEPLOYMENT_TARGET=12

- uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion python/cufinufft/examples/example2d2_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@
print(f"[{i}] Absolute error on point [{jt}] is {err:.3g}")
print(f"[{i}] Relative error on point [{jt}] is {rel_err:.3g}")

assert(rel_err < 10 * eps)
assert(rel_err < 15 * eps)
Loading