You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenBLAS has issues solving triangular matrices on win32 #1270
Do I read that correctly - you are using a binary distribution of 0.2.19 from some third party site (which could be one of the sourceforge mirrors sites, but then again could be something else) ? Could you retest with the current "develop" snapshot which has a bunch of fixes vs. 0.2.19 (or at least build 0.2.19 yourself on your platform to see if it passes the built-in tests) ? In any case I guess a minimal example run on a well-defined system would be preferable to a big unedited dump from an appveyor vm.
not sure if 0.2.20 will build in your environment (depending on how and where you build - a cross-compile on linux like the binaries provided on sourceforge will probably go okay. the issue is a botched commit that breaks things on non-glibc systems, waiting for xianyi to release 0.2.21) which is why I suggested taking a snapshot of "develop" (easily done by clicking on the green "Clone or download" button on the "Code" tab here). Normal build from source should run a few tests at the end automatically (though as a Linux guy I am not completely sure it does this on Windows as well.
Thanks for the link to the scipy issue. From reading that, it seems your tests were (at least at some point in the history of that PR) already done with 0.2.20 (?)
Do you still believe the problematic behaviour is with potrf specifically ?
Cross compiling with gcc will currently get you the hand-optimized assembly functions (which use inline assembly and AT&T notation that MSVC does not support), building with MSVC will use generic C implementations instead (which are possibly still a bit faster than the netlib reference implementation).
Latest commits to "develop" allow compiling with clang which supports the optimized assembly (but will need a windows flang compiler for completeness)
I take it you are suggesting that compiling interface/lapack/potrf.c with -O0 instead of the default -O2 would solve the problem with older mingw versions ? Not sure how easy it would be to cater for that in the Makefiles (not sure if -march=native is actually what they are using or intending to use, if my understanding is correct they are preparing a distribution package of some sort).
-march=pentium4 -msse2 -fpmath=sse ...
It is miscompilation by C compiler, not something to work around. Since build logs/options are not around for each and every 'build' and 'gcc version' i would take gcc7 claim with a big grain of salt.
Once again I am not sure I can follow your cryptic messages. My suggestion was to omit compilation of the problematic potrf interface if there is reason to believe the compiler is not up to that task.
It compiles just fine with gcc 4.6 included with windows rtools (compilers for r packages).
I am quite certain aggressive/unpopolar compiler options lead to miscompilation in this case.
I'm not going to create a PR to OpenBLAS with a patch to something without further diagnosis and debugging. However, using mingw-w64 with gcc-7.1 seems to be a workaround to this issue right now,
You dont even have exact compiler options for each failed case.
Your PR will be wrong, as old gcc can compile OpenBLAS without any problems. Please find problematic compiler option and report a compiler bug first.
@brada4 alienating developers of other projects helps noone. Even if your gcc 4.6 from rtools happens to be identical to the mingw-w64 build of the same version number this does nothing to refute the claim that at least the 4.9 and 5.3 versions miscompile potrf.c . If we really want to get to the bottom of this I guess we would need the intermediate assembler (gcc -S) output for this file from both "good" and "bad" compilers and someone who is capable of spotting the relevant differences.
For now, adding a note to the wiki (and perhaps ensuring that any future pre-compiled binaries for win32 made available on the project page at sourceforge are built with a recent gcc cross-compiler "just in case the problem carries over to cross-compilations") may be sufficient ?
I dont have compiler on windows. I can try to cross-compile with old and new crosscompiler and run test case on 64bit windows...
My speculation is based on assumption that typical distribution compiler option sets (-O2 -march=early-i686 -msome-memory-protector ) are million times better tested in GCC than -march=better-cpu
Have there been any new insights since then ? I tried to track any seemingly related numpy/scipy issues but as far as I could tell the discussions there seem to have moved on to inadvertent use of the 80bit extended precision Intel FPU mode causing problems in cdflib. So should we add a warning in the wiki to use at least version 7.1 of the mingw gcc for 32bit builds on Windows, or are there any indications that the problem may be bigger and in OpenBLAS itself ?
Activity
martin-frbg commentedon Aug 7, 2017
Do I read that correctly - you are using a binary distribution of 0.2.19 from some third party site (which could be one of the sourceforge mirrors sites, but then again could be something else) ? Could you retest with the current "develop" snapshot which has a bunch of fixes vs. 0.2.19 (or at least build 0.2.19 yourself on your platform to see if it passes the built-in tests) ? In any case I guess a minimal example run on a well-defined system would be preferable to a big unedited dump from an appveyor vm.
martin-frbg commentedon Aug 7, 2017
not sure if 0.2.20 will build in your environment (depending on how and where you build - a cross-compile on linux like the binaries provided on sourceforge will probably go okay. the issue is a botched commit that breaks things on non-glibc systems, waiting for xianyi to release 0.2.21) which is why I suggested taking a snapshot of "develop" (easily done by clicking on the green "Clone or download" button on the "Code" tab here). Normal build from source should run a few tests at the end automatically (though as a Linux guy I am not completely sure it does this on Windows as well.
martin-frbg commentedon Aug 7, 2017
Thanks for the link to the scipy issue. From reading that, it seems your tests were (at least at some point in the history of that PR) already done with 0.2.20 (?)
Do you still believe the problematic behaviour is with potrf specifically ?
martin-frbg commentedon Aug 7, 2017
Cross compiling with gcc will currently get you the hand-optimized assembly functions (which use inline assembly and AT&T notation that MSVC does not support), building with MSVC will use generic C implementations instead (which are possibly still a bit faster than the netlib reference implementation).
Latest commits to "develop" allow compiling with clang which supports the optimized assembly (but will need a windows flang compiler for completeness)
brada4 commentedon Aug 7, 2017
Specifically what lapack is imported by arpack?
brada4 commentedon Aug 7, 2017
Sure, and your binary numpy too, ten times.
Some backtrace would be nice....
45 remaining items
martin-frbg commentedon Aug 15, 2017
I take it you are suggesting that compiling interface/lapack/potrf.c with -O0 instead of the default -O2 would solve the problem with older mingw versions ? Not sure how easy it would be to cater for that in the Makefiles (not sure if -march=native is actually what they are using or intending to use, if my understanding is correct they are preparing a distribution package of some sort).
brada4 commentedon Aug 15, 2017
-march=pentium4 -msse2 -fpmath=sse ...
It is miscompilation by C compiler, not something to work around. Since build logs/options are not around for each and every 'build' and 'gcc version' i would take gcc7 claim with a big grain of salt.
martin-frbg commentedon Aug 15, 2017
Once again I am not sure I can follow your cryptic messages. My suggestion was to omit compilation of the problematic potrf interface if there is reason to believe the compiler is not up to that task.
brada4 commentedon Aug 15, 2017
It compiles just fine with gcc 4.6 included with windows rtools (compilers for r packages).
I am quite certain aggressive/unpopolar compiler options lead to miscompilation in this case.
carlkl commentedon Aug 15, 2017
I'm not going to create a PR to OpenBLAS with a patch to something without further diagnosis and debugging. However, using mingw-w64 with gcc-7.1 seems to be a workaround to this issue right now,
brada4 commentedon Aug 16, 2017
You dont even have exact compiler options for each failed case.
Your PR will be wrong, as old gcc can compile OpenBLAS without any problems. Please find problematic compiler option and report a compiler bug first.
martin-frbg commentedon Aug 16, 2017
@brada4 alienating developers of other projects helps noone. Even if your gcc 4.6 from rtools happens to be identical to the mingw-w64 build of the same version number this does nothing to refute the claim that at least the 4.9 and 5.3 versions miscompile potrf.c . If we really want to get to the bottom of this I guess we would need the intermediate assembler (gcc -S) output for this file from both "good" and "bad" compilers and someone who is capable of spotting the relevant differences.
For now, adding a note to the wiki (and perhaps ensuring that any future pre-compiled binaries for win32 made available on the project page at sourceforge are built with a recent gcc cross-compiler "just in case the problem carries over to cross-compilations") may be sufficient ?
brada4 commentedon Aug 16, 2017
I dont have compiler on windows. I can try to cross-compile with old and new crosscompiler and run test case on 64bit windows...
My speculation is based on assumption that typical distribution compiler option sets (-O2 -march=early-i686 -msome-memory-protector ) are million times better tested in GCC than -march=better-cpu
martin-frbg commentedon Aug 16, 2017
Please note that this issue appears to be specifically about mingw-w64 on Windows 32bit then.
brada4 commentedon Aug 16, 2017
Yes, yes, 32bit dll+exe running on 64bit windows.
It is very important to have it running at top quality since all alternatives are fading away.
carlkl commentedon Aug 16, 2017
I'm willing to dig into this. However, This takes some time as there are some topics with higher priority for me right now.
brada4 commentedon Aug 16, 2017
You are not alone. As a minimum find a linux distribution with good and recent gcc that produces production quality 32bit DLL
martin-frbg commentedon Sep 26, 2017
Have there been any new insights since then ? I tried to track any seemingly related numpy/scipy issues but as far as I could tell the discussions there seem to have moved on to inadvertent use of the 80bit extended precision Intel FPU mode causing problems in cdflib. So should we add a warning in the wiki to use at least version 7.1 of the mingw gcc for 32bit builds on Windows, or are there any indications that the problem may be bigger and in OpenBLAS itself ?