[Wien] libxc 5.0.0
Tran, Fabien
fabien.tran at tuwien.ac.at
Sat Jun 20 21:30:32 CEST 2020
Thanks. I will test that myself. Probably we will need this change with i1.
________________________________
From: Wien <wien-bounces at zeus.theochem.tuwien.ac.at> on behalf of Gavin Abo <gsabo at crimson.ua.edu>
Sent: Saturday, June 20, 2020 8:29 PM
To: wien at zeus.theochem.tuwien.ac.at
Subject: Re: [Wien] libxc 5.0.0
Thanks, I made the replacements as you described.
Then, when compiling libxc.F, I got several errors of:
Error: Type mismatch in argument ‘np’ at (1); passed INTEGER(4) to INTEGER(8)
The xc function calls such as
call xc_f90_lda_exc_vxc(xc_func,1,rho(1),exc(1),vrho(1))
were not compiling as the integer value 1 with the gfortran compiler was defaulting it to INTEGER(4) when it needed to be INTEGER(8). Following https://stackoverflow.com/questions/24405760/fortran-passing-numbers-to-subroutines , I defined it to be integer 8:
integer*8 i1
i1 = 1
call xc_f90_lda_exc_vxc(xc_func,i1,rho(1),exc(1),vrho(1))
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:
https://github.com/gsabo/WIEN2k-Patches/tree/master/19.2
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:
username at computername:~/Desktop$ cd ~
username at computername:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
username at computername:~$ gfortran --version
GNU Fortran (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
username at computername:~$ wget http://www.tddft.org/programs/libxc/down.php?file=5.0.0/libxc-5.0.0.tar.gz
...
username at computername:~$ tar xvf down.php\?file\=5.0.0%2Flibxc-5.0.0.tar.gz
...
username at computername:~$ cd libxc-5.0.0/
username at computername:~/libxc-5.0.0$<mailto:username at computername:~/libxc-5.0.0$> autoreconf -i --force
...
username at computername:~/libxc-5.0.0$<mailto:username at computername:~/libxc-5.0.0$> ./configure FC=gfortran CC=gcc --prefix=$HOME/libxc-5.0.0
...
username at computername:~/libxc-5.0.0$<mailto:username at computername:~/libxc-5.0.0$> make
...
username at computername:~/libxc-5.0.0$<mailto:username at computername:~/libxc-5.0.0$> make check
...
PASS: xc-run_testsuite
============================================================================
Testsuite summary for libxc 5.0.0
============================================================================
# TOTAL: 1
# PASS: 1
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
...
username at computername:~/libxc-5.0.0$<mailto:username at computername:~/libxc-5.0.0$> make install
...
username at computername:~/libxc-5.0.0$<mailto:username at computername:~/libxc-5.0.0$> ls ~/libxc-5.0.0/lib
libxc.a libxcf90.a libxcf90.la libxc.la pkgconfig
username at computername:~/libxc-5.0.0$<mailto:username at computername:~/libxc-5.0.0$> cd ~/WIEN2k/SRC_lapw0
username at computername:~/WIEN2k/SRC_lapw0$ wget https://github.com/gsabo/WIEN2k-Patches/raw/master/19.2/inputpars.patch
...
username at computername:~/WIEN2k/SRC_lapw0$ patch -b inputpars.F inputpars.patch
patching file inputpars.F
username at computername:~/WIEN2k/SRC_lapw0$ wget https://github.com/gsabo/WIEN2k-Patches/raw/master/19.2/libxc.patch
...
username at computername:~/WIEN2k/SRC_lapw0$ patch -b libxc.F libxc.patch
patching file libxc.F
username at computername:~/WIEN2k/SRC_lapw0$ cd ..
username at computername:~/WIEN2k$ ./siteconfig
...
Selection: O
...
Selection: X
...
Selection:RS
...
Would you like to use LIBXC (that you have installed - usually not needed)? (y,N):
y
...
Do you want to automatically search for LIBXC installations? (Y,n):
Y
Please specify a comma separated list of directories to search! (If no list is entered, /usr/local and /opt will be searched as default):
/home/username/libxc-5.0.0
...
Pick one of the following (enter the number of the line of your choice or 0 to manually specify a path)!:
/home/username/libxc-5.0.0/src/.libs/libxc.a
/home/username/libxc-5.0.0/lib/libxc.a
2
...
Selection:F
Enter the name of your LIBXC fortran interface!: xcf90
...
Your current LIBXC options are:
LIBXC_OPT: -DLIBXC -I/home/username/libxc-5.0.0/include
LIBXC_LIBS: -L/home/username/libxc-5.0.0/lib -lxcf90 -lxc
...
Selection:B
...
Selection: S
...
Selection: R
...
Selection: S
Which program to recompile? lapw0
...
Compile time errors (if any) were:
Check file compile.msg in the corresponding SRC_* directory for the
compilation log and more info on any compilation problem.
...
On 6/13/2020 3:23 PM, Tran, Fabien wrote:
I think that it is enough to replace all "_f03_" by "_f90_" in libxc.F and inputpars.F of SRC_lapw0.?
________________________________
From: Wien <wien-bounces at zeus.theochem.tuwien.ac.at><mailto:wien-bounces at zeus.theochem.tuwien.ac.at> on behalf of Gavin Abo <gsabo at crimson.ua.edu><mailto:gsabo at crimson.ua.edu>
Sent: Saturday, June 13, 2020 11:02 PM
To: wien at zeus.theochem.tuwien.ac.at<mailto:wien at zeus.theochem.tuwien.ac.at>
Subject: [Wien] libxc 5.0.0
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?
[1] https://www.tddft.org/programs/libxc/download/
[2] https://www.tddft.org/programs/libxc/download/previous/
Thanks,
Gavin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20200620/b19a049c/attachment.html>
More information about the Wien
mailing list