Skip to content

OpenBLAS 0.3.13 fails to build on ppc64le / gcc 8.2 #3074

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

Closed
jonglezb opened this issue Jan 20, 2021 · 8 comments · Fixed by #3075
Closed

OpenBLAS 0.3.13 fails to build on ppc64le / gcc 8.2 #3074

jonglezb opened this issue Jan 20, 2021 · 8 comments · Fixed by #3075

Comments

@jonglezb
Copy link

I'm building OpenBLAS 0.3.13 using Spack on a POWER8 machine running Debian 10.

Build fails because of the new POWER10 dynamic support:

==> Error: ProcessError: Command exited with status 2:
    'make' '-j16' 'CC=/grid5000/spack/lib/spack/env/gcc/gcc' 'FC=/grid5000/spack/lib/spack/env/gcc/gfortran' 'MAKE_NB_JOBS=0' 'DYNAMIC_ARCH=1' 'USE_OPENMP=0' 'USE_THREAD=0' 'RANLIB=ranlib' 'libs' 'netlib' 'shared'                        

2 errors found in build log:
     1190    /grid5000/spack/lib/spack/env/gcc/gcc -O2 -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DNO_WARMUP -DMAX_CPU_NUMBER=160 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=
             1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.13\" -Ofast -mcpu=power8 -mtune=power8 -mvsx  -fno-fast-math -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=openblas_env -DASMFNAME=openblas_env_ -DNAME=openblas_
             env_ -DCNAME=openblas_env -DCHAR_NAME=\"openblas_env_\" -DCHAR_CNAME=\"openblas_env\" -DNO_AFFINITY -I../.. -c openblas_env.c -o openblas_env.o                                                                                 
     1191    /grid5000/spack/lib/spack/env/gcc/gcc -O2 -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DNO_WARMUP -DMAX_CPU_NUMBER=160 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=
             1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.13\" -Ofast -mcpu=power8 -mtune=power8 -mvsx  -fno-fast-math -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=dynamic_power -DASMFNAME=dynamic_power_ -DNAME=dynamic
             _power_ -DCNAME=dynamic_power -DCHAR_NAME=\"dynamic_power_\" -DCHAR_CNAME=\"dynamic_power\" -DNO_AFFINITY -I../..   -c -o dynamic_power.o dynamic_power.c                                                                       
     1192    dynamic_power.c:9:1: warning: multi-line comment [-Wcomment]
     1193     //#if (!defined __GNUC__) || ( __GNUC__ >= 11) \
     1194     ^
     1195    dynamic_power.c: In function 'gotoblas_dynamic_init':
  >> 1196    dynamic_power.c:57:6: error: cpu 'power10' is an invalid argument to builtin '__builtin_cpu_is'
     1197      if (__builtin_cpu_is("power10"))
     1198          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  >> 1199    make[1]: *** [<builtin>: dynamic_power.o] Error 1
     1200    make[1]: *** Waiting for unfinished jobs....
     1201    make[1]: Leaving directory '/var/spack/stage/root/spack-stage-openblas-0.3.13-57p57xjbiiv757vjq4uickpldoq4vcfy/spack-src/driver/others'                                                                                         
     1202    make: *** [Makefile:165: libs] Error 1

Here are the versions:

# gcc --version
gcc (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# ld --version
GNU ld (GNU Binutils for Debian) 2.31.1
Copyright (C) 2018 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

I browsed other issues, and as far as I can tell, POWER10 support is supposed to be disabled with old versions of GCC. Not sure what's up.

@martin-frbg
Copy link
Collaborator

Looks like fallout from #2994 (and yes RajalakshmiSR warned about this happening, I should not have merged antonblanchard's PR without further clarification from him probably. This did not come up in my tests back then though)

@jonglezb
Copy link
Author

FYI, 0.3.12 builds fine (also using Spack, on the same POWER8 host).

I assume you already have access to POWER machines, but just in case, the GCC compile farm has several hw/sw POWER environments to test things: https://cfarm.tetaneutral.net/

@martin-frbg
Copy link
Collaborator

Thx, I'm allowed to use the OpenPOWER minicloud at unicamp.br

@RajalakshmiSR
Copy link

@martin-frbg Should we just back out 2994 for now?

@martin-frbg
Copy link
Collaborator

Either that, or put another gcc version check for >=11 around that __builtin_cpu_is() call. The other change in #2994 looked more important, and I can only assume I got fixated on whether "cc -Wl,--version" was actually safer than "ld --version".

@brada4
Copy link
Contributor

brada4 commented Jan 20, 2021

@jonglezb You posted debian compiler version, does not matter, no released gcc would work.

https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/gcc/package.py

@martin-frbg
Copy link
Collaborator

Actually gcc 10.2 would work, as RajalakshmiSR pointed out to me in #3075 the relevant gcc patch was backported from mainline shortly before its release.

@jonglezb
Copy link
Author

Thanks, I just tested a build from the develop branch and it builds fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants