-
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
FPE in zrotg with g++-13 -O3 #4909
Comments
What architecture/cpu do you see this with ? |
My system is a dual Xeon e5-2630v4. |
So a fairly common Haswell-generation x86_64... I cannot reproduce this with the current 0.3.28 and gcc 13.2 or 14.2 here |
I can try with 0.3.28 but I won't have time to get to it until this evening. Did you try with 0.3.26? |
This (a typo leading to uninitialized data being used as denominator) was fixed in the context of #4499 (released as 0.3.27) |
Thanks - I confirmed that it works on my system with 0.3.27. I will mention it on the Ubuntu bug report. |
I have a simple test program that worked on Ubuntu 22.04 and now fails after upgrading to 24.04. I filed an Ubuntu bug report and then realized that I can reproduce the issue without using Ubuntu's OpenBLAS package but rather building from source. For reference, here's the bug report:
https://bugs.launchpad.net/ubuntu/+source/openblas/+bug/2083157
This is the test program (g++ -o test_blas test_blas.cpp -lopenblas):
#include
#include
#include <fenv.h>
typedef std::complex dcomp;
extern "C" {
void zrotg_(dcomp*, dcomp*, double*, dcomp*);
}
int main(void) {
feenableexcept(FE_INVALID |
FE_DIVBYZERO |
FE_OVERFLOW |
FE_UNDERFLOW);
}
Expected output (get this with -O0):
(0.28107,0.101469) (0.0182792,0) 0.997905 (0.0643715,0.0065317)
Output with -O1, -O2, -O3:
Floating point exception (core dumped)
Output with -O3 but FPE turned off:
(0.28107,inf) (0.0182792,0) 0.997905 (0.0643715,0.0065317)
Additional notes:
Here are some results for different OpenBLAS versions:
It seems this may be related to the implementation of "safe scaling" that went in for 0.3.24, possibly from #4130.
The text was updated successfully, but these errors were encountered: