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
Compiler Failure on POWER8 with /kernel/power/i{c,d,s,z}a{min,max}.c #2254
Comments
|
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). |
|
If I find some time I will take a closer look inside the routines and why they are crashing. |
|
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 |
|
Reproduced in the unicamp.br minicloud. Preprocessed source of isamax.c is here: |
|
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 |
|
@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. |
|
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. |
|
Could you comment/remove some lines to find which parts cause this error? |
|
@quickwritereader That was exactly what I did. Commenting out the above mentioned lines, the code compiles. |
|
addition? could you remove that c++ style comment or replace it with c style /* */ |
|
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. |
|
Renaming and replacing the addition does not help. |
|
from what versions of gcc it disappears? |
|
I tried it with gcc 5.4 and there it works. The problem is as long as RHEL7 with gcc 4.8.5 is the recommend OS from IBM for the POWER8, it should work with the old gcc as well. Rewritting the + to vec_add does also not help. |
|
Strangely I saw no effect of removing these lines (on the gcc 4.8.5 build that is), and have not managed to narrow it down to less than the entire siamax_kernel_64 routine. My current impression is that this is some more general issue with the |
|
Since the gcc 4.x series will pass away, a possible fix would be do deactivate the kernels for GCC < 5.x and bypass this problem this way. |
|
ok lets replace double addition with one introducing new variable before for loop after temp1=temp1 <<1 ; line |
|
As long as we do not suspect anything fundamentally wrong with these files, perhaps the easiest |
|
with recent issues, I see inline assembly was the best choice but it doubles work for the new architecture. |
|
I now see that a gcc 8.3.0 build on power8 (Ubuntu 19.04) returns 200+ errors in the single-precision complex LAPACK tests. Disabling optimization of icamin/icamax.c works around this as well (and incidentally also removes the single failure in CTFSM that we have been seeing across all architectures) |
|
I will try to check those this week. |
|
More importantly (and thanks to isuruf's help with debugging our Travis script), DYNAMIC_ARCH=1 with gcc 5.4 fails in the power9 part with another ICE: and this time the |
|
Disabling features to work-around issues in GCC 4.8.5 is okay, although IBM should work with RH to backport the fixes. But ICEs in GCC 7/8 should be reported and fixed in GCC. None of this was reported to the GCC community. |
|
@martin-frbg how about to use gcc generated optimized assembly files for both power8 and power9 directly? |
|
Yes I guess that would work (assuming the generated assembly is not totally unreadable from a human perspective). Once we are convinced that we have found a working version that is - 8.3.0 |
|
It's not great to create too much hand-written assembly if the compiler produces efficient code. The compiler will adapt to future processors. Hand-written assembly code creates another location to update. If the testcase cannot be reduced, please open a GCC Bugzilla with the pre-processed source file. |
|
@martin-frbg could you check if it passes after reverting caxpy fix. |
|
I have now dumped the |
|
@martin-frbg thanks. I am upset all these codes turned to headache. |
here |
|
Dumped values could be copied using for above case all dumps was 16X16 with lda-16 |
|
for example when I pass M=1 so I concluded that there is not anything missing on calculation side. |
|
so I hope that I can find something typo or missing condition or calculation. But if it turns out that its just precision thing |
|
@martin-frbg I think it would be better than checking separately I noted above |
|
@martin-frbg could we ask lapack team about severity. for threshold 31 it passes as failure got 30. and 22 others are passing even for 3.0 |
|
plus if I change seed numbers it passes |
|
Certainly I would not have any doubts about this if it did not look like a regression compared to the previous code. (But compiling for TARGET=POWER6 in the same environment shows some failures with a threshold excession in the range of 1e6 so probably our time and energy is better spent elsewhere) |
|
@quickwritereader @martin-frbg Can this be closed? Do you prefer opening a separate issue for lapack threshold change? |
|
Still reproducible on 0.3.8 gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39) NAME="CentOS Linux" CENTOS_MANTISBT_PROJECT="CentOS-7" |
|
Is that big-endian POWER8 ? On little-endian it is supposed to pick up isamax_power8.S (isamax.c as processed by a newer gcc that does not iCE), unless I messed up the "if not big-endian" in KERNEL.POWER8. |
|
|
|
Use IBM AT12.0 or AT13.0 or RH Developer Toolset or something newer than GCC 4.8.5 RH. |
|
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. |
|
@martin-frbg When you have the account, please contact me so that we can set it not to expire. |
|
@martin-frbg no I'm using vanilla make. Will try with cmake |
|
@edelsohn I'm aware of the options, but prefer to use default gcc |
|
If you want to create complications for yourself, that's your choice. |
|
@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 |
|
@RajalakshmiSR thanks - silly me. And I guess i should combine that fix with a "GCC<9" version check . |
|
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. |
|
The fix from #2411 mentioned above went into what became 0.3.9, not 0.3.8 |
|
@martin-frbg did really good job fixing those issues with generating assemblies. |
|
(Re)checked 0.3.9 on Centos7 with a gcc8.2.1 from developer toolset ( |
|
It appears there was something wrong with the cluster's configuration, it seems to be working now. Sorry for the mixup! |
I updated my installations on my POWER8 machine and since version 0.3.6 up to the current development branch, the build process fails with:
OS Details:
CentOS 7.6 ppc64el, gcc 4.8.5, gfortran 4.8.5, IBM POWER8 LC822
The text was updated successfully, but these errors were encountered: