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