[Pw_forum] Error in compiling QE with libxc

Ari P Seitsonen Ari.P.Seitsonen at iki.fi
Wed Aug 19 14:48:37 CEST 2015


Dear Piyush Kuma,

   A bit unfortunate choice in the code: Here the external library 'libxc' 
is meant [ http://www.tddft.org/programs/octopus/wiki/index.php/Libxc ]. 
You need to compile that and insert the path and libraries into the 
variables in 'make.sys' (not explicitly in any 'Makefile').

   There seems to be a related paper on this: DOI:10.1016/j.cpc.2013.02.020

     Greetings from Sunny Montrouge,

        apsi

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
   Ari Paavo Seitsonen / Ari.P.Seitsonen at iki.fi / http://www.iki.fi/~apsi/
   Ecole Normale Supérieure (ENS), Département de Chimie, Paris
   Mobile (F) : +33 789 37 24 25    (CH) : +41 79 71 90 935


On Wed, 19 Aug 2015, Piyush Kumar wrote:

> Dear all,I am trying to use MGGA functional 'TB09' in quantum espresso
> 5.1.2. When I tried to do calculation with input_dft='tb09', I got following
> error
>  Error in routine tb09 (1):
>      need libxc
> 
> I compiled quantum espresso again by linking it with libxc.f90 in
> espresso-5.1.2/Modules, by manually editing the make files:
> 
> In make.sys:  
> 
> DFLAGS         =  -D__INTEL -D__FFTW -D__MPI -D__PARA -D__LIBXC
> $(MANUAL_DFLAGS)
> 
> In PW/src/Makefile
> 
> MODFLAGS= $(MOD_FLAG)../../iotk/src $(MOD_FLAG)../../Modules -L../../Modules
> -lxcf90 -lxc
> 
> In Modules/Makefile
> 
> MODFLAGS= $(MOD_FLAG)../iotk/src $(MOD_FLAG)../ELPA/src $(MOD_FLAG). -L.
> -lxcf90 -lxc
> 
> In flib/Makefile
> 
> MODFLAGS= $(MOD_FLAG)../iotk/src $(MOD_FLAG)../Modules $(MOD_FLAG).
> -L../Modules -lxcf90 -lxc
> 
> After making above changes, I did "make pw", and I got following errors
> 
> ../../flib/flib.a(functionals.o): In function `slater':
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:31: undefined reference to
> `xc_f90_func_init_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:32: undefined reference to
> `xc_f90_lda_exc_vxc_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:33: undefined reference to
> `xc_f90_func_end_'
> ../../flib/flib.a(functionals.o): In function `pz':
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:169: undefined reference to
> `xc_f90_func_init_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:170: undefined reference to
> `xc_f90_lda_exc_vxc_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:171: undefined reference to
> `xc_f90_func_end_'
> ../../flib/flib.a(functionals.o): In function `pw':
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:374: undefined reference to
> `xc_f90_func_init_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:375: undefined reference to
> `xc_f90_lda_exc_vxc_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:376: undefined reference to
> `xc_f90_func_end_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:374: undefined reference to
> `xc_f90_func_init_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:375: undefined reference to
> `xc_f90_lda_exc_vxc_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:376: undefined reference to
> `xc_f90_func_end_'
> ../../flib/flib.a(functionals.o): In function `pbex':
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:1011: undefined reference
> to `xc_f90_func_init_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:1012: undefined reference
> to `xc_f90_gga_exc_vxc_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:1013: undefined reference
> to `xc_f90_func_end_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:1016: undefined reference
> to `xc_f90_func_init_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:1017: undefined reference
> to `xc_f90_lda_exc_vxc_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:1018: undefined reference
> to `xc_f90_func_end_'
> ../../flib/flib.a(functionals.o): In function `pbec':
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:1222: undefined reference
> to `xc_f90_func_init_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:1223: undefined reference
> to `xc_f90_gga_exc_vxc_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:1224: undefined reference
> to `xc_f90_func_end_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:1226: undefined reference
> to `xc_f90_func_init_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:1227: undefined reference
> to `xc_f90_lda_exc_vxc_'
> /home/piyukr/espresso-5.1.2/flib/functionals.f90:1228: undefined reference
> to `xc_f90_func_end_'
> ../../flib/flib.a(metagga.o): In function `tpsscxc':
> /home/piyukr/espresso-5.1.2/flib/metagga.f90:57: undefined reference to
> `xc_f90_func_init_'
> /home/piyukr/espresso-5.1.2/flib/metagga.f90:58: undefined reference to
> `xc_f90_mgga_exc_vxc_'
> /home/piyukr/espresso-5.1.2/flib/metagga.f90:60: undefined reference to
> `xc_f90_func_end_'
> /home/piyukr/espresso-5.1.2/flib/metagga.f90:68: undefined reference to
> `xc_f90_func_init_'
> /home/piyukr/espresso-5.1.2/flib/metagga.f90:69: undefined reference to
> `xc_f90_mgga_exc_vxc_'
> /home/piyukr/espresso-5.1.2/flib/metagga.f90:71: undefined reference to
> `xc_f90_func_end_'
> ../../flib/flib.a(metagga.o): In function `tb09cxc':
> /home/piyukr/espresso-5.1.2/flib/metagga.f90:1415: undefined reference to
> `xc_f90_func_init_'
> /home/piyukr/espresso-5.1.2/flib/metagga.f90:1416: undefined reference to
> `xc_f90_mgga_vxc_'
> /home/piyukr/espresso-5.1.2/flib/metagga.f90:1418: undefined reference to
> `xc_f90_func_end_'
> /home/piyukr/espresso-5.1.2/flib/metagga.f90:1428: undefined reference to
> `xc_f90_func_init_'
> /home/piyukr/espresso-5.1.2/flib/metagga.f90:1429: undefined reference to
> `xc_f90_mgga_exc_vxc_'
> /home/piyukr/espresso-5.1.2/flib/metagga.f90:1431: undefined reference to
> `xc_f90_func_end_'
> make[2]: *** [pw.x] Error 1
> make[2]: Leaving directory `/home/piyukr/espresso-5.1.2/PW/src'
> make[1]: *** [pw] Error 1
> make[1]: Leaving directory `/home/piyukr/espresso-5.1.2/PW'
> make: *** [pw] Error 1
> 
> I am using intel compilers.
> 
> Can anyone please tell me what is correct way to link libxc?
> Thanking You.
> 
> Piyush Kumar,
> M.Tech. Student
> Indian Institute of Technology (IIT), Kanpur,
> India
> 
>


More information about the users mailing list