-
-
Notifications
You must be signed in to change notification settings - Fork 13.2k
fftw openblas: use libomp on macOS
#236492
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
Conversation
|
If we used libomp instead of gcc, I could see the point (lower disk usage). But we can't remove GCC anyway, because of the Fortran side, so… |
Part of issue is mixed OpenMP usage across dependency trees, e.g.
Depending on how code interacts, this could lead to unexpected behavior. Changing compiler to GCC would lead to C++ issues (libstdc++ vs libc++) so only option seems to be aligning OpenMP. In this case, libomp is easier to force everything to use than libgomp. |
|
But I don't think everything can use libomp, in particular, the Fortran parts. |
May need to experiment with Fortran on this. There has been tests done for C/C++ parts like https://cpufun.substack.com/i/138445340/is-there-any-way-around-this If Fortran interacts with OpenMP in a similar fashion, then it should be possible to inject libomp and have a functioning OpenMP runtime. There is still an inconvenience where |
Some evidence of Fortran working with libomp:
gfortran -fopenmp -c test.f90 -o test.o
gfortran -L/opt/homebrew/opt/libomp/lib -lomp test.o -o test
PROGRAM Test
USE OMP_LIB
!$OMP PARALLEL
CALL SLEEP(10)
PRINT *, "Hello from process: ", OMP_GET_THREAD_NUM()
!$OMP END PARALLEL
END |
|
Closing for now. Can re-open if needed based on other PR and upstream decision. |
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where<formula>is the name of the formula you're submitting?brew test <formula>, where<formula>is the name of the formula you're submitting?brew audit --strict <formula>(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it passbrew audit --new <formula>?Experimenting with Make alternative to
cmakeand depend onlibomp#219339As CMake support may be reverted.