-
-
Notifications
You must be signed in to change notification settings - Fork 13k
openblas: use cmake
and depend on libomp
#219339
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
base: main
Are you sure you want to change the base?
Conversation
a509697
to
ff2aa4d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
ff2aa4d
to
017f197
Compare
af08516
to
8cb793b
Compare
6450d0c
to
7d01829
Compare
The failures on macOS 15-arm64 can be reproduced on my Sequoia macbook with the current
|
7d01829
to
3fb931b
Compare
d5ace47
to
23b371f
Compare
d8e8d7a
to
5d8ee9a
Compare
Should switching to |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Keep the PR open for now. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
b217704
to
fd454ee
Compare
Added some workarounds for dependents. Not ideal though, e.g.
Would likely need further testing to make sure the OpenMP support is actually functional. |
fd454ee
to
97d619e
Compare
97d619e
to
11ce622
Compare
11ce622
to
e86a5fc
Compare
Will need to rebase for |
e86a5fc
to
18ffbc1
Compare
Just a word of caution: the |
A Makefile workaround could be: # Workaround to use OpenMP with Apple Clang
if ENV.compiler == :clang
inreplace "Makefile.system", "+= -fopenmp", "+= -Xpreprocessor -fopenmp"
inreplace "Makefile.install" do |s|
s.gsub! ":= -fopenmp", ":= -Xpreprocessor -fopenmp"
s.gsub! "+= -lgomp", "+= -L#{Formula["libomp"].opt_lib} -lomp"
end
end Can't comment if this functionally behaves as expected. But at least no mixed linkage ❯ brew linkage openblas
System libraries:
/usr/lib/libSystem.B.dylib
Homebrew libraries:
/opt/homebrew/opt/gcc/lib/gcc/current/libgfortran.5.dylib (gcc)
/opt/homebrew/opt/gcc/lib/gcc/current/libquadmath.0.dylib (gcc)
/opt/homebrew/opt/libomp/lib/libomp.dylib (libomp) ❯ PKG_CONFIG_PATH=/opt/homebrew/opt/openblas/lib/pkgconfig pkgconf --cflags openblas
-I/opt/homebrew/Cellar/openblas/0.3.30/include -Xpreprocessor -fopenmp
❯ PKG_CONFIG_PATH=/opt/homebrew/opt/openblas/lib/pkgconfig pkgconf --libs openblas
-L/opt/homebrew/Cellar/openblas/0.3.30/lib -lopenblas
❯ PKG_CONFIG_PATH=/opt/homebrew/opt/openblas/lib/pkgconfig pkgconf --libs --static openblas
-L/opt/homebrew/Cellar/openblas/0.3.30/lib -lopenblas -lpthread -lgfortran -lpthread -lgfortran -L/opt/homebrew/opt/libomp/lib -lomp |
Experimenting with Makefile alternative in |
I am trying to keep the upstream BTW, does the |
Also noting that I will be updating openblas test in separate PR to run |
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>
?Related to #209091, #129648, #129100. Upstream has added support for buiding with
libomp
through OpenMathLib/OpenBLAS#5180, where one can also find multiple issues linked from downstream repositories that are caused by Homebrew's handling ofOpenMP
forOpenBLAS
.This change requires dependents of
OpenBLAS
also switched tolibomp
. Forgromacs
,cp2k
andfftw
, the switch seems relatively straightforward. However, I am not sure how to go aboutdynare
. Currently,dynare
is directly linked tolibgomp
and it also pulls inlibomp
throughsuite-sparse
.