<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Thanks, I made the replacements as you described.</p>
    <p><br>
    </p>
    <p>Then, when compiling libxc.F, I got several errors of:</p>
    <p><br>
    </p>
    <p>Error: Type mismatch in argument ‘np’ at (1); passed INTEGER(4)
      to INTEGER(8)<br>
    </p>
    <p><br>
    </p>
    <p>The xc function calls such as<br>
    </p>
    <p><br>
    </p>
    <p>call xc_f90_lda_exc_vxc(xc_func,<font color="#ff0000">1</font>,rho(1),exc(1),vrho(1))<br>
    </p>
    <p><br>
    </p>
    <p>were not compiling as the integer value <font color="#ff0000">1</font>
      with the gfortran compiler was defaulting it to INTEGER(4) when it
      needed to be INTEGER(8).  Following
<a class="moz-txt-link-freetext" href="https://stackoverflow.com/questions/24405760/fortran-passing-numbers-to-subroutines">https://stackoverflow.com/questions/24405760/fortran-passing-numbers-to-subroutines</a>
      , I defined it to be integer 8:<br>
    </p>
    <p><br>
    </p>
    <p>integer*8 i1<br>
      i1 = 1<br>
    </p>
    <p>call xc_f90_lda_exc_vxc(xc_func,i1,rho(1),exc(1),vrho(1))<br>
    </p>
    <p><br>
    </p>
    <p>If your interested in the complete set of changes, they can be
      seen in a text editor by looking at inputpars.patch and
      libxc.patch files that should be at:<br>
    </p>
    <p><br>
    </p>
    <p><a class="moz-txt-link-freetext" href="https://github.com/gsabo/WIEN2k-Patches/tree/master/19.2">https://github.com/gsabo/WIEN2k-Patches/tree/master/19.2</a><br>
    </p>
    <p><br>
    </p>
    <p>It is still experimental as I haven't ran any calculations yet
      (or tried compiling it with ifort) to see if there are any
      run-time errors or other problems, but WIEN2k 19.2 with libxc
      5.0.0 did compile with gfortran successfully as shown below:</p>
    <p><br>
    </p>
    <p>username@computername:~/Desktop$ cd ~<br>
      username@computername:~$ lsb_release -a<br>
      No LSB modules are available.<br>
      Distributor ID:    Ubuntu<br>
      Description:    Ubuntu 20.04 LTS<br>
      Release:    20.04<br>
      Codename:    focal<br>
      username@computername:~$ gfortran --version<br>
      GNU Fortran (Ubuntu 9.3.0-10ubuntu2) 9.3.0<br>
      Copyright (C) 2019 Free Software Foundation, Inc.<br>
      This is free software; see the source for copying conditions. 
      There is NO<br>
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
      PURPOSE.<br>
      username@computername:~$ wget
<a class="moz-txt-link-freetext" href="http://www.tddft.org/programs/libxc/down.php?file=5.0.0/libxc-5.0.0.tar.gz">http://www.tddft.org/programs/libxc/down.php?file=5.0.0/libxc-5.0.0.tar.gz</a><br>
      ...<br>
      username@computername:~$ tar xvf
      down.php\?file\=5.0.0%2Flibxc-5.0.0.tar.gz <br>
      ...<br>
      username@computername:~$ cd libxc-5.0.0/<br>
      <a class="moz-txt-link-abbreviated" href="mailto:username@computername:~/libxc-5.0.0$">username@computername:~/libxc-5.0.0$</a> autoreconf -i --force<br>
      ...<br>
      <a class="moz-txt-link-abbreviated" href="mailto:username@computername:~/libxc-5.0.0$">username@computername:~/libxc-5.0.0$</a> ./configure FC=gfortran
      CC=gcc --prefix=$HOME/libxc-5.0.0<br>
      ...<br>
      <a class="moz-txt-link-abbreviated" href="mailto:username@computername:~/libxc-5.0.0$">username@computername:~/libxc-5.0.0$</a> make<br>
      ...<br>
      <a class="moz-txt-link-abbreviated" href="mailto:username@computername:~/libxc-5.0.0$">username@computername:~/libxc-5.0.0$</a> make check<br>
      ...<br>
      PASS: xc-run_testsuite<br>
============================================================================<br>
      Testsuite summary for libxc 5.0.0<br>
============================================================================<br>
      # TOTAL: 1<br>
      # PASS:  1<br>
      # SKIP:  0<br>
      # XFAIL: 0<br>
      # FAIL:  0<br>
      # XPASS: 0<br>
      # ERROR: 0<br>
