Skip to content

Compilation errors: bad register name #1841

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
manavbhatia opened this issue Oct 30, 2018 · 6 comments
Closed

Compilation errors: bad register name #1841

manavbhatia opened this issue Oct 30, 2018 · 6 comments

Comments

@manavbhatia
Copy link

Hi,
I am attempting to build openblas with spack. I have tried two different compilers gcc8.2 and gcc7.3 and each time have ended up with errors concerning bad register name . For example,

../kernel/x86_64/sgemm_kernel_16x4_skylakex.S: Assembler messages:
../kernel/x86_64/sgemm_kernel_16x4_skylakex.S:1311: Error: bad register name `%zmm0'
../kernel/x86_64/sgemm_kernel_16x4_skylakex.S:1311: Error: bad register name `%zmm2'
../kernel/x86_64/sgemm_kernel_16x4_skylakex.S:1311: Error: bad register name `%zmm3'
../kernel/x86_64/sgemm_kernel_16x4_skylakex.S:1311: Error: bad register name `%zmm2'
../kernel/x86_64/sgemm_kernel_16x4_skylakex.S:1311: Error: bad register name `%zmm3'
../kernel/x86_64/sgemm_kernel_16x4_skylakex.S:1311: Error: bad register name `%zmm7'
../kernel/x86_64/sgemm_kernel_16x4_skylakex.S:1311: Error: bad register name `%zmm9'
../kernel/x86_64/sgemm_kernel_16x4_skylakex.S:1311: Error: bad register name `%zmm7'
../kernel/x86_64/sgemm_kernel_16x4_skylakex.S:1311: Error: bad register name `%zmm9'

The detailed errors are in error.txt.

I would greatly appreciate advice on how to deal with them.

Thanks,
Manav

@martin-frbg
Copy link
Collaborator

To me this looks as if your assembler may be too old, or perhaps you need to set up AS to point to the spack version of gas like you did with CC ?

@brada4
Copy link
Contributor

brada4 commented Oct 30, 2018

You need binutils 2.25 or better and gcc 5 or better

$ as --version
GNU assembler (GNU Binutils; openSUSE Leap 15.0) *2.31*.1.20180828-lp150.5.3
$ gcc -march=skylake-avx512 --version
gcc (SUSE Linux) *7*.3.1 20180323 [gcc-7-branch revision 258812]

As Martin already noted - gas or as included in binutils gets called by gcc and chokes on modern registers that compiler emits with -march flag noted above

@martin-frbg is it worth c_ceck-ing also with short assembly like and zmm32 ?

@brada4
Copy link
Contributor

brada4 commented Oct 31, 2018

@manavbhatia probably it is worth bringing this issue to spack developers that gcc is not functional with archaic host binutils.
@martin-frbg i think I adressed at least popular part of particular problem (Ubuntu14 has old compiler but fresh binutils):
https://github.com/xianyi/OpenBLAS/wiki/Faq#binutils

@martin-frbg
Copy link
Collaborator

@brada4 I do not think this is a problem with spack in particular - just that sometimes updating one package is not sufficient to receive some particular new functionality. I think this assembler problem came up before, probably when the Haswell kernels brought AVX2 mnemonics (and one could not say that rpm or apt-get were at fault back then either)

@brada4
Copy link
Contributor

brada4 commented Nov 4, 2018

Old systems do not have right tools to do the job. I wonder how this slipped past initial AVX512 compiler detection which invokes as before proceeding.

@martin-frbg
Copy link
Collaborator

@manavbhatia did you manage to solve this ?
@brada4 I suspect he specified TARGET=SKYLAKEX, which overrides the fallback to HASWELL. And the later safeguards in the SkylakeX microkernels (where available) are based on compiler version only.

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

No branches or pull requests

3 participants