Fallback compile fail

I am trying to build abinit 9.6.2 with ifort (version 18.0).

When I try to configure abinit, it succeeds with gfortran, but it fails with ifort with this message:

Abinit feature triggers status

The following summary table indicates the status of the feature triggers,
whether they are available and working, how they have been initialized
and whether there are fallbacks to substitute broken ones.

  |Feature         |Enabled |Init    |Working |Fallback|
  |abinit_common   |no      |def     |unknown |no      |
  |bigdft          |no      |def     |unknown |disabled|
  |fft             |yes     |kwd     |yes     |no      |
  |fftw3           |no      |def     |unknown |no      |
  |gpu             |no      |def     |no      |no      |
  |hdf5            |yes     |def     |yes     |disabled|
  |levmar          |no      |def     |unknown |no      |
  |libpaw          |no      |def     |unknown |no      |
  |libpsml         |no      |def     |unknown |disabled|
  |libxc           |yes     |def     |yes     |disabled|
  |libxml2         |no      |def     |unknown |no      |
  |linalg          |yes     |def     |yes     |disabled|
  |mpi             |no      |yon     |no      |no      |
  |netcdf          |yes     |def     |yes     |disabled|
  |netcdf_fortran  |yes     |def     |no      |disabled|
  |papi            |no      |def     |unknown |no      |
  |pfft            |no      |def     |unknown |no      |
  |triqs           |no      |def     |unknown |no      |
  |wannier90       |no      |def     |unknown |disabled|
  |xmlf90          |no      |def     |unknown |disabled|

  | WARNING : NetCDF Fortran is not WORKING !                        |
  | Please specify the installation directory for Netcdf-fortran     |

  | Problems must be solved before continuing                        |

So I tried to go to the fallback option. The fallback file build-abinit-fallbacks.sh does have FC=“ifort”, but when I run build-abinit-fallbacks.sh, I get this error:

checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/barrowes/barrowes/abinit96/abinit-9.6.2/fallbacks/abinit-fallbacks-9.2/sources/libxc-4.3.4/tmp-build':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[2]: *** [Makefile:1196: stamps/libxc-config-stamp] Error 77
make[2]: Leaving directory '/home/barrowes/barrowes/abinit96/abinit-9.6.2/fallbacks/abinit-fallbacks-9.2'
make[1]: [Makefile:1074: all-local] Error 2 (ignored)
Checking build of libxc fallback
test -e stamps/libxc-install-stamp
make[1]: *** [Makefile:1076: all-local] Error 1
make[1]: Leaving directory '/home/barrowes/barrowes/abinit96/abinit-9.6.2/fallbacks/abinit-fallbacks-9.2'
make: *** [Makefile:666: install-recursive] Error 1
We have detected a problem while generating fallbacks : contact Abinit's team


can you sent me the ac9 file and the build-abinit-fallbacks.sh file ?


build-abinit-fallbacks.in (1.7 KB)

crlbeb-ln-r0388.ac9 (38.0 KB)

Extension changed from “sh” to “in” to enable upload.

Thanks for looking in to this.

the ac9 file is ( after remove all lines with comment :

grep -v "#" crlbeb-ln-r0388.ac9 | grep -v "^$"


you need C/C++ compilers to compile some fallbacks…

add in ac9 file :


and you need also define the linalg flavor…
as you use intel compiler, use mkl

then, in the ac9 file add :

LINALG_LIBS="-L${MKLROOT}/lib/intel64 -Wl,--start-group  -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group"

and restart ./configure

crlbeb-ln-r0388.ac9 (38.2 KB)
config.log (207.3 KB)
build-abinit-fallbacks.in (1.8 KB)
configfallback.log (58.6 KB)

I switched over to the most recent oneApi (was using ifort from 2018). I made the changes you suggested, also allowed it to pick dfti instead of goedecker, but it still errored out trying to make the fallbacks.


I propose a complete recipe tested on ubuntu 22 with intel oneAPI 2022.2.1 compiler to compile ABINIT 9.6.2 ( serial code ) with compilation of internal fallbacks.

Needed to compile fallbacks :

sudo apt install m4

Need to facilitate the management of the environment :

sudo apt install environment-modules  
cd /etc/environment-modules/

Installation of intel compiler (see details on Intel site) :

sudo apt install intel-basekit
sudo apt install intel-hpckit
cd /opt/intel/oneapi/
sudo ./modulefiles-setup.sh

Add this line

:warning: if environment-modules was not installed yet, leave your session to activate it…

Installation and compilation of abinit and the internal fallbacks :

wget https://www.abinit.org/sites/default/files/packages/abinit-9.6.2.tar.gz
tar xzf abinit-9.6.2.tar.gz
cd abinit-9.6.2
module purge
module load compiler/latest mkl/latest icc/latest
./configure --with-config-file='crlbeb-ln-r0388.ac9'
cd fallbacks/

Copy the lines generated by the script inside the ac9 file and restart ./configure :
./configure --with-config-file='crlbeb-ln-r0388.ac9'

good luck :wink:

PS : comments welcome !

crlbeb-ln-r0388.ac9 (939 Bytes)