============================================================================<br>
      ...<br>
      <a class="moz-txt-link-abbreviated" href="mailto:username@computername:~/libxc-5.0.0$">username@computername:~/libxc-5.0.0$</a> make install<br>
      ...<br>
      <a class="moz-txt-link-abbreviated" href="mailto:username@computername:~/libxc-5.0.0$">username@computername:~/libxc-5.0.0$</a> ls ~/libxc-5.0.0/lib<br>
      libxc.a  libxcf90.a  libxcf90.la  libxc.la  pkgconfig<br>
      <a class="moz-txt-link-abbreviated" href="mailto:username@computername:~/libxc-5.0.0$">username@computername:~/libxc-5.0.0$</a> cd ~/WIEN2k/SRC_lapw0<br>
      username@computername:~/WIEN2k/SRC_lapw0$ wget
      <a class="moz-txt-link-freetext" href="https://github.com/gsabo/WIEN2k-Patches/raw/master/19.2/inputpars.patch">https://github.com/gsabo/WIEN2k-Patches/raw/master/19.2/inputpars.patch</a><br>
      ...<br>
      username@computername:~/WIEN2k/SRC_lapw0$ patch -b inputpars.F
      inputpars.patch <br>
      patching file inputpars.F<br>
      username@computername:~/WIEN2k/SRC_lapw0$ wget
      <a class="moz-txt-link-freetext" href="https://github.com/gsabo/WIEN2k-Patches/raw/master/19.2/libxc.patch">https://github.com/gsabo/WIEN2k-Patches/raw/master/19.2/libxc.patch</a><br>
      ...<br>
      username@computername:~/WIEN2k/SRC_lapw0$ patch -b libxc.F
      libxc.patch <br>
      patching file libxc.F<br>
      username@computername:~/WIEN2k/SRC_lapw0$ cd ..<br>
      username@computername:~/WIEN2k$ ./siteconfig<br>
      ...<br>
        Selection: O<br>
      ...<br>
      Selection: X<br>
      ...<br>
      Selection:RS<br>
      ...<br>
       Would you like to use LIBXC (that you have installed - usually
      not needed)? (y,N): <br>
      y<br>
      ...<br>
       Do you want to automatically search for LIBXC installations?
      (Y,n):<br>
      Y<br>
       Please specify a comma separated list of directories to search!
      (If no list is entered, /usr/local and /opt will be searched as
      default):<br>
      /home/username/libxc-5.0.0<br>
      ...<br>
       Pick one of the following (enter the number of the line of your
      choice or 0 to manually specify a path)!:<br>
      /home/username/libxc-5.0.0/src/.libs/libxc.a<br>
      /home/username/libxc-5.0.0/lib/libxc.a<br>
      2<br>
      ...<br>
      Selection:F<br>
      Enter the name of your LIBXC fortran interface!: xcf90<br>
      ...<br>
         Your current LIBXC options are:<br>
         <br>
         LIBXC_OPT:             -DLIBXC
      -I/home/username/libxc-5.0.0/include<br>
         LIBXC_LIBS:            -L/home/username/libxc-5.0.0/lib -lxcf90
      -lxc<br>
      ...<br>
      Selection:B<br>
      ...<br>
      Selection: S<br>
      ...<br>
        Selection: R<br>
      ...<br>
           Selection: S<br>
         Which program to recompile? lapw0<br>
      ...<br>
      Compile time errors (if any) were:<br>
      <br>
      <br>
      Check file   compile.msg   in the corresponding SRC_* directory
      for the <br>
      compilation log and more info on any compilation problem.<br>
      ...<br>
      <br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 6/13/2020 3:23 PM, Tran, Fabien
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:1592083419849.68979@tuwien.ac.at">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
      <p>I think that it is enough to replace all "_f03_" by "_f90_" i<span
          style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 16px; background-color: rgb(255, 255, 255);">n
          libxc.F and </span><span style="font-family: Calibri, Arial,
          Helvetica, sans-serif; font-size: 16px; background-color:
          rgb(255, 255, 255);">inputpars.F</span><span
          style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 16px; background-color: rgb(255, 255, 255);"> of
          SRC_lapw0.</span>​<br>
      </p>
      <p><br>
      </p>
      <div style="color: rgb(33, 33, 33);">
        <hr tabindex="-1" style="display:inline-block; width:98%">
        <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
            face="Calibri, sans-serif" color="#000000"><b>From:</b> Wien
            <a class="moz-txt-link-rfc2396E" href="mailto:wien-bounces@zeus.theochem.tuwien.ac.at"><wien-bounces@zeus.theochem.tuwien.ac.at></a> on behalf of
            Gavin Abo <a class="moz-txt-link-rfc2396E" href="mailto:gsabo@crimson.ua.edu"><gsabo@crimson.ua.edu></a><br>
            <b>Sent:</b> Saturday, June 13, 2020 11:02 PM<br>
            <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:wien@zeus.theochem.tuwien.ac.at">wien@zeus.theochem.tuwien.ac.at</a><br>
            <b>Subject:</b> [Wien] libxc 5.0.0</font>
          <div> </div>
        </div>
        <div>
          <p>The libxc website [1] has a new version 5.0.0, but it
            doesn't compile with WIEN2k (version 19.2).  I have linked
            in libxc 4.3.4 from [2] instead.  Does anyone have a patch
            for using the version 5.0.0?</p>
          <p><font face="Times New Roman">[1] <a
                class="moz-txt-link-freetext"
                href="https://www.tddft.org/programs/libxc/download/"
                moz-do-not-send="true">
                https://www.tddft.org/programs/libxc/download/</a></font></p>
          <p><font face="Times New Roman">[2] <a
                class="moz-txt-link-freetext"
                href="https://www.tddft.org/programs/libxc/download/previous/"
                moz-do-not-send="true">
                https://www.tddft.org/programs/libxc/download/previous/</a></font></p>
          <p>Thanks,</p>
          <p>Gavin</p>
        </div>
      </div>
    </blockquote>
  </body>
</html>