[Pw_forum] Error in compiling QE with libxc

Piyush Kumar piyushkr1990 at gmail.com
Wed Aug 19 14:30:26 CEST 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20150819/b5e21b67/attachment.html>


More information about the users mailing list