-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
openblas 0.3.8 #50252
openblas 0.3.8 #50252
Conversation
Hopefully we don't need revision bumps on formulae that use
|
This is failing with |
f3c59c6
to
fa50f2e
Compare
Switching back to clang resolves this build failure. (At least locally...) It looks like other people are having issues with OpenMP and the latest OpenBLAS: OpenMathLib/OpenBLAS#2416 I reported the issue in OpenMathLib/OpenBLAS#2421 |
fa50f2e
to
f68131a
Compare
sigh, I'll work on rev-bumping everything. Some things may need a dependency on @Homebrew/core What do you think about this effort to migrate OpenBLAS to use native clang over GCC? The issue causing the build failure with the latest OpenBLAS 0.3.8 was resolved upstream, so we don't need to migrate to clang. But local testing indicates that things work fine with clang and this would be more consistent with Homebrew's philosophy of preferring native tooling. |
Fix build error using GCC-9 by switching back to native Apple clang Issue reported upstream at: OpenMathLib/OpenBLAS#2421
For the CI & binary build? Maybe... I think a bunch of the output gets eaten by Jenkins. I'm not sure which parts need permission to view but I can view the CI logs at https://jenkins.brew.sh/job/Homebrew%20Core%20Pull%20Requests/57076/ I can certainly share my local build logs but since I'm on Haswell that will not be informative. |
That's fine. I checked the URL you gave me, but couldn't find the logs |
@fxcoudert I noticed your comment on a closed won't fix PR: #45300 (comment) Are you OK moving to building OpenBLAS with native Apple Clang? It works around a bug in the latest release and is more inline with the philosophy of using native tooling. However, moving to Apple Clang required introducing a Fingers crossed GFortran + Clang + libomp doesn't break OpenBLAS threading. I think it would be good to try to move to clang, but if we encounter breakage we can patch the 0.3.8 release with commits applied upstream and switch back to GCC for the C code. |
This seems fine 👍 |
Cool, thanks 👍 |
fa86cab
to
8fe337c
Compare
The build dies when removing the NO_AVX512 environment variable anyway, so I rewound and force pushed to my fork. @isuruf FYI, the errors look like this:
|
@zbeekman, can you open an issue upstream? |
Which clang is this? I see that |
Idk why qrupdate is failing against OpenBLAS now. There are some warnings about type mismatches but I’ll have to dig in to the details. |
Current failures are:
|
The current stand on OpenMP is: use Apple’s clang + libomp (which is a hack) only for standalone formulas that strongly benefit from OpenMP and do not expose this to dependents (good example being imagemagick). This allows for OpenMP support without the full cost of a GCC dependency (which is heavy). This was the condition under which libomp was accepted into homebrew-core, and I think we should really have a full discussion if we want to change that state of things. Here, GCC is needed anyway (for gfortran), so we're actually adding a dependency (libomp) for no gain. And we're creating potential for trouble by mixing compilers and libraries, because depending on GCC + libomp is creating mixed linkage to libomp and libgomp in some formulas: things like arpack and its dependents. It could also create a problem for people who would wish to use openblas with GCC’s libgomp. I don't think it's worth it. |
Thank you so much for looking at this FX! This comment has given me a better understanding of both the original rationale for building with GCC and potential issues that may arise. Given my experience so far, and my improved understanding from your comment I would agree with you that migrating to clang and libomp is not worth it, and would be more fragile than keeping this as building with GCC. In this case, I think we either need to backport patches to allow OpenBLAS 0.3.8 to build with GCC-9, or wait until the next OpenBLAS release. @isuruf do you know if a release is planned soon? I would like to get OpenBLAS 0.3.8 deployed sooner rather than later, so I'm leaning towards backporting the patches already applied to the OpenBLAS development branch. |
If the patches are coming from upstream, and are easy to apply with a
That'd be my inclination. |
I have no idea.
Slightly off-topic: I maintain the compiler packages for a different package manager and we recently switched to libomp even with GCC. (I added a few GOMP compatibility functions to libomp, which makes it work fine now. Only missing symbols are target offloading stuff) Let me know if you need more info. |
What was the motivation for the switch? So gcc, g++, gfortran link with libomp by default instead of libgomp? Intriguing idea, but makes me nervous about reliability and unintended side-effects. I'd love to hear more. |
There were 2 different OpenMP runtimes being linked in. (gfortran linked in libgomp and clang linked in libomp).
Yes, replaced libgomp.so by the symlink created by libomp. |
@sjackman: FYI, |
Wait, it’s as simple as that?!? You just build gcc and friends and then delete libgomp and make a symlink of the same name to libomp? There aren’t any GNU extensions in libgomp? And they’re ABI compatible? What distro or package manager? |
Yes, but they have different compatibility_version on OSX, so you can't just replace. You have to either rebuild all your packages using libgomp, or change the compatibility_version of libomp.
libomp has 2 sets of symbols. GNU symbols (GOMP_) and Intel symbols (_kmpc). clang will generate code that calls Intel symbols. If you use GCC, it will generate code that calls GNU symbols. On libomp, the GNU symbols implementation call the Intel symbols, so they are compatible.
conda package manager on OSX>=10.9 |
@isuruf thank you so much for that information. I’ll try to take a look at how conda builds gcc and OpenBLAS. It might be worthwhile to consider migrating all Homebrew OpenMP packages (and gcc) to libomp. I doubt many people or formulae are actually using offloading thanks to Apples feud with NVIDIA. I haven’t been following OMP offload as closely as I should, I wonder what the support for ATI is like in each of them. |
NWChem has shipped, resolving the MPI failures. I pinged @isuruf and @martin-frbg to see if there are plans for another release of OpenBLAS anytime soon, or if I should backport upstream patches. Either way, I'll start with dropping all the revision bumps and rebasing on a more recent master. |
Superseded by #51116. |
haha, thanks I was about to do this... |
Created with
brew bump-formula-pr
.