Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7944 Discussions

Incompatibility with binutils using -xCORE-AVX512

Bart_O_
Novice
2,158 Views

As discussed here: https://github.com/easybuilders/easybuild-easyconfigs/issues/8003 some codes don't compile using -xCORE-AVX512 if newer binutils are used (>=2.30, note that https://software.intel.com/en-us/articles/intel-c-compiler-191-for-linux-release-notes-for-intel-parallel-studio-xe-2020 says that up to 2.29 is supported, so perhaps Intel is aware already, but I could not find this documented anywhere else publically)

The issue is that Intel compilers generate instructions such as "vmovd %xmm16,%r10" which should really be with a "q", so "vmovq %xmm16,%r10". In this patch: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=704a705d7aaab8041df76e2981e2a1efc014aad0;hp=605fd3c6590fbed834107a2e1d1df0ba58834576 H.J. Lu removed support for this syntax for xmm registers >15 as it's never generated by GCC.

This patch re-adds them to binutils:

https://raw.githubusercontent.com/easybuilders/easybuild-easyconfigs/8b699534fafeb7cc51ffb83cf0a1e8f739ab0a1d/easybuild/easyconfigs/b/binutils/binutils-2.32-readd-avx512-vmovd.patch

and then CGAL and some other packages can be compiled again.

I am putting this out here so people who run into similar issues can find it but Intel: can you please fix this issue in the compiler?

(Note that H.J. Lu works for Intel!)

 

 

 

 

0 Kudos
12 Replies
PrasanthD_intel
Moderator
2,158 Views

Hi Bart,

Thanks for reaching out to us.

We are looking into the issue and will get back to you soon.

 

Thanks

Prasanth

 

 

0 Kudos
Viet_H_Intel
Moderator
2,158 Views

Hi Bart,

Can you create a preprocess file, qjp2handler.i (replace -c with -E) for us? Thanks.

 

0 Kudos
Bart_O_
Novice
2,158 Views

Hi Viet,

thanks for getting back to me. I found it easier to reproduce with CGAL (it's a much quicker compilation than Qt) so I attached that file. You can reproduce using

icpc -xCore-AVX512 -c all_files.cpp.i

Regards,

Bart

0 Kudos
Viet_H_Intel
Moderator
2,158 Views

Not sure what I've missed, but it compiled successfully.

$ icpc -xCore-AVX512 -c test.cpp  -w
$ ls -lt test.o
-rw-r--r-- 1 ... ome 1269840 Feb 19 18:07 test.o
$ gcc -v
gcc version 8.1.0 (GCC)
$ icpc -V
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.0.166 Build 20191121
Copyright (C) 1985-2019 Intel Corporation.  All rights reserved.

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.1 (Maipo)
$

0 Kudos
Bart_O_
Novice
2,158 Views

Hello Viet,

you are probably using the older binutils (2.27 as shipped with RHEL 7.1). You can try on RHEL 8 which ships with binutils 2.30 or compile binutils yourself:

$ wget ftp://ftp.gnu.org/gnu/binutils/binutils-2.34.tar.gz

$ tar xf binutils-2.34.tar.gz

$ cd binutils-2.34

$ ./configure

$ make

$ ln -s gas/as-new as

$ export PATH=$PWD:$PATH

$ as --version

GNU assembler (GNU Binutils) 2.34 (...)

$ icpc -xCORE-AVX512 -c all_files.cpp.i

/tmp/icpccSQyCpas_.s: Assembler messages:
/tmp/icpccSQyCpas_.s:125413: Error: unsupported instruction `vmovd'

..

0 Kudos
Bart_O_
Novice
2,158 Views

Another way is to compile via assembly:

$ icpc -xCORE-AVX512 -S all_files.cpp.i

then

$ /usr/bin/as all_files.cpp.s

gives no complaint but

$ /path/to/binutils-2.34/gas/new-as all_files.cpp.s

where /path/to is where you unpacked and made binutils complains about vmovd. This way you don't need to manipulate PATH nor set the symbolic link.

0 Kudos
Viet_H_Intel
Moderator
2,158 Views

Thank Bart. I am able to reproduce it and filed an internal bug (CMPLRIL0-32568) with our Developer.

0 Kudos
Viet_H_Intel
Moderator
2,158 Views

The Developer said this is an issue with the newer assembler, because the code generated are the same on both RHEL7 and RHEL8, but as in 2.30 couldn't be able to assemble it.

One interesting detail he noticed. Assembler seems only complain about those vmovd instructions where any of upper 16 registers is used:
        vmovd     %xmm1, %r8                     # Okay
        vmovd     %xmm30, %rdx                  # Assembler issues an error message



 

0 Kudos
Bart_O_
Novice
2,158 Views

Yes that is exactly what I mentioned before: "H.J. Lu removed support for this syntax for xmm registers >15 as it's never generated by GCC."

However use of vmovd is wrong here: it's operating on 64-bit registers which should use a "q" suffix.

 

        vmovq     %xmm1, %r8                     # Okay
        vmovq     %xmm30, %rdx                  # Okay

0 Kudos
Viet_H_Intel
Moderator
2,158 Views

Thanks. I'll work with the Developer.

0 Kudos
Viet_H_Intel
Moderator
2,158 Views

We will fix this bug in the next update release.

0 Kudos
Viet_H_Intel
Moderator
2,013 Views

This issue has been fixed in PSXE2020 update 4. Can you please try it out? And we will no longer respond to this thread.  

If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.

Thanks,


0 Kudos
Reply