Compiling with oneAPI compilers

Hi all,

I am trying to compile Abinit with oneAPI compilers 2025, and am getting the following error during configuration:

checking whether the MPI C API works... yes
checking whether the MPI C environment works... yes
checking whether the MPI C++ API works... yes
checking whether the MPI C++ environment works... yes
checking whether the MPI Fortran API works... no
checking whether the MPI Fortran environment works... no
configure: error: in `/gpfs/users/moricec/applications/abinit-10.6.3':
configure: error: MPI support does not work

The config.ac9 file (where I removed details of the paths to libraries for clarity) is:

enable_avx_safe_mode="no"
CPP="icx -E"
CC="mpiicx"
CXX="mpiicpx"
FC="mpiifx"
enable_mpi_io="yes"

LINALG_CPPFLAGS="-I${MKLROOT}/include"
LINALG_CFLAGS="-I${MKLROOT}/include"
LINALG_CXXFLAGS="-I${MKLROOT}/include"
LINALG_FCFLAGS="-I${MKLROOT}/include"
LINALG_LDFLAGS="-L${MKLROOT}/lib -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lm -ldl -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64"
LINALG_LIBS="-L${MKLROOT}/lib -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lm -ldl"

with_libxc="/gpfs/softs/spack_1.0.2/opt/spack/.../bin"
with_hdf5="/gpfs/softs/spack_1.0.2/opt/spack/.../"
with_netcdf="/gpfs/softs/spack_1.0.2/opt/spack/linux-cascadelake/.../"
with_netcdf_fortran="/gpfs/softs/spack_1.0.2/opt/spack/.../"

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

I attach the config.log. I have tried many variations of this, without success. Would you have an idea of what the problem could be?

Best regards,

config.log (208.3 KB)

Hi all,

I solved this first problem by unsetting CC, CXX and FC before compiling. There is however an issue with using the HDF5 and NetCDF libraries installed on the cluster:

configure: WARNING: invalid HDF5 configuration
configure: WARNING: invalid NetCDF configuration

I attach the config.log file. Any help would be greatly appreciated.

Best regards,

config.log (478.0 KB)

In general, you have to take precautions that HDF5 and NetCDF are compiled in exactly the same way as the rest, with the same compiler, etc. If you’re having problems with the libraries provided on your cluster, the safest approach would be to recompile those libraries in the fallbacks.

Note that some people have reported problems with using NetCDF with the oneAPI compilers. I would suggest using the gfortran compiler instead.