<div dir="ltr">Thanks a lot,<div>I tried specifying the library in LD_LIBS as LD_LIBS = /home/piyukr/Software/libxc-2.1.2/lib/libxc.a and its working now.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 19, 2015 at 7:52 PM, Ari P Seitsonen <span dir="ltr"><<a href="mailto:Ari.P.Seitsonen@iki.fi" target="_blank">Ari.P.Seitsonen@iki.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Dear Piyush Kumar,<br>
<br>
  Why do you try to modify 'MODFLAGS', not 'LD_LIBS'? These are external routines, 'Modules/libxc.f90' only provides interfaces to them, if I see correctly.<br>
<br>
    Greetings,<span class=""><br>
<br>
       apsi<br>
<br>
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-<br>
  Ari Paavo Seitsonen / <a href="mailto:Ari.P.Seitsonen@iki.fi" target="_blank">Ari.P.Seitsonen@iki.fi</a> / <a href="http://www.iki.fi/~apsi/" rel="noreferrer" target="_blank">http://www.iki.fi/~apsi/</a><br>
  Ecole Normale Supérieure (ENS), Département de Chimie, Paris<br>
  Mobile (F) : +33 789 37 24 25    (CH) : +41 79 71 90 935<br>
<br>
<br>
On Wed, 19 Aug 2015, Piyush Kumar wrote:<br>
<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear Apsi,Thanks for the reply. I installed libxc-2.1.2 and again compiled<div><div class="h5"><br>
QE, with the following changes in make.sys<br>
<br>
MANUAL_DFLAGS  =<br>
DFLAGS         =  -D__INTEL -D__FFTW -D__MPI -D__PARA -D__LIBXC<br>
$(MANUAL_DFLAGS)<br>
FDFLAGS        = $(DFLAGS) $(MANUAL_DFLAGS)<br>
MODFLAGS       = -L/home/piyukr/Software/libxc-2.1.2/lib -lxcf90 -lxc      <br>
(This line has been added)<br>
<br>
where /home/piyukr/Software/libxc-2.1.2 is the installation directory<br>
 <br>
I am still getting the same error. Can you please tell me which variable I<br>
need to edit or add and with what values?<br>
<br>
Thanking you,<br>
Piyush<br>
<br>
<br>
On Wed, Aug 19, 2015 at 6:18 PM, Ari P Seitsonen <<a href="mailto:Ari.P.Seitsonen@iki.fi" target="_blank">Ari.P.Seitsonen@iki.fi</a>><br>
wrote:<br>
<br>
      Dear Piyush Kuma,<br>
