Page 1 of 1

Abinit 7.2.1 GCC 4.7 compilation problem

Posted: Wed Apr 03, 2013 6:43 pm
by yurtesen
checking whether we are using the GNU Fortran compiler... no
checking whether mpif90 accepts -g... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
libtool.m4: error: problem compiling FC test program
checking for mpif90 option to produce PIC...
checking if mpif90 static flag works... no
checking if mpif90 supports -c -o file.o... no
checking if mpif90 supports -c -o file.o... (cached) no
checking whether the mpif90 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for Fortran flag to compile .f90 files... unknown
configure: error: Fortran could not compile .f90 files
make[3]: *** [stamps/libxc-config-stamp] Error 1
make[3]: Leaving directory `/home/eyurtese/tmp/abinit-7.2.1/fallbacks'
make[2]: [all-local] Error 2 (ignored)
Checking build of libxc fallback
test -e stamps/libxc-install-stamp
make[2]: *** [all-local] Error 1
make[2]: Leaving directory `/home/eyurtese/tmp/abinit-7.2.1/fallbacks'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/eyurtese/tmp/abinit-7.2.1'
make: *** [all] Error 2


and ./fallbacks/sources/libxc-2.0.1/config.log shows

configure:13186: checking for Fortran compiler version
configure:13195: mpif90 --version >&5
GNU Fortran (Abo Akademi http://www.abo.fi/) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

configure:13206: $? = 0
configure:13195: mpif90 -v >&5
mpif90 for MVAPICH2 version 1.9b
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/export/modules/compilers/gnu/gcc/4.7.2/libexec/gcc/x86_64-unknown-linux-gnu/4.7.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/export/modules/compilers/gnu/gcc/4.7.2 --enable-languages=c,c++,fortran --disable-multilib --with-pkgversion='Abo Akademi http://www.abo.fi/'
Thread model: posix
gcc version 4.7.2 (Abo Akademi http://www.abo.fi/)
configure:13206: $? = 0
configure:13195: mpif90 -V >&5
gfortran: error: unrecognized command line option '-V'
configure:13206: $? = 1
configure:13195: mpif90 -qversion >&5
gfortran: error: unrecognized command line option '-qversion'
configure:13206: $? = 1
configure:13215: checking whether we are using the GNU Fortran compiler
configure:13228: mpif90 -c -ffree-form -g -ffree-line-length-none -03 -mtune=native -march=native -faggressive-function-elimination -fstack-arrays -g -O2 -I/home/eyurtese/tmp/abinit-7.2.1/fallbacks/exports/include conftest.F >&5
gfortran: error: unrecognized command line option '-03'
configure:13228: $? = 1
configure: failed program was:
| program main
| #ifndef __GNUC__
| choke me
| #endif
|
| end
configure:13237: result: no
configure:13243: checking whether mpif90 accepts -g
configure:13254: mpif90 -c -g conftest.F90 >&5
configure:13254: $? = 0
configure:13262: result: yes
configure:13406: checking if libtool supports shared libraries
configure:13408: result: yes
configure:13411: checking whether to build shared libraries
configure:13431: result: no
configure:13434: checking whether to build static libraries
configure:13438: result: yes
configure:13472: mpif90 -c -ffree-form -g -ffree-line-length-none -03 -mtune=native -march=native -faggressive-function-elimination -fstack-arrays -g -O2 -I/home/eyurtese/tmp/abinit-7.2.1/fallbacks/exports/include conftest.F90 >&5
gfortran: error: unrecognized command line option '-03'
configure:13475: $? = 1
configure:13922: checking for mpif90 option to produce PIC
configure:13929: result:
configure:13995: checking if mpif90 static flag works
configure:14023: result: no
configure:14035: checking if mpif90 supports -c -o file.o
configure:14056: mpif90 -c -ffree-form -g -ffree-line-length-none -03 -mtune=native -march=native -faggressive-function-elimination -fstack-arrays -g -O2 -I/home/eyurtese/tmp/abinit-7.2.1/fallbacks/exports/include -o out/conftest2.o conftest.F90 >&5
gfortran: error: unrecognized command line option '-03'
configure:14060: $? = 1
configure:14082: result: no
configure:14087: checking if mpif90 supports -c -o file.o
configure:14134: result: no
configure:14164: checking whether the mpif90 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries
configure:15267: result: yes
configure:15408: checking dynamic linker characteristics
configure:16073: result: GNU/Linux ld.so
configure:16126: checking how to hardcode library paths into programs
configure:16151: result: immediate
configure:16197: checking for Fortran flag to compile .f90 files
configure:16213: mpif90 -c -ffree-form -g -ffree-line-length-none -03 -mtune=native -march=native -faggressive-function-elimination -fstack-arrays -g -O2 -I/home/eyurtese/tmp/abinit-7.2.1/fallbacks/exports/include conftest.f90 >&5
gfortran: error: unrecognized command line option '-03'
configure:16213: $? = 1
configure: failed program was:
| program main
|
| end
configure:16213: mpif90 -c -ffree-form -g -ffree-line-length-none -03 -mtune=native -march=native -faggressive-function-elimination -fstack-arrays -g -O2 -I/home/eyurtese/tmp/abinit-7.2.1/fallbacks/exports/include -qsuffix=f=f90 conftest.f90 >&5
gfortran: error: unrecognized command line option '-03'
gfortran: error: unrecognized command line option '-qsuffix=f=f90'
configure:16213: $? = 1
configure: failed program was:
| program main
|
| end
configure:16213: mpif90 -c -ffree-form -g -ffree-line-length-none -03 -mtune=native -march=native -faggressive-function-elimination -fstack-arrays -g -O2 -I/home/eyurtese/tmp/abinit-7.2.1/fallbacks/exports/include -Tf conftest.f90 >&5
gfortran: error: unrecognized command line option '-03'
configure:16213: $? = 1
configure: failed program was:
| program main
|
| end
configure:16222: result: unknown
configure:16225: error: Fortran could not compile .f90 files


I couldnt quite figure out why it would say it does not recognize -O3 ? I used to be able to compile other 6.x and 7.x versions in the past with same options...

Thanks,
Evren

Re: Abinit 7.2.1 GCC 4.7 compilation problem

Posted: Wed Apr 03, 2013 6:52 pm
by yurtesen
ah right, it seems to use 03 and not O3!!!

Now I wonder, is this a known bug? somebody put 0 instead of O into files or did I do this somehow?

Re: Abinit 7.2.1 GCC 4.7 compilation problem

Posted: Wed Apr 03, 2013 9:59 pm
by jbeuken
Hi Evren,

I quickly installed mpich3.0.3/gcc4.7.2 under CentOS 6.3
I compiled 7.2.1 with all fallbacks without problem 8-)

I run the tests fast and parallel : no error 8-)

this is my build.ac ( use : ./configure --with-config-file=./build.ac )

Code: Select all

enable_gw_dpc = yes
enable_mpi = yes
enable_mpi_io = yes
enable_openmp = yes
with_mpi_prefix = /usr/local/mpich3_gcc47
with_mpi_level = 1
with_dft_flavor = atompaw+bigdft+libxc+wannier90
with_trio_flavor = netcdf+etsf_io+fox
with_linalg_flavor = netlib
with_linalg_incs = -I/usr/local/include
with_linalg_libs = -L/usr/local/lib64 -llapack -lblas


see the post http://forum.abinit.org/viewtopic.php?f=3&t=1990 concerning the parameter : "with_mpi_level=1"

then, it seems that your problem is not related to mpich3 and/or gcc 4.7.x

jmb

Re: Abinit 7.2.1 GCC 4.7 compilation problem  [SOLVED]

Posted: Tue Apr 09, 2013 5:39 pm
by pouillon
This is a typo in default optimization flags for Abinit. Fixed in 7.2.2.