Error while compiling Abinit 9.4.2

Hai all,
I got the below error message while compiling abinit 9.4.2.

/home52_fft_mpi_noabirule//iyaddfti_fftrisc.finc/software:/431abinit:- 9.4.2undefined/ srcreference/ 52_fft_mpi_noabiruleto/ dfti_fftrisc.finc`:dfti_free_descriptor_external_479':
undefined reference to `dfti_free_descriptor_external_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:423: undefined reference to `MKL_free'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:424: undefined reference to `MKL_free'
/home/collect2: error: ld returned 1 exit status
iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:429: undefined reference to `dfti_free_descriptor_external_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:430: undefined reference to `dfti_free_descriptor_external_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:431: undefined reference to `dfti_free_descriptor_external_'

../../src/52_fft_mpi_noabirule/lib52_fft_mpi_noabirule.a(m_dfti.o): In function `__m_dfti_MOD_dfti_fftrisc_sp':

/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:632: undefined reference to `dfti_create_descriptor_1d_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:633: undefined reference to `dfti_set_value_intval_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:634: undefined reference to `dfti_set_value_intvec_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:635: undefined reference to `dfti_set_value_intval_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:636: undefined reference to `dfti_set_value_intval_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:639: undefined reference to `dfti_commit_descriptor_external_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:642: undefined reference to `dfti_compute_backward_c_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:644: undefined reference to `dfti_free_descriptor_external_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:672: undefined reference to `dfti_create_descriptor_1d_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:675: undefined reference to `dfti_set_value_intval_'
/home/iyad/softwareMakefile:4333: recipe for target 'abinit' failed
/abinitmake[3]: *** [abinit] Error 1
-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:676: undefined reference to `dfti_set_value_intval_'

I am not sure of what is wrong. Are any packages missing? Can someone help me by giving some comments.

Thanks in advance
Seba

Hi,

we need you configuration file to understand what’s happening.

Hai,
Thank you for the reply. The steps followed are as follows:

  1. ./configure –prefix=/home/iyad/Abinit

  2. Got error and solution provided by abinit to run fallbacks

  3. After running fallbacks –

  4. ./configure --prefix=/home/iyad/software/abinit942 with_libxc=/home/iyad/software/abinit-9.4.2/fallbacks/install_fb/gnu/7.5/libxc/4.3.4 with_netcdf=/home/iyad/software/netcdf with_hdf5=/home/iyad/software/hdf512 with_netcdf_fortran==/home/iyad/software/netcdf

  5. This was successful

  6. Make

7.During make – I got undefined ref. errors.

PATHs Exported-

export PATH=/home/iyad/software/fftw339/bin:$PATH

export LD_LIBRARY_PATH=/home/iyad/software/fftw339/lib:$LD_LIBRARY_PATH

export PATH=/home/iyad/software/hdf512/bin:$PATH

export LD_LIBRARY_PATH=/home/iyad/software/hdf512/lib:$LD_LIBRARY_PATH

Can you please give any suggestions based on the above. Also let me know if you require more information.

Thanks in advance,
Seba

Hi Seba,

7.During make – I got undefined ref. errors.

Can you provide :

  • some undef refs ?
  • the “Final remark” at the end of output of ./configure

jmb

We also need the config.log file.
It seems that the build system is activating HAVE_DFTI

Hai,

Thank you for the reply.

The Steps Followed and errors are as follows:


./configure --prefix=/home/iyad/software/abinit942 \
with_libxc=/home/iyad/software/abinit-9.4.2/fallbacks/install_fb/gnu/7.5/libxc/4.3.4 \ with_netcdf=/home/iyad/software/netcdf \
with_hdf5=/home/iyad/software/hdf512 \ 
with_netcdf_fortran==/home/iyad/software/netcdf

Outcome of ./configure –

==============================================================================

=== Final remarks                                                          ===

==============================================================================

Core build parameters

---------------------

   * C compiler        : gnu version 7.5
  * Fortran compiler  : gnu version 7.5
  * architecture      : intel xeon (64 bits)
  * debugging         : basic
  * optimizations     : standard

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

  * LibXML2 enabled   : no
  * LibPSML enabled   : no
  * XMLF90  enabled   : no
  * HDF5 enabled      : yes (MPI support: yes)
  * NetCDF enabled    : yes (MPI support: yes)
  * NetCDF-F enabled  : yes (MPI support: yes)

  * FFT flavor        : dfti (libs: auto-detected)
  * LINALG flavor     : mkl+openblas (libs: auto-detected)
  * SCALAPACK enabled : no
  * ELPA enabled      : unknown

  * FCFLAGS           : -g -ffree-line-length-none     -I/home/iyad/software/netcdf/include  -I=/home/iyad/software/netcdf/include

  * CPATH             : /opt/intel/oneapi/vpl/2021.2.2/include:/opt/intel/oneapi/tbb/2021.2.0/env/../include:/opt/intel/oneapi/mpi/2021.2.0//include:/opt/intel/oneapi/mkl/latest/include:/opt/intel/oneapi/ipp/2021.2.0/include:/opt/intel/oneapi/ippcp/2021.2.0/include:/opt/intel/oneapi/ipp/2021.2.0/include:/opt/intel/oneapi/dpl/2021.2.0/linux/include:/opt/intel/oneapi/dpcpp-ct/2021.2.0/include:/opt/intel/oneapi/dnnl/2021.2.0/cpu_dpcpp_gpu_dpcpp/lib:/opt/intel/oneapi/dev-utilities/2021.2.0/include:/opt/intel/oneapi/dal/2021.2.0/include:/opt/intel/oneapi/compiler/2021.2.0/linux/include:/opt/intel/oneapi/ccl/2021.2.0/include/cpu_gpu_dpcpp

  * Build workflow    : monolith

0 deprecated options have been used:.

Configuration complete.

You may now type "make" to build Abinit.

(or "make -j<n>", where <n> is the number of available processors)
  1.   Make –j8
    

Outcome of Make

/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:253: undefined reference to `dfti_set_value_intval_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:255: undefined reference to `dfti_commit_descriptor_external_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:423: undefined reference to `MKL_free'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:424: undefined reference to `MKL_free'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:429: undefined reference to `dfti_free_descriptor_external_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:430: undefined reference to `dfti_free_descriptor_external_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:431: undefined reference to `dfti_free_descriptor_external_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:434: undefined reference to `dfti_free_descriptor_external_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:435: undefined reference to `dfti_free_descriptor_external_'
../../src/52_fft_mpi_noabirule/lib52_fft_mpi_noabirule.a(m_dfti.o):/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:436: more undefined references to `dfti_free_descriptor_external_' follow
../../src/52_fft_mpi_noabirule/lib52_fft_mpi_noabirule.a(m_dfti.o): In function `__m_dfti_MOD_dfti_fftrisc_sp':
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:443: undefined reference to `dfti_create_descriptor_1d_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:446: undefined reference to `dfti_set_value_intval_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:447: undefined reference to `dfti_set_value_intvec_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:448: undefined reference to `dfti_set_value_intval_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:449: undefined reference to `dfti_set_value_intval_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:450: undefined reference to `dfti_set_value_dblval_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:452: undefined reference to `dfti_commit_descriptor_external_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:455: undefined reference to `dfti_compute_forward_c_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:479: undefined reference to `dfti_free_descriptor_external_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:423: undefined reference to `MKL_free'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:424: undefined reference to `MKL_free'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:429: undefined reference to `dfti_free_descriptor_external_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:430: undefined reference to `dfti_free_descriptor_external_'
/home/iyad/software/abinit-9.4.2/src/52_fft_mpi_noabirule/dfti_fftrisc.finc:431: undefined reference to `dfti_free_descriptor_external_'
collect2: error: ld returned 1 exit status
Makefile:4333: recipe for target 'abinit' failed
make[3]: *** [abinit] Error 1
make[3]: Leaving directory '/home/iyad/software/abinit-9.4.2/src/98_main'
Makefile:1232: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/iyad/software/abinit-9.4.2/src'
Makefile:1448: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/iyad/software/abinit-9.4.2'
Makefile:1372: recipe for target 'all' failed
make: *** [all] Error 2

I have also attached the config.log along with this for your reference. config.log (209.1 KB)

Hope you could help me with the above information.

Thanks in advance,
Seba

Hi Seba,

There are some problems:

1) you don’t take advantage of the Intel compiler

mpif90 -show
gfortran -I"/home/softs/intel/oneapi/mpi/2021.2.0/include/gfortran/7.5.0"

use mpiifort :

mpiifort -show
ifort -I"/home/softs/intel/oneapi/mpi/2021.2.0//include" …

2) “bad” detection of linalg

LINALG flavor : mkl+openblas !

fix choice of linalg with :

with_linalg_flavor="mkl"
LINALG_CPPFLAGS="-I${MKLROOT}/include"
LINALG_FCFLAGS="-I${MKLROOT}/include"
LINALG_LIBS=" -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl"

3) mix fallbacks is not recommended : libxc from internal FB and “your” netcdf :

with_libxc=/home/iyad/software/abinit-9.4.2/fallbacks/install_fb/gnu/7.5/libxc/4.3.4
with_netcdf=/home/iyad/software/netcdf

At first, it is better to compile all internal FBs with build-abinit-fallbacks.sh script…

Then, create a file “config.ac9” with :

enable_avx_safe_mode="no"
CPP="icc -E"
CC="mpiicc"
CXX="mpiicpc"
FC="mpiifort"
with_mpi="yes"
enable_mpi_io="yes"

with_linalg_flavor="mkl"
LINALG_CPPFLAGS="-I${MKLROOT}/include"
LINALG_FCFLAGS="-I${MKLROOT}/include"
LINALG_LIBS=" -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl"

with_fft_flavor="dfti"
FFT_FCFLAGS="-I${MKLROOT}/include"

with_libxc="/home/iyad/software/abinit-9.4.2/fallbacks/install_fb/.../libxc/4.3.4 "
with_hdf5="/home/iyad/software/abinit-9.4.2/fallbacks/install_fb/.../hdf5/1.10.6"
with_netcdf="/home/iyad/software/abinit-9.4.2/fallbacks/install_fb/.../netcdf4/4.6.3"
with_netcdf_fortran="/home/iyad/software/abinit-9.4.2/fallbacks/install_fb/.../netcdf4_fortran/4.5.2"

enable_netcdf_default="yes"
enable_python_invocation="no"
enable_gw_dpc="yes"

and run :

./configure --with-config-file='config.ac9'

Caution : the four links to the internal fallbacks in config.ac9 are not “complete” : replace them with the links generated by build-abinit-fallbacks.sh

jmb