Page 1 of 1

Problem compiling Abinit 7.3.2 with GCC 4.7.2

Posted: Sun Apr 21, 2013 5:46 pm
by sponce
Dear all,

Using the following configure.ac file:

Code: Select all

enable_mpi="yes"
enable_mpi_io="yes"
enable_64bit_flags="yes"
with_mpi_prefix="/usr/lib/openmpi/"

AR=ar
FC="mpif90"
CC="mpicc"
CXX="mpicxx"

enable_optim="safe"
enable_debug="yes"
enable_clib="yes"

with_fft_flavor="fftw3"
with_dft_flavor="atompaw+libxc"
with-trio-flavor="netcdf+etsf_io"

with-libxc-incs="-I/home/sponce/local/libxc-rev10384/include/"
with-libxc-libs="-L/home/sponce/local/libxc-rev10384/lib"

with_netcdf_incs="-I/home/sponce/local/include/"
with_netcdf_libs="-L/home/sponce/local/lib -lnetcdf -lnetcdff"

enable_test_timeout="yes"

enable_gw_dpc="yes"
enable_gui="no"

CFLAGS="-g -O1"
CXXFLAGS="-g -O1"
FCFLAGS="-g -O1 -ffree-line-length-none"


I got no problem during the configure:
==============================================================================
=== Final remarks ===
==============================================================================


Summary of important options:

* C compiler : gnu version 4.7
* Fortran compiler: gnu version 4.7
* architecture : unknown unknown (64 bits)

* debugging : yes
* optimizations : safe

* OpenMP enabled : no (collapse: ignored)
* MPI enabled : yes
* MPI-IO enabled : yes
* GPU enabled : no (none)

* TRIO flavor = netcdf+etsf_io-fallback
* TIMER flavor = abinit (libs: ignored)
* LINALG flavor = netlib (libs: auto-detected)
* ALGO flavor = none (libs: ignored)
* FFT flavor = fftw3 (libs: auto-detected)
* MATH flavor = none (libs: ignored)
* DFT flavor = libxc-fallback+atompaw-fallback


but while making I got:

Code: Select all

mpif90 -m64 -DHAVE_CONFIG_H -I. -I../../../src/01_interfaces_ext -I../.. -I../../src/incs -I../../../src/incs -I/home/sponce/program/7.3.2-private/build/fallbacks/exports/include   -ffree-form -J/home/sponce/program/7.3.2-private/build/src/mods   -g -O1 -ffree-line-length-none -c -o m_iso_c_bindings.o ../../../src/01_interfaces_ext/m_iso_c_bindings.F90
In file included from ../../../src/01_interfaces_ext/m_iso_c_bindings.F90:28:0:
../../config.h:669:2: error: #error "HAVE_MPI1 and HAVE_MPI2 are both undefined"
make[3]: *** [m_iso_c_bindings.o] Error 1
make[3]: Leaving directory `/home/sponce/program/7.3.2-private/build/src/01_interfaces_ext'


Any ideas?

Cheers !

Samuel

Re: Problem compiling Abinit 7.3.2 with GCC 4.7.2

Posted: Sun Apr 21, 2013 7:11 pm
by gmatteo
Hi Samuel,

Could you post config.log?

BTW: Why are you setting FC, CC and CXX?
I would let the build system find the correct MPI wrappers since the MPI directory has been already specified via with_mpi_prefix

Re: Problem compiling Abinit 7.3.2 with GCC 4.7.2

Posted: Sun Apr 21, 2013 7:32 pm
by sponce
Hello Matteo,

Fair point, I've tried without them and it did not solve the problem.

I've upload the config.log

Thank you,

Samuel

Re: Problem compiling Abinit 7.3.2 with GCC 4.7.2

Posted: Sat Apr 27, 2013 2:08 pm
by sponce
Hey Matteo,

Following your suggestion I've propertly set the mpi_prefix and it work but I still have a problem with fftw3:

../../src/52_fft_mpi_noabirule/lib52_fft_mpi_noabirule.a(m_fftw3.o): In function `__m_fftw3_MOD_fftw3_execute_dft_spc':
/home/sponce/program/7.3.2-private/build/src/52_fft_mpi_noabirule/../../../src/52_fft_mpi_noabirule/m_fftw3.F90:3216: undefined reference to `sfftw_execute_dft_'
../../src/52_fft_mpi_noabirule/lib52_fft_mpi_noabirule.a(m_fftw3.o): In function `__m_fftw3_MOD_cplan_many_dft':
/home/sponce/program/7.3.2-private/build/src/52_fft_mpi_noabirule/../../../src/52_fft_mpi_noabirule/m_fftw3.F90:2909: undefined reference to `sfftw_plan_many_dft_'
../../src/52_fft_mpi_noabirule/lib52_fft_mpi_noabirule.a(m_fftw3.o): In function `__m_fftw3_MOD_fftw3_c2c_op_spc':
/home/sponce/program/7.3.2-private/build/src/52_fft_mpi_noabirule/../../../src/52_fft_mpi_noabirule/m_fftw3.F90:1803: undefined reference to `sfftw_execute_dft_'
../../src/52_fft_mpi_noabirule/lib52_fft_mpi_noabirule.a(m_fftw3.o): In function `__m_fftw3_MOD_fftw3_c2c_ip_spc':
/home/sponce/program/7.3.2-private/build/src/52_fft_mpi_noabirule/../../../src/52_fft_mpi_noabirule/m_fftw3.F90:1556: undefined reference to `sfftw_execute_dft_'
collect2: error: ld returned 1 exit status

with the following .ac file:

Code: Select all

enable_mpi="yes"
enable_mpi_io="yes"
enable_64bit_flags="yes"
with_mpi_prefix="/usr/"

enable_optim="safe"
enable_debug="yes"
enable_clib="yes"

with_fft_flavor="fftw3"
with_fft_incs="-I/home/sponce/local/fftw3/include/"
with_fft_libs="-L/home/sponce/local/fftw3/lib/ -lfftw3"

with_dft_flavor="atompaw+libxc"
with_trio_flavor="netcdf+etsf_io"

with_libxc_incs="-I/home/sponce/local/libxc-rev10384/include/"
with_libxc_libs="-L/home/sponce/local/libxc-rev10384/lib -lxc"

with_netcdf_incs="-I/home/sponce/local/include/"
with_netcdf_libs="-L/home/sponce/local/lib -lnetcdf -lnetcdff"

enable_test_timeout="yes"

enable_gw_dpc="yes"
enable_gui="no"

CFLAGS="-g -O1"
CXXFLAGS="-g -O1"
FCFLAGS="-g -O1 -ffree-line-length-none"


I've enclose the associated config.log.

By the way, why do we have to define "with_netcdf_libs" with underscore _ rather than "-" ? When you type configure --help it tells you to put with-netcdf-libs but it is not working with "-".

Shouldn't the configure --help file updated?

Re: Problem compiling Abinit 7.3.2 with GCC 4.7.2  [SOLVED]

Posted: Sat Apr 27, 2013 5:56 pm
by gmatteo
Hi Samuel,

Starting with version7.3.1, the new version of the ABINIT-FFTW3 wrappers
provides native support for FFTs both in single and double precision.
This is the new option that must be specified in the configuration file:

with_fft_libs="-L/usr/lib -lfftw3 -lfftw3f"

libfftw3f is the single-precision version of FFTW3. Note that you have to enable
the compilation of this library during the configuration of FFTW3

By the way, why do we have to define "with_netcdf_libs" with underscore _ rather than "-" ? When you type configure --help it tells you to put with-netcdf-libs but it is not working with "-".


Because the configuration file uses options in the so-called normalized form.
The rule is simple: take the name of the option expected by configure and replace "-" with "_" everywhere.

Re: [Solved] Problem compiling Abinit 7.3.2 with GCC 4.7.2

Posted: Wed May 01, 2013 11:00 am
by sponce
It worked !

Thank you Matteo.