abinit icon indicating copy to clipboard operation
abinit copied to clipboard

Compilation Error in etime.c

Open s0vereign opened this issue 5 years ago • 1 comments

Compilation Issue

Hi I'm trying to compile abinit 8.10.3 and I successfully configured abinit with:


../configure --enable-mpi CC=mpicxx CXX=mpicxx FC=mpif90 --enable-netcdf-default --with-fft-flavor="fftw3" --with-fft-incs="-I/sw/installed/FFTW/3.3.8-gompic-2018b/include" --with-fft-libs="-L/sw/installed/FFTW/3.3.8-gompic-2018b/lib"  --with-libxc-incs="-I/sw/installed/libxc/4.3.4-iccifort-2019.1.144-GCC-8.2.0-2.31.1/include" --with-libxc-libs="-L/sw/installed/libxc/4.3.4-iccifort-2019.1.144-GCC-8.2.0-2.31.1/lib -lxc" --with-netcdf-incs="-I/sw/installed/netCDF/4.6.1-intel-2018b/include" --with-netcdf-libs="/sw/installed/netCDF/4.6.1-intel-2018b/lib -lnetcdff -lnetcdf"

This gave me the summary output:

Summary of important options:

  * C compiler      : gnu version 
  * Fortran compiler: gnu version 8.2
  * architecture    : intel xeon (64 bits)

  * debugging       : basic
  * optimizations   : standard

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

  * TRIO   flavor = none
  * TIMER  flavor = abinit (libs: ignored)
  * LINALG flavor = netlib-fallback (libs: ignored)
  * ALGO   flavor = none (libs: ignored)
  * FFT    flavor = fftw3 (libs: user-defined)
  * MATH   flavor = none (libs: ignored)
  * DFT    flavor = none

Configuration complete.
You may now type "make" to build ABINIT.
(or, on a SMP machine, "make mj4", or "make multi multi_nprocs=<n>")

As soon as I am executing make mj4 I am getting the compilation error:


Making all in 02_clib
make[5]: Entering directory `/home/h8/s7549247/git/abinit-8.10.3/tmp/src/02_clib'
mpicxx -DHAVE_CONFIG_H -I. -I../../../src/02_clib -I../..  -I../../src/incs -I../../../src/incs -I/home/s7549247/git/abinit-8.10.3/tmp/fallbacks/exports/include    -g -O2 -mtune=native -march=native   -MT etime.o -MD -MP -MF .deps/etime.Tpo -c -o etime.o ../../../src/02_clib/etime.c
mpif90 -DHAVE_CONFIG_H -I. -I../../../src/02_clib -I../..  -I../../src/incs -I../../../src/incs -I/home/s7549247/git/abinit-8.10.3/tmp/fallbacks/exports/include   -ffree-form -J/home/s7549247/git/abinit-8.10.3/tmp/src/mods -O2 -mtune=native -march=native -g -ffree-line-length-none   -c -o m_clib.o ../../../src/02_clib/m_clib.F90
mpicxx -DHAVE_CONFIG_H -I. -I../../../src/02_clib -I../..  -I../../src/incs -I../../../src/incs -I/home/s7549247/git/abinit-8.10.3/tmp/fallbacks/exports/include    -g -O2 -mtune=native -march=native   -MT progress_bar.o -MD -MP -MF .deps/progress_bar.Tpo -c -o progress_bar.o ../../../src/02_clib/progress_bar.c
mpicxx -DHAVE_CONFIG_H -I. -I../../../src/02_clib -I../..  -I../../src/incs -I../../../src/incs -I/home/s7549247/git/abinit-8.10.3/tmp/fallbacks/exports/include    -g -O2 -mtune=native -march=native   -MT xexit.o -MD -MP -MF .deps/xexit.Tpo -c -o xexit.o ../../../src/02_clib/xexit.c
../../../src/02_clib/etime.c:10:5: error: ‘tt’ was not declared in this scope
    (tt)
     ^~
../../../src/02_clib/etime.c:12:1: error: expected unqualified-id before ‘{’ token
 {
 ^
make[5]: *** [etime.o] Error 1
make[5]: *** Waiting for unfinished jobs....

I am assuming that in the lines of etime.c

double 
FC_FUNC_(etime,ETIME)
   (tt)
float tt[2];
{

the expansion of the macro FC_FUNC_ failed and produces invalid C code. Is this a known compilation issue or are there any hints on how to solve this? I already tried to compile abinit with the timer options none and papi, but I got the same compilation error.

System and compiler information:

mpicc compiler: gcc 8.2.0 mpicxx compiler: g++ 8.2.0 mpif90 compiler: gnufortran 8.2.0

Operating System:

cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.4 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.4"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.4 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.4:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.4
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.4"

s0vereign avatar Aug 08 '19 13:08 s0vereign

../configure --enable-mpi CC=mpicxx CXX=mpicxx FC=mpif90 --enable-netcdf-default --with-fft-flavor="fftw3" --with-fft-incs="-I/sw/installed/FFTW/3.3.8-gompic-2018b/include" --with-fft-libs="-L/sw/installed/FFTW/3.3.8-gompic-2018b/lib" --with-libxc-incs="-I/sw/installed/libxc/4.3.4-iccifort-2019.1.144-GCC-8.2.0-2.31.1/include" --with-libxc-libs="-L/sw/installed/libxc/4.3.4-iccifort-2019.1.144-GCC-8.2.0-2.31.1/lib -lxc" --with-netcdf-incs="-I/sw/installed/netCDF/4.6.1-intel-2018b/include" --with-netcdf-libs="/sw/installed/netCDF/4.6.1-intel-2018b/lib -lnetcdff -lnetcdf"

it seems that you mixed gnu and intel environment...

I see gompic-2018b and intel-2018b...

If you use eb, you can use my config....

https://github.com/jmbeuken/easybuild-easyconfigs/blob/develop/easybuild/easyconfigs/a/ABINIT/ABINIT-8.10.3-intel-2018b.eb

jmbeuken avatar Aug 08 '19 20:08 jmbeuken