POWER8 Compatibility: -march=native not available

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
jlost
Posts: 4
Joined: Tue Aug 30, 2016 10:01 pm

POWER8 Compatibility: -march=native not available

Post by jlost » Fri Sep 09, 2016 2:56 pm

Working around the out-of-date config.guess with "./configure -build=powerpc64le-unknown-linux-gnu", I encounter the following error next:

Code: Select all

[u0017592@sys-82824 abinit-8.0.8]$ make
make  all-recursive
make[1]: Entering directory `/home/u0017592/projects/abinit-8.0.8'
Making all in fallbacks
make[2]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
make libxc
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
The build of libxc has been disabled
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Checking build of libxc fallback
test -e stamps/libxc-install-stamp
make linalg
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
The build of linalg has been disabled
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Checking build of linalg fallback
test -e stamps/linalg-install-stamp
make netcdf
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
The build of netcdf has been disabled
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Checking build of netcdf fallback
test -e stamps/netcdf-install-stamp
make atompaw
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
The build of atompaw has been disabled
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Checking build of atompaw fallback
test -e stamps/atompaw-install-stamp
make wannier90
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
The build of wannier90 has been disabled
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Checking build of wannier90 fallback
test -e stamps/wannier90-install-stamp
make etsf_io
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
The build of etsf_io has been disabled
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Checking build of etsf_io fallback
test -e stamps/etsf_io-install-stamp
make bigdft
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
The build of bigdft has been disabled
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Checking build of bigdft fallback
test -e stamps/bigdft-install-stamp
make[2]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/fallbacks'
Making all in src
make[2]: Entering directory `/home/u0017592/projects/abinit-8.0.8/src'
Making all in incs
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/src/incs'
There is no buildable file here
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/src/incs'
Making all in mods
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/src/mods'
There is no buildable file here
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/src/mods'
Making all in 01_linalg_ext
make[3]: Entering directory `/home/u0017592/projects/abinit-8.0.8/src/01_linalg_ext'
gfortran -DHAVE_CONFIG_H -I. -I../..  -I../../src/incs -I../../src/incs -I/home/u0017592/projects/abinit-8.0.8/fallbacks/exports/include   -ffree-form -J/home/u0017592/projects/abinit-8.0.8/src/mods -O2 -mtune=native -march=native -g -ffree-line-length-none   -c -o m_linalg_interfaces.o m_linalg_interfaces.F90
gfortran: error: unrecognized command line option ‘-march=native’
make[3]: *** [m_linalg_interfaces.o] Error 1
make[3]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/src/01_linalg_ext'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/u0017592/projects/abinit-8.0.8/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/u0017592/projects/abinit-8.0.8'
make: *** [all] Error 2


"-march=native" is not available on this platform -- ideally, if ppc64le is specified, the build system would omit these from the Makefiles. For now this can be worked around by removing them from the Makefiles. You can use this shortcut to remove them:
removemnative.sh

Code: Select all

for line in $(find . -name 'Makefile'); do
     sed -i -e 's/ \-march=native//g' $line
done

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: POWER8 Compatibility: -march=native not available

Post by pouillon » Tue Sep 13, 2016 4:30 pm

This happens because you are using an old version of GCC which is not supported anymore by the build system. Please upgrade your GCC to version 4.8 or above. We currently recommend GCC 5.4 and are working on fully supporting GCC 6.

In the meantime, you can specify optimization flags when running configure to override the build system settings:

Code: Select all

../configure ... CFLAGS_OPTIM="<your flags here>" FCFLAGS_OPTIM="<your flags here>"
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

Locked