-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Tests fail to compile with GCC under OpenMP variant (with Makefiles) #2416
Comments
Sorry, I did not see this in my tests with gcc versions between 4.8.5 and 9.1 on x86_64 and arm(and the documentation suggests to me that -fopenmp implies -lomp automatically). What is your environment ? |
|
This happens in the context of the official Debian package. You can see the log there: https://buildd.debian.org/status/fetch.php?pkg=openblas&arch=amd64&ver=0.3.8%2Bds-1&stamp=1581635393&raw=0 Note that we compile OpenBLAS six times in this log (pthread, openmp and serial × 32-bit indexing vs 64-bit indexing), hence it is difficult to understand. The relevant portion of the log (for the tests under OpenMP + 32-bit indexing) is:
As you can see, The same log for 0.3.7 is available there: https://buildd.debian.org/status/fetch.php?pkg=openblas&arch=amd64&ver=0.3.7%2Bds-7&stamp=1576693068&raw=0 |
Makefile.system should add |
The actual issue (not sure if I should call it a problem from the OpenBLAS perspective except that it is apparently not properly documented) is that Makefile.system does not use |
I'm not sure if this is related, but my PR to upgrade OpenBLAS in Homebrew (now the default Homebrew BLAS & LAPACK implementation rather than apple's outdated Accelerate framework) also failed when compiling with OpenMP support and GCC 9.2. However, I noticed in the macOS install instructions that the problems with clang were with older clangs. I switched to build with Apple clang instead of GCC 9 and the issue went away. Here's the Homebrew PR: Homebrew/homebrew-core#50252 Here's the build log with failures: https://jenkins.brew.sh/job/Homebrew%20Core%20Pull%20Requests/56916/version=mojave/testReport/junit/brew-test-bot/mojave/install___build_bottle_openblas/ The failure is:
|
Bug: OpenMathLib/OpenBLAS#2416 Last-Update: 2020-02-13 Last-Update: 2020-02-13 Gbp-Pq: Name link-tests-openmp.patch
Eariier I wrote
but actually this turns out to be a bad idea for very similar reasons - FFLAGS is used in lapack-netlib so pre-setting it in the environment can have the effect of overriding important options like -frecursive or -fdefault-integer-8 (INTERFACE64). Unfortunately there does not appear to be a way (in GNU Makefile syntax) to "force-push" only selected important options into an already defined variable - once |
Thanks for your feedback. As you suggested, I added back I’m thus closing this. |
I must admit I am still unsure how best to handle this - but perhaps it just needs to be documented properly. |
With version 0.3.8, tests fail to compile under GCC with
USE_OPENMP=1
(when using Makefiles). The tests binaries are not properly linked againstlibgomp
.I think this is a consequence of d55b108 and cfe63d8.
A possible solution is to explicitly add
-lgomp
toCEXTRALIB
intest/Makefile
andctest/Makefile
when using GCC.The text was updated successfully, but these errors were encountered: