Page 1 of 1

How to enable libxc with abinit

Posted: Wed Nov 20, 2013 8:57 am
by natalie
Dear Forum,
This is probably a silly question, but I have been unable to "enable" libxc with my abinit compilation. For example, using the
configure options (as reported in the config.log file - missing some quotes)
../configure --prefix=/home/natalie/EL6/publiccode/abinit/abinit-7.4.3 --exec-prefix=/home/natalie/EL6/publiccode/abinit/abinit-7.4.3 --enable-mpi --with-mpi-prefix=/rhel6/opt/openmpi/1.6-intel --with-fft-flavor=fftw3-mkl --with-linalg-flavor=mkl --with-dft-flavor=none --with-libxc-incs=-I/home/natalie/EL6/publiccode/libxc/include --with-libxc-libs=-L/home/natalie/EL6/publiccode/libxc/lib -lxc FC=ifort CC=icc CPP=icc -E --no-create --no-recursion

the compilation looks normal but, I am unable to use PAW atomic data files which have been created using the libxc functions. Even though the --with-libxc-libs and --with-libxc-incs commands seem to be recognized, the Makefile is not created with links to the libxc lib and include files:
lib_libxc_fcflags =
lib_libxc_incs =
lib_libxc_ldflags =
lib_libxc_libs =

In this case, the libxc files were already downloaded and compiled in the specified directory and used with atompaw. If I add the
configure option "--enable-libxc" it makes no difference.

When I run abinit with a libxc generated dataset, I get the error message:
Subroutine Unknown:0:ERROR
LibXC was not linked to this version:
recompile with libxc activated to use ixc < 0

Thanks in advance for your suggestions. Natalie

Re: How to enable libxc with abinit

Posted: Thu Nov 21, 2013 10:51 am
by pouillon
Could you attach your config.log?

Re: How to enable libxc with abinit

Posted: Thu Nov 21, 2013 11:24 am
by natalie
Dear Yann,
The file is too big apparently. I tried gzip, but that is not allowed. Can I extract a part of it that you would
like to see? Perhaps I will email you a link to the file. THanks for your help. Natalie

Re: How to enable libxc with abinit  [SOLVED]

Posted: Thu Nov 21, 2013 12:06 pm
by pouillon
I now see where the error is:
../configure --prefix=/home/natalie/EL6/publiccode/abinit/abinit-7.4.3 --exec-prefix=/home/natalie/EL6/publiccode/abinit/abinit-7.4.3 --enable-mpi --with-mpi-prefix=/rhel6/opt/openmpi/1.6-intel --with-fft-flavor=fftw3-mkl --with-linalg-flavor=mkl --with-dft-flavor=none --with-libxc-incs=-I/home/natalie/EL6/publiccode/libxc/include --with-libxc-libs=-L/home/natalie/EL6/publiccode/libxc/lib -lxc FC=ifort CC=icc CPP=icc -E --no-create --no-recursion

Using "none" tells the build system to ignore all DFT-related options. If you use --with-dft-flavor="libxc" instead, it will work as expected.

I will add a warning in the build system to avoid this kind of surprise in the future.

Re: How to enable libxc with abinit

Posted: Thu Nov 21, 2013 4:14 pm
by natalie
Thanks so much! Somehow I thought that the "flavor" attribute was for loading optional packages. Apparently the software is
smart enough to know if you already have the optional packages??? In any case, it now works great. Thanks. Natalie

Re: How to enable libxc with abinit

Posted: Tue Mar 11, 2014 2:54 pm
by rupesh
Hi ,

I have same problem
after configuring I got this error


checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for gfortran... gfortran
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking whether to enable the LINALG fallback... no
checking whether to enable the FOX fallback... no
checking whether to enable the NETCDF fallback... no
checking whether to enable the ETSF_IO fallback... no
checking whether to enable the LIBXC fallback... yes
checking for a source tarball of LIBXC... no
configure: downloading LIBXC - this may take a while
configure: downloading LIBXC - this may take a while
configure: error: could not download LIBXC fallback tarball
Disable support for LIBXC or download the tarball manually to
/home/rupesh/.abinit/tarballs
configure: error: ./configure failed for fallbacks


I tried to download the libxc-2.0.2 file in tarballs and tried to configure it but it didnt work.

Please please , I am expecting step by step procedure to enable abinit-7.4.3 with libxc .
I am attaching config file also, ubuntu.ac

Re: How to enable libxc with abinit

Posted: Sat Mar 15, 2014 9:37 pm
by jbeuken
Hi,

download the libxc-2.0.2.tar.gz file in /home/rupesh/.abinit/tarballs

and try with

Code: Select all

./configure --with-tardir=/home/rupesh/.abinit/tarballs


jmb