[SOLVED] Multibinit spin model fail

Dear all,

I was running multibinit on abinit-9.6.1 and it says “Cannot read xml file. Please install abinit with libxml enabled.”

Then I tried as suggested in the user guide to add these line in the config file

enable_xml=“yes”
CFLAGS_EXTRA=“xml2-config --cflags
FC_LIBS_EXTRA=“xml2-config --libs

Then I get the message where it says libxml2 is not enabled

±---------------±-------±-------±-------±-------+
|Feature |Enabled |Init |Working |Fallback|
±---------------±-------±-------±-------±-------+
|abinit_common |no |def |unknown |no |
|bigdft |no |def |unknown |disabled|
|fft |yes |kwd |yes |no |
|fftw3 |yes |env |yes |no |
|gpu |no |def |no |no |
|hdf5 |yes |dir |yes |disabled|
|levmar |no |def |unknown |no |
|libpaw |no |def |unknown |no |
|libpsml |no |def |unknown |disabled|
|libxc |yes |dir |yes |disabled|
|libxml2 |no |def |unknown |no |
|linalg |yes |env |yes |disabled|
|mpi |yes |dir |yes |no |
|netcdf |yes |dir |yes |disabled|
|netcdf_fortran |yes |dir |yes |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|
±---------------±-------±-------±-------±-------+

Here is my complete config file

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

MPI support

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

* the build system expects to find subdirectories named bin/, lib/,

include/ inside the with_mpi directory

with_mpi=$HOME/local/

Flavor of linear algebra libraries to use (default is netlib)

with_linalg_flavor=“openblas”

Library flags for linear algebra (default is unset)

LINALG_LIBS=“-L$HOME/local/lib -lopenblas”

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

Optimized FFT support

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

Flavor of FFT framework to support (default is auto)

The high-level interface does not work yet so we pass options explicitly

#with_fftw3=“$HOME/local/lib”

Explicit options for fftw3

with_fft_flavor=“fftw3”
FFTW3_LIBS=“-L$HOME/local/lib -lfftw3f -lfftw3”
FFTW3_FCFLAGS=“-L$HOME/local/include”

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

LibXC

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

Install prefix for LibXC (default is unset)

with_libxc=“$HOME/local”

Explicit options for libxc

#LIBXC_LIBS=“-L$HOME/local/lib -lxcf90 -lxc”
#LIBXC_FCFLAGS=“-I$HOME/local/include”

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

NetCDF

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

install prefix for NetCDF (default is unset)

with_netcdf=(nc-config --prefix) with_netcdf_fortran=(nf-config --prefix)

Explicit options for netcdf

#with_netcdf=“yes”
#NETCDF_FORTRAN_LIBS=nf-config --flibs
#NETCDF_FORTRAN_FCFLAGS=nf-config --fflags

install prefix for HDF5 (default is unset)

with_hdf5=“$HOME/local”

Explicit options for hdf5

#HDF5_LIBS=nf-config --flibs
#HDF5_FCFLAGS=nf-config --fflags

Enable OpenMP (default is no)

enable_openmp=“no”

#with_trio_flavor=“netcdf”
enable_xml=“yes”
CFLAGS_EXTRA=“xml2-config --cflags
FC_LIBS_EXTRA=“xml2-config --libs

Many thanks for your help to fix this problem.

Hi,

enable_xml=“yes” is removed

use : --with-libxml2=“yes”

libxml2 is not a fallback : you need to install the package

ubuntu :
dpkg -l | grep libxml2
ii libxml-libxml-perl 2.0128+dfsg-5 amd64 Perl interface to the libxml2 library
ii libxml2:amd64

centos 8
rpm -qa | grep libxml2
libxml2-devel-2.9.7-9.el8_4.2.x86_64
libxml2-2.9.7-9.el8_4.2.x86_6

what is the output of :

xml2-config --cflags

I have the impression that you are using an old “.ac” file from version 8.x of abinit…

Yes, this is also my impression. The --with-libxml2 option should be enough in all cases, since libxml2 is required on all Linux distributions. What could happen in some cases is that LD_LIBRARY_PATH is not properly set, in which case you would have to specify LIBXML2_CPPFLAGS, LIBXML2_FCFLAGS and LIBXML2_LIBS.

In any case, I highly recommend starting again the configuration from the doc/build/config-template.ac9 file.

Dear All,

I just disabled those three lines and added these two

with_fallbacks=“yes”
with_libxml2=“yes”

and then it works :grinning:.

Thanks!
R