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
Compiler Failure on POWER8 with /kernel/power/i{c,d,s,z}a{min,max}.c #2254
changed the title [-]Compiler Failure on POWER8 with /kernel/power/ica{min,max}.c[/-][+]Compiler Failure on POWER8 with /kernel/power/i{c,d,s,z}a{min,max}.c[/+]on Sep 12, 2019
Interesting - this file is indeed new in 0.3.6, but (from debugging #2233) the ICE in question appears to be fixed in more recent compilers. (Unfortunately the source line 288 from the error message tells us nothing as it is simply the closing brace on the last line of the file).
I see now that this has already been reported (against gcc 7.1.0) by susilehtlola as https://bugzilla.redhat.com/show_bug.cgi?id=1740539
(From the tests for #2233, the code compiles with gcc 5.4 and again from 7.3 onwards (7.3.0/8.2.1/9.1), so it could be that something was fixed, broken, and fixed again)
Reproduced in the unicamp.br minicloud. Preprocessed source of isamax.c is here: isamax_preprocessed.txt if somebody wants to add it to the redhat bugzilla entry (@susilehtola)
Also the problem goes away at -O0 (instead of our default -Ofast) so can be worked around with
a #pragma GCC optimize "O0" in the affected files.
Also of note is that in my tests (gcc-4.8.5 20150623 Red Hat 4.8.5-36 on CentOS 7) it is only the
single precision versions (isamin/isamax.c and icamin/icamax.c) that cause an ICE.
The c++ style comment is already in OpenBLAS and not from me. I tried to change "+=" to "temp0 = temp+temp1" because I had this problem in ancient times with gcc and the vetorization of a piece of code but that did not change anything.
Maybe to rename/refactor temp0 to other names. feel free to change refactor. comment blocks to c style.
temp0 = vec_add( temp1 , vec_add(temp0,temp1));
It should not even try to compile isamax.c in 0.3.8 - are you building with cmake by any chance ? (The simple KERNEL file parser in utils.cmake simply skips over conditional expressions.) Unfortunately I have lost OpenPower cloud access again so will need to reapply.
@sh1ng cmake definitely won't be better, it would only have explained why my dirty trick with the conditionals in KERNEL.POWER8 does not work. Unfortunately too many related problems came up during the lifetime of this issue, ppc64be, power9, the relevance of lapack-test deviations... in particular I seem to have bungled my original gcc48 workaround with a later hack for ppc64be.
I verified that 0.3.8 builds fine on POWER8BE/ POWER8LE and POWER9 using AT12.
@martin-frbg I think the check for not big endian in KERNEL.POWER8 needs a correction
-ifneq ($(BYTE_ORDER),$(ORDER_BIG_ENDIAN))
+ifneq ($(BYTE_ORDER),"ORDER_BIG_ENDIAN")
The fix from #2411 mentioned above went into what became 0.3.9, not 0.3.8
The 0.3.9 release definitely builds and passes tests with both gcc 9.3.1 and gcc 8.3.1 (fedora 30 & 28). A mixup between compiler versions (mismatched gcc and gfortran, or picking up an older runtime) is likely to cause a crash
@martin-frbg did really good job fixing those issues with generating assemblies.
In my forked project, I have updated sources for icamax icamin C source files. But never Pull requested them as better and tested fixes were already supplied.
People having these types of issues could also check it.
(Re)checked 0.3.9 on Centos7 with a gcc8.2.1 from developer toolset (yum install devtoolset-8-gcc-8.2.1 devtoolset-8-gcc-gfortran-8.2.1) now as well, no crash, no test failures, nothing suspicious in lapack-test.
Activity
[-]Compiler Failure on POWER8 with /kernel/power/ica{min,max}.c[/-][+]Compiler Failure on POWER8 with /kernel/power/i{c,d,s,z}a{min,max}.c[/+]martin-frbg commentedon Sep 12, 2019
Interesting - this file is indeed new in 0.3.6, but (from debugging #2233) the ICE in question appears to be fixed in more recent compilers. (Unfortunately the source line 288 from the error message tells us nothing as it is simply the closing brace on the last line of the file).
grisuthedragon commentedon Sep 12, 2019
If I find some time I will take a closer look inside the routines and why they are crashing.
martin-frbg commentedon Sep 12, 2019
I see now that this has already been reported (against gcc 7.1.0) by susilehtlola as https://bugzilla.redhat.com/show_bug.cgi?id=1740539
(From the tests for #2233, the code compiles with gcc 5.4 and again from 7.3 onwards (7.3.0/8.2.1/9.1), so it could be that something was fixed, broken, and fixed again)
martin-frbg commentedon Sep 12, 2019
Reproduced in the unicamp.br minicloud. Preprocessed source of isamax.c is here:
isamax_preprocessed.txt if somebody wants to add it to the redhat bugzilla entry (@susilehtola)
Also the problem goes away at -O0 (instead of our default -Ofast) so can be worked around with
a
#pragma GCC optimize "O0"in the affected files.martin-frbg commentedon Sep 12, 2019
Also of note is that in my tests (gcc-4.8.5 20150623 Red Hat 4.8.5-36 on CentOS 7) it is only the
single precision versions (isamin/isamax.c and icamin/icamax.c) that cause an ICE.
susilehtola commentedon Sep 12, 2019
@martin-frbg thanks, uploaded. However, in my experience there's very little movement on RHEL bugzilla tickets.
If someone has a RHEL subscription, they should make an issue about the bug with Red Hat; things get moving when a paying customer complains.
grisuthedragon commentedon Sep 13, 2019
I did some experiments with isamax.c and found the around line 111 the snippets:
and around line 170
seem to disturb the compiler.
Update: narrow the range a bit.
quickwritereader commentedon Sep 13, 2019
Could you comment/remove some lines to find which parts cause this error?
grisuthedragon commentedon Sep 13, 2019
@quickwritereader That was exactly what I did. Commenting out the above mentioned lines, the code compiles.
quickwritereader commentedon Sep 13, 2019
addition? could you remove that c++ style comment or replace it with c style /* */
grisuthedragon commentedon Sep 13, 2019
The c++ style comment is already in OpenBLAS and not from me. I tried to change "+=" to "temp0 = temp+temp1" because I had this problem in ancient times with gcc and the vetorization of a piece of code but that did not change anything.
quickwritereader commentedon Sep 13, 2019
Maybe to rename/refactor temp0 to other names. feel free to change refactor. comment blocks to c style.
temp0 = vec_add( temp1 , vec_add(temp0,temp1));
grisuthedragon commentedon Sep 13, 2019
Renaming and replacing the addition does not help.
quickwritereader commentedon Sep 13, 2019
from what versions of gcc it disappears?
remove all register hints too.
Also rewrite + operations with this style result=vec_add(operand1,operand2)
106 remaining items
sh1ng commentedon Feb 12, 2020
ppc64lecpu : POWER8E (raw), altivec supportededelsohn commentedon Feb 12, 2020
Use IBM AT12.0 or AT13.0 or RH Developer Toolset or something newer than GCC 4.8.5 RH.
martin-frbg commentedon Feb 12, 2020
It should not even try to compile isamax.c in 0.3.8 - are you building with cmake by any chance ? (The simple KERNEL file parser in utils.cmake simply skips over conditional expressions.) Unfortunately I have lost OpenPower cloud access again so will need to reapply.
edelsohn commentedon Feb 12, 2020
@martin-frbg When you have the account, please contact me so that we can set it not to expire.
sh1ng commentedon Feb 12, 2020
@martin-frbg no I'm using vanilla make. Will try with cmake
sh1ng commentedon Feb 12, 2020
@edelsohn I'm aware of the options, but prefer to use default gcc
edelsohn commentedon Feb 12, 2020
If you want to create complications for yourself, that's your choice.
martin-frbg commentedon Feb 12, 2020
@sh1ng cmake definitely won't be better, it would only have explained why my dirty trick with the conditionals in KERNEL.POWER8 does not work. Unfortunately too many related problems came up during the lifetime of this issue, ppc64be, power9, the relevance of lapack-test deviations... in particular I seem to have bungled my original gcc48 workaround with a later hack for ppc64be.
RajalakshmiSR commentedon Feb 12, 2020
I verified that 0.3.8 builds fine on POWER8BE/ POWER8LE and POWER9 using AT12.
@martin-frbg I think the check for not big endian in KERNEL.POWER8 needs a correction
-ifneq ($(BYTE_ORDER),$(ORDER_BIG_ENDIAN))
+ifneq ($(BYTE_ORDER),"ORDER_BIG_ENDIAN")
martin-frbg commentedon Feb 12, 2020
@RajalakshmiSR thanks - silly me. And I guess i should combine that fix with a "GCC<9" version check .
amelvill-umich commentedon May 20, 2020
Can still reproduce with gcc 8.2.0, OpenBlas v0.3.8 RHEL 7.5, ppc64le.
For what it's worth, I can compile this without any problems on AMD64 GCC 9.3.0, Ubuntu 20.20
With 0.3.9 it gives me... a segfault?
I notice it seems to be still trying to link against the GCC 4.8.5 libraries, so there might be something I still have to look at on my end.
martin-frbg commentedon May 20, 2020
The fix from #2411 mentioned above went into what became 0.3.9, not 0.3.8
The 0.3.9 release definitely builds and passes tests with both gcc 9.3.1 and gcc 8.3.1 (fedora 30 & 28). A mixup between compiler versions (mismatched gcc and gfortran, or picking up an older runtime) is likely to cause a crash
quickwritereader commentedon May 20, 2020
@martin-frbg did really good job fixing those issues with generating assemblies.
In my forked project, I have updated sources for icamax icamin C source files. But never Pull requested them as better and tested fixes were already supplied.
People having these types of issues could also check it.
martin-frbg commentedon May 21, 2020
(Re)checked 0.3.9 on Centos7 with a gcc8.2.1 from developer toolset (
yum install devtoolset-8-gcc-8.2.1 devtoolset-8-gcc-gfortran-8.2.1) now as well, no crash, no test failures, nothing suspicious in lapack-test.amelvill-umich commentedon May 21, 2020
It appears there was something wrong with the cluster's configuration, it seems to be working now. Sorry for the mixup!