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

Fixes for running on Apple Silicon #196

Merged
merged 2 commits into from Jul 28, 2022

Conversation

sjforeman
Copy link
Contributor

Here are two changes that allow for installation on Apple Silicon computers:

  1. setup.py looks in /usr/local/bin/ for gcc if it detects macOS. This is where homebrew installs things on Intel Macs, but on Silicon, homebrew instead puts things in /opt/homebrew/bin/ (see https://docs.brew.sh/FAQ#why-should-i-install-homebrew-in-the-default-location). I've changed setup.py to look there if gcc is not found in /usr/local/bin/.
  2. cython/sharp_utils.c includes immintrin.h, which includes x86 instructions that are not implemented on Silicon. The functions in sharp_utils.c that would use these are already turned off with preprocessor directives, so I've done the same for the #include <immintrin.h> line.

Simon Foreman added 2 commits July 26, 2022 22:24
Including this file causes problems on Apple Silicon, since it implements x86 instructions
that are not available on Silicon.
@codecov
Copy link

codecov bot commented Jul 27, 2022

Codecov Report

Merging #196 (7cd8071) into master (b663183) will increase coverage by 0.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #196      +/-   ##
==========================================
+ Coverage   44.43%   44.48%   +0.05%     
==========================================
  Files          33       33              
  Lines        9745     9745              
==========================================
+ Hits         4330     4335       +5     
+ Misses       5415     5410       -5     
Impacted Files Coverage Δ
pixell/_version.py 44.80% <0.00%> (+1.79%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b663183...7cd8071. Read the comment docs.

@msyriac
Copy link
Member

msyriac commented Jul 27, 2022

Thanks! Looks good to me but @mhasself might want to weigh in.

@mhasself
Copy link
Member

Thanks! Looks good to me but @mhasself might want to weigh in.

Fine with me ... I'm not a heavy libsharp user though.

@msyriac msyriac merged commit f4028d2 into simonsobs:master Jul 28, 2022
@sjforeman sjforeman deleted the homebrew_silicon branch July 28, 2022 17:05
msyriac added a commit that referenced this pull request Mar 22, 2024
* 'master' of github.com:simonsobs/pixell: (34 commits)
  Added support for constructing enplot annotations without using a text file
  Fixes for running on Apple Silicon (#196)
  More robust lmul
  Added enmap.contains
  tweak argument in quad_weights
  utils.remove_nan and utils.without_nan
  Added matched_filter_constcorr_dual. Will test if this is better than lowcorr
  utils.bincount
  Support skew-like transformations in constcorr
  Added roll_rows
  Bump version: 0.15.3 → 0.16.0
  update HISTORY
  Modernize HDF (#192)
  optional args to 'method' version of enmap.upgrade (#190)
  Added pointsrcs.radial_bin. Fixed typo in sim_objects
  bump mac wheel libomp to 14.0.4.  OSX target is unchanged.
  replace clobber by overwrite everywhere
  Added transpose option to sim_objects. Could be useful for some likelihood calculations
  Change clobber argument to overwrite
  Dynamic interpolation bound in tsz_tform
  ...
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.

None yet

3 participants