-
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
OpenBLAS crash on PENRYN with complex matrix operations #140
Comments
Hi @franko , Is it 32-bit or 64-bit? Zhang Xianyi |
Sorry, I forgot to precise, it is on a 32-bit system. |
Hi @franko , Could you try the static library of gsl and OpenBLAS? Or, you don't set "DYNAMIC_ARCH=1". Xianyi |
Hi @xianyi , I've tried as you was suggested to build the test case above using only the static libraries. So I've linked to libgsl.a and openblas.lib (renamed in .dll.a). The openblas library was build with DYNAMIC_ARCH=1 and FC=gfortran. The resulting executable is statically linked to both GSL and OpenBLAS and is quite big (~ 14 Mb) but it does still crash as before. For me building without DYNAMIC_ARCH is not interesting because I'm trying to produce a binary package that is able to select the optimal CPU architecture at runtime for any 32bit Windows system. Please let me know if you need more details and thank you very much for your help. Francesco |
Hi @franko , Because I don't have PENRYN and Windows XP test box, I tested your codes on my Intel Sandy Bridge Win7 32-bit PC. Could you build OpenBLAS with DEBUG=1? To @zchothia , any comments? Thank you Zhang Xianyi |
Hi @xianyi , I have built the library without DYNAMIC_ARCH and without multithread support to narrow down the test case. So I've used:
Then I've used the GSL library as a static library with DEBUG enabled. The example above still crash but now I'm able to give you more information on where the crash happens. Here the backtrace before the crash;
The line just before the bug happens is therefore:
When I step into this function (it is actually ztrsv_TUU) is may be where the problem happens. The function ztrsv_TUU is executed normally but when you hit the final instruction;
in ztrsv_L.c:169 the program get lost (corrupted stack ?) and I get a SEGFAULT. My guess is that in ztrsv_TUU there is a buffer overflow and the stack get corrupted so that "return" fails to return to the caller stack. Hi hope this will help you to identify the bug. On windows this bug is absolutely repeatable and I get it with any build options for OpenBLAS. Francesco |
Hi @franko , I used MingW gcc 4.6. Xianyi |
Hi @franko , I have reproduce this bug with gcc 4.7 on Win 7 32-bit. Because I am not familiar with Windows and MingW, I need investigate this bug in a few days. Thank you Zhang Xianyi |
GCC 4.7 uses MSVC ABI on Win 32. This means the caller pops the hidden pointer for returning aggregate structures larger than 8 bytes.
Hi @franko , I think I fixed this issue on develop branch. Please test it. Thank you Zhang Xianyi |
Hi @xianyi , I was able to test yesterday with the GSL test and everything was fine with the lated "develop" version. Thank you very much for your help. I guess that now the issue can be considered closed but this is up to you. Francesco |
I've discovered what seems to be a bug in the OpenBLAS library with complex matrix on dual core PENRYN CPUs. The bug cause a crash of the software.
I was able to reproduce the bug with a very simple program using the BLAS library indirectly through the GSL library. When linking with OpenBLAS 0.2.3 the program crash while it does terminate correctly when linking with the GSL CBLAS library.
The bug happens in the GSL function:
gsl_linalg_complex_LU_solve
If I fire a debugger the program get a SEGMENTATION FAULT at this point:
The OpenBLAS library was compiled on Windows XP using an up to date mingw installation with gcc 4.7.0.
The library was compiled with:
make DYNAMIC_ARCH=1 FC=gfortran
Then, in turn, the GSL library was linked to the OpenBLAS library.
Here the C program to reproduce the bug:
The text was updated successfully, but these errors were encountered: