-
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
Test failure with -fbounds-check #2657
Comments
One OpenBLAS test fails when you enable bounds checks in your fortran compiler via e.g. either "-fbounds-check" or "-fcheck=bounds" with gfortran. This was reported upstream at OpenMathLib/OpenBLAS#2657 but in the meantime the easiest thing to do for *our* users is to filter out those flags when USE=test is set. Thanks to Bernd for reporting the problem on bug 726474. Closes: https://bugs.gentoo.org/726474 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Michael Orlitzky <[email protected]>
Not sure I understand this (unless it is a side effect of tne general Fortran/C interfacing problem from #2154), in particular why would it flag |
FFLAGS were overridden as intended by adding required flags in Makefile.system, but the make.inc produced for the lapack-netlib (Reference-LAPACK) subtree got these without the buildtime override. So LAPACK got built with your "-fbounds-check" alone (dropping both the mandatory -frecursive and the -fno-optimize-sibling-calls). |
Did I mess up my testing somehow? If I understand you correctly, you're saying there are two different problems:
While testing -- to ensure that it was really the bounds-checking flag that was causing the problem -- I ran the same exact command with and without the bounds-checking flags. This command (inspired by the user's report) failed before gentoo/gentoo@57e2be1:
After that commit, which only filters out the |
Yes. For (1) the problem lies with the way the Reference-LAPACK source is docked into the OpenBLAS build system - we still utilize their approach of creating a definitions file (make.inc) with compiler settings and its FFLAGS get overriden by yours. The effects of missing |
Thanks for clarifying. What's bothering me is, why does gentoo/gentoo@57e2be1 appear to fix the problem? All I've done is remove the |
It fixes the problem as the only visible problem leading to your build failure was in the bounds check. You would notice the missing -frecursive only in some specific LAPACK functions when called in user code, and the missing -fno-optimize-sibling-calls could "only" lead to rare and hard to reproduce crashes (stack corruptions) in user code when compiling with gfortran version 8.x or 9.x The fix for the unwanted override would be to change the "FFLAGS=" to "override FFLAGS=" in the "lapack_prebuild" section of the toplevel Makefile in OpenBLAS, or to add the two gfortran options to your own FFLAGS. |
Thanks again. I took your advice and added "override" to that line. I also forced a rebuild of OpenBLAS for all of our users, in case any had compiled it with |
Added an entry to the FAQ in the wiki |
The
-fbounds-check
or-fcheck=bounds
flags to gfortranWhen I build OpenBLAS with
FFLAGS="-fbounds-check" FCFLAGS="-fbounds-check"
, I get a reproducible test failure (on amd64):I'm not sure if it's a problem with the test suite or the file itself. A user reported this to us at https://bugs.gentoo.org/726474
The text was updated successfully, but these errors were encountered: