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

[CI] install fftw with brew #116

Merged
merged 4 commits into from
May 3, 2024
Merged

Conversation

zacharyburnett
Copy link
Collaborator

No description provided.

@zacharyburnett zacharyburnett self-assigned this May 1, 2024
@zacharyburnett zacharyburnett requested a review from a team as a code owner May 1, 2024 16:54
Copy link

codecov bot commented May 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.73%. Comparing base (725b7cb) to head (caed43c).
Report is 13 commits behind head on main.

❗ Current head caed43c differs from pull request most recent head 8cacf33. Consider uploading reports for the commit 8cacf33 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
- Coverage   92.44%   90.73%   -1.72%     
==========================================
  Files          16       16              
  Lines        1509     1629     +120     
==========================================
+ Hits         1395     1478      +83     
- Misses        114      151      +37     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zacharyburnett
Copy link
Collaborator Author

although fftw is installed with brew:
https://github.com/spacetelescope/romanisim/actions/runs/8912295254/job/24475468572?pr=116#step:4:257

==> Installing fftw
==> Pouring fftw--3.3.10_1.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/fftw/3.3.10_1: 73 files, 8.3MB

pip can't find fftw:
https://github.com/spacetelescope/romanisim/actions/runs/8912295254/job/24475468572?pr=116#step:10:43

      Looking for  libfftw3.dylib
      Could not find fftw3 library.  Make sure it is installed either in a standard
      location such as /usr/local/lib, or the installation directory is either in
      your LIBRARY_PATH or FFTW_DIR environment variable.
      error:

@zacharyburnett
Copy link
Collaborator Author

it appears I'll have to set FFTW_DIR with setenv: |; I'll look for where brew installs fftw to on macOS

@zacharyburnett zacharyburnett force-pushed the ci/fftw branch 2 times, most recently from d48bd11 to 6ed6af2 Compare May 1, 2024 17:16
@zacharyburnett zacharyburnett force-pushed the ci/fftw branch 3 times, most recently from 2278044 to c20ebae Compare May 1, 2024 17:32
@zacharyburnett
Copy link
Collaborator Author

zacharyburnett commented May 1, 2024

for some reason, clang still fails to find fftw3 when building galsim:
https://github.com/spacetelescope/romanisim/actions/runs/8912757216/job/24476877098#step:10:587

      ld: library 'fftw3' not found
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      error: command '/usr/bin/clang++' failed with exit code 1

@schlafly
Copy link
Collaborator

schlafly commented May 2, 2024

I don't know anything about brew, but presumably it's putting libfftw3.dylib somewhere other than /usr/local/lib? The only relevant log message I see from the installation is
https://github.com/spacetelescope/romanisim/actions/runs/8912757216/job/24476877098#step:4:263
but that may be a red herring.

@schlafly
Copy link
Collaborator

schlafly commented May 2, 2024

It doesn't seem likely to be relevant, but the only other hint from the GalSim installation is:
https://github.com/GalSim-developers/GalSim/blob/releases/2.5/.travis.yml#L126

@zacharyburnett
Copy link
Collaborator Author

when I install with brew on my local machine, it appears to automatically link to /usr/local/lib/:

❯ ls /usr/local/lib/libfftw3*
/usr/local/lib/libfftw3.3.dylib			/usr/local/lib/libfftw3f_omp.3.dylib
/usr/local/lib/libfftw3.a			/usr/local/lib/libfftw3f_omp.a
/usr/local/lib/libfftw3.dylib			/usr/local/lib/libfftw3f_omp.dylib
/usr/local/lib/libfftw3_mpi.3.dylib		/usr/local/lib/libfftw3f_threads.3.dylib
/usr/local/lib/libfftw3_mpi.a			/usr/local/lib/libfftw3f_threads.a
/usr/local/lib/libfftw3_mpi.dylib		/usr/local/lib/libfftw3f_threads.dylib
/usr/local/lib/libfftw3_omp.3.dylib		/usr/local/lib/libfftw3l.3.dylib
/usr/local/lib/libfftw3_omp.a			/usr/local/lib/libfftw3l.a
/usr/local/lib/libfftw3_omp.dylib		/usr/local/lib/libfftw3l.dylib
/usr/local/lib/libfftw3_threads.3.dylib		/usr/local/lib/libfftw3l_mpi.3.dylib
/usr/local/lib/libfftw3_threads.a		/usr/local/lib/libfftw3l_mpi.a
/usr/local/lib/libfftw3_threads.dylib		/usr/local/lib/libfftw3l_mpi.dylib
/usr/local/lib/libfftw3f.3.dylib		/usr/local/lib/libfftw3l_omp.3.dylib
/usr/local/lib/libfftw3f.a			/usr/local/lib/libfftw3l_omp.a
/usr/local/lib/libfftw3f.dylib			/usr/local/lib/libfftw3l_omp.dylib
/usr/local/lib/libfftw3f_mpi.3.dylib		/usr/local/lib/libfftw3l_threads.3.dylib
/usr/local/lib/libfftw3f_mpi.a			/usr/local/lib/libfftw3l_threads.a
/usr/local/lib/libfftw3f_mpi.dylib		/usr/local/lib/libfftw3l_threads.dylib

I'll test with a workflow

@zacharyburnett zacharyburnett force-pushed the ci/fftw branch 3 times, most recently from 3521ed7 to caed43c Compare May 2, 2024 19:22
@zacharyburnett
Copy link
Collaborator Author

zacharyburnett commented May 2, 2024

@schlafly you were right! From testing with a test job, it links to /opt/homebrew/opt/fftw/lib/

for future reference I ran the following to get that dir:

brew install fftw
brew --prefix fftw

@zacharyburnett
Copy link
Collaborator Author

that worked!

@schlafly
Copy link
Collaborator

schlafly commented May 3, 2024

Bingo, thanks, merging!

@schlafly schlafly merged commit 583f995 into spacetelescope:main May 3, 2024
20 checks passed
@zacharyburnett zacharyburnett deleted the ci/fftw branch May 3, 2024 13:08
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.

2 participants