Compile mpich (3.1.2) with tp=haswell shows error

Questions on using the PGI Compilers and Tools
Post Reply
danishyo
Posts: 12
Joined: Mar 12 2007

Compile mpich (3.1.2) with tp=haswell shows error

Post by danishyo » Mon Sep 08, 2014 2:25 am

Hi

I try to build mpich(3.1.2) with unified binary target(core2,shanghai,haswell) shows assembler error.
Error message shows:

PGC/x86-64 Linux 14.7-0: compilation completed with warnings
CC adio/common/ad_write_coll.lo
/tmp/pgccafNeatQr1wNL.s: Assembler messages:
/tmp/pgccafNeatQr1wNL.s:2255: Error: suffix or operands invalid for `vpxor'
/tmp/pgccafNeatQr1wNL.s:2268: Error: suffix or operands invalid for `vpaddd'
/tmp/pgccafNeatQr1wNL.s:2270: Error: no such instruction: `vextracti128 $1,%ymm0,%xmm1'
/tmp/pgccafNeatQr1wNL.s:2317: Error: suffix or operands invalid for `vpxor'
/tmp/pgccafNeatQr1wNL.s:2325: Error: suffix or operands invalid for `vpaddd'
/tmp/pgccafNeatQr1wNL.s:2331: Error: no such instruction: `vextracti128 $1,%ymm0,%xmm1'
/tmp/pgccafNeatQr1wNL.s:3015: Error: suffix or operands invalid for `vpxor'
/tmp/pgccafNeatQr1wNL.s:3023: Error: suffix or operands invalid for `vpaddd'
/tmp/pgccafNeatQr1wNL.s:3028: Error: no such instruction: `vextracti128 $1,%ymm0,%xmm1'


My config like following:
env CC=pgcc FC=pgfortran F77=pgfortran CXX=pgcpp CFLAGS="-Mlfs -fast -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -tp=core2,shanghai,haswell" FCFLAGS="-fast -Mlfs -tp=core2,shanghai,haswell" FFLAGS="-tp=core2,shanghai,haswell -Mlfs -fast -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" \
CXXFLAGS="-fast -Mlfs -tp=core2,shanghai,haswell" ./configure --prefix=/opt/mpich > config.log

Any suggestions about config or update needs to be done?

cparrott_pgroup
Posts: 152
Joined: May 02 2011

Post by cparrott_pgroup » Mon Sep 08, 2014 4:46 pm

Hi,

It looks like your GNU binutils is out of date, and does not support assembly of Haswell instructions. Can you update the binutils on this particular system? Alternately, you may need to grab a more recent binutils (e.g. binutils-2.24), compile it, and install it into an alternate location.

Hope this helps,

+chris

danishyo
Posts: 12
Joined: Mar 12 2007

Post by danishyo » Mon Sep 08, 2014 8:39 pm

Thanks for suggestions.
My OS is CentOS 6.5 X64 with fresh install.
I check my binutils, version shows binutils-2.20.51.0.2-5.36.el6.x86_64.
yum also shows no update now.

danishyo
Posts: 12
Joined: Mar 12 2007

Post by danishyo » Mon Sep 08, 2014 9:27 pm

I install latest binutils, now it works!
Thanks again for your help!

cparrott_pgroup
Posts: 152
Joined: May 02 2011

Post by cparrott_pgroup » Tue Sep 09, 2014 12:32 pm

Note that Haswell support is relatively recent in Linux, and a lot of the older Linux distributions do not support it out of the box. I believe CentOS 7 may support Haswell. However, you are probably out of luck with CentOS 6.5 unless you install an alternate (more up-to-date) binutils.

We have this problem on a few of our Haswell systems here at PGI as well, and we normally install an updated binutils out in someplace like /opt/binutils. Then we add /opt/binutils/bin to the front of our $PATH setting, so the updated assembler (which supports Haswell) gets picked up first. This is a good workaround for older systems that will probably not be updated by the Linux distribution maintainers, who have since moved on to newer releases of the distribution.

Glad you were able to sort it out.

+chris

Post Reply