How to enable libxc with abinit  [SOLVED]

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
natalie
Posts: 16
Joined: Sun Jan 17, 2010 10:24 pm

How to enable libxc with abinit

Post by natalie » Wed Nov 20, 2013 8:57 am

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

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: How to enable libxc with abinit

Post by pouillon » Thu Nov 21, 2013 10:51 am

Could you attach your config.log?
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

natalie
Posts: 16
Joined: Sun Jan 17, 2010 10:24 pm

Re: How to enable libxc with abinit

Post by natalie » Thu Nov 21, 2013 11:24 am

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

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: How to enable libxc with abinit  [SOLVED]

Post by pouillon » Thu Nov 21, 2013 12:06 pm

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.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

natalie
Posts: 16
Joined: Sun Jan 17, 2010 10:24 pm

Re: How to enable libxc with abinit

Post by natalie » Thu Nov 21, 2013 4:14 pm

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

rupesh
Posts: 1
Joined: Tue Mar 11, 2014 1:56 pm

Re: How to enable libxc with abinit

Post by rupesh » Tue Mar 11, 2014 2:54 pm

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

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: How to enable libxc with abinit

Post by jbeuken » Sat Mar 15, 2014 9:37 pm

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
------
Jean-Michel Beuken
Computer Scientist

Locked