<br>
        A bit unfortunate choice in the code: Here the external<br>
      library 'libxc' is meant [<br>
      <a href="http://www.tddft.org/programs/octopus/wiki/index.php/Libxc" rel="noreferrer" target="_blank">http://www.tddft.org/programs/octopus/wiki/index.php/Libxc</a> ].<br>
      You need to compile that and insert the path and libraries into<br>
      the variables in 'make.sys' (not explicitly in any 'Makefile').<br>
<br>
        There seems to be a related paper on this:<br>
      DOI:10.1016/j.cpc.2013.02.020<br>
<br>
          Greetings from Sunny Montrouge,<br>
<br>
             apsi<br>
<br>
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*<br>
      =-<br>
        Ari Paavo Seitsonen / <a href="mailto:Ari.P.Seitsonen@iki.fi" target="_blank">Ari.P.Seitsonen@iki.fi</a> /<br>
      <a href="http://www.iki.fi/~apsi/" rel="noreferrer" target="_blank">http://www.iki.fi/~apsi/</a><br>
        Ecole Normale Supérieure (ENS), Département de Chimie, Paris<br>
        Mobile (F) : +33 789 37 24 25    (CH) : +41 79 71 90 935<br>
<br>
<br>
      On Wed, 19 Aug 2015, Piyush Kumar wrote:<br>
<br>
            Dear all,I am trying to use MGGA functional 'TB09'<br>
            in quantum espresso<br>
            5.1.2. When I tried to do calculation with<br>
            input_dft='tb09', I got following<br>
            error<br>
             Error in routine tb09 (1):<br>
                 need libxc<br>
<br>
            I compiled quantum espresso again by linking it with<br>
            libxc.f90 in<br>
            espresso-5.1.2/Modules, by manually editing the make<br>
            files:<br>
<br>
            In make.sys:  <br>
<br>
            DFLAGS         =  -D__INTEL -D__FFTW -D__MPI<br>
            -D__PARA -D__LIBXC<br>
            $(MANUAL_DFLAGS)<br>
<br>
            In PW/src/Makefile<br>
<br>
            MODFLAGS= $(MOD_FLAG)../../iotk/src<br>
            $(MOD_FLAG)../../Modules -L../../Modules<br>
            -lxcf90 -lxc<br>
<br>
            In Modules/Makefile<br>
<br>
            MODFLAGS= $(MOD_FLAG)../iotk/src<br>
            $(MOD_FLAG)../ELPA/src $(MOD_FLAG). -L.<br>
            -lxcf90 -lxc<br>
<br>
            In flib/Makefile<br>
<br>
            MODFLAGS= $(MOD_FLAG)../iotk/src<br>
            $(MOD_FLAG)../Modules $(MOD_FLAG).<br>
            -L../Modules -lxcf90 -lxc<br>
<br>
            After making above changes, I did "make pw", and I<br>
            got following errors<br>
<br>
            ../../flib/flib.a(functionals.o): In function<br>
            `slater':<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:31:<br>
            undefined reference to<br>
            `xc_f90_func_init_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:32:<br>
            undefined reference to<br>
            `xc_f90_lda_exc_vxc_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:33:<br>
            undefined reference to<br>
            `xc_f90_func_end_'<br>
            ../../flib/flib.a(functionals.o): In function `pz':<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:169:<br>
            undefined reference to<br>
            `xc_f90_func_init_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:170:<br>
            undefined reference to<br>
            `xc_f90_lda_exc_vxc_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:171:<br>
            undefined reference to<br>
            `xc_f90_func_end_'<br>
            ../../flib/flib.a(functionals.o): In function `pw':<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:374:<br>
            undefined reference to<br>
            `xc_f90_func_init_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:375:<br>
            undefined reference to<br>
            `xc_f90_lda_exc_vxc_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:376:<br>
            undefined reference to<br>
            `xc_f90_func_end_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:374:<br>
            undefined reference to<br>
            `xc_f90_func_init_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:375:<br>
            undefined reference to<br>
            `xc_f90_lda_exc_vxc_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:376:<br>
            undefined reference to<br>
            `xc_f90_func_end_'<br>
            ../../flib/flib.a(functionals.o): In function<br>
            `pbex':<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:1011:<br>
            undefined reference<br>
            to `xc_f90_func_init_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:1012:<br>
            undefined reference<br>
            to `xc_f90_gga_exc_vxc_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:1013:<br>
            undefined reference<br>
            to `xc_f90_func_end_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:1016:<br>
            undefined reference<br>
            to `xc_f90_func_init_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:1017:<br>
            undefined reference<br>
            to `xc_f90_lda_exc_vxc_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:1018:<br>
            undefined reference<br>
            to `xc_f90_func_end_'<br>
            ../../flib/flib.a(functionals.o): In function<br>
            `pbec':<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:1222:<br>
            undefined reference<br>
            to `xc_f90_func_init_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:1223:<br>
            undefined reference<br>
            to `xc_f90_gga_exc_vxc_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:1224:<br>
            undefined reference<br>
            to `xc_f90_func_end_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:1226:<br>
            undefined reference<br>
            to `xc_f90_func_init_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:1227:<br>
            undefined reference<br>
            to `xc_f90_lda_exc_vxc_'<br>
            /home/piyukr/espresso-5.1.2/flib/functionals.f90:1228:<br>
            undefined reference<br>
            to `xc_f90_func_end_'<br>
            ../../flib/flib.a(metagga.o): In function `tpsscxc':<br>
            /home/piyukr/espresso-5.1.2/flib/metagga.f90:57:<br>
            undefined reference to<br>
            `xc_f90_func_init_'<br>
            /home/piyukr/espresso-5.1.2/flib/metagga.f90:58:<br>
            undefined reference to<br>
            `xc_f90_mgga_exc_vxc_'<br>
            /home/piyukr/espresso-5.1.2/flib/metagga.f90:60:<br>
            undefined reference to<br>
            `xc_f90_func_end_'<br>
            /home/piyukr/espresso-5.1.2/flib/metagga.f90:68:<br>
            undefined reference to<br>
            `xc_f90_func_init_'<br>
            /home/piyukr/espresso-5.1.2/flib/metagga.f90:69:<br>
            undefined reference to<br>
            `xc_f90_mgga_exc_vxc_'<br>
            /home/piyukr/espresso-5.1.2/flib/metagga.f90:71:<br>
            undefined reference to<br>
            `xc_f90_func_end_'<br>
            ../../flib/flib.a(metagga.o): In function `tb09cxc':<br>
            /home/piyukr/espresso-5.1.2/flib/metagga.f90:1415:<br>
            undefined reference to<br>
            `xc_f90_func_init_'<br>
            /home/piyukr/espresso-5.1.2/flib/metagga.f90:1416:<br>
            undefined reference to<br>
            `xc_f90_mgga_vxc_'<br>
            /home/piyukr/espresso-5.1.2/flib/metagga.f90:1418:<br>
            undefined reference to<br>
            `xc_f90_func_end_'<br>
            /home/piyukr/espresso-5.1.2/flib/metagga.f90:1428:<br>
            undefined reference to<br>
            `xc_f90_func_init_'<br>
            /home/piyukr/espresso-5.1.2/flib/metagga.f90:1429:<br>
            undefined reference to<br>
            `xc_f90_mgga_exc_vxc_'<br>
            /home/piyukr/espresso-5.1.2/flib/metagga.f90:1431:<br>
            undefined reference to<br>
            `xc_f90_func_end_'<br>
            make[2]: *** [pw.x] Error 1<br>
            make[2]: Leaving directory<br>
            `/home/piyukr/espresso-5.1.2/PW/src'<br>
            make[1]: *** [pw] Error 1<br>
            make[1]: Leaving directory<br>
            `/home/piyukr/espresso-5.1.2/PW'<br>
            make: *** [pw] Error 1<br>
<br>
            I am using intel compilers.<br>
<br>
            Can anyone please tell me what is correct way to<br>
            link libxc?<br>
            Thanking You.<br>
<br>
            Piyush Kumar,<br>
            M.Tech. Student<br>
            Indian Institute of Technology (IIT), Kanpur,<br>
            India<br>
<br>
<br>
_______________________________________________<br>
Pw_forum mailing list<br>
<a href="mailto:Pw_forum@pwscf.org" target="_blank">Pw_forum@pwscf.org</a><br>
<a href="http://pwscf.org/mailman/listinfo/pw_forum" rel="noreferrer" target="_blank">http://pwscf.org/mailman/listinfo/pw_forum</a><br>
<br>
<br>
<br>
</div></div></blockquote>
</blockquote></div><br></div>