dftbplus / skprogs

Basic programs for generating Slater-Koster files for the DFTB-method
GNU Lesser General Public License v3.0
25 stars 19 forks source link

Incompatibility with Libxc 5.1.2 #2

Closed ezpzbz closed 2 years ago

ezpzbz commented 3 years ago

Hi. Thanks for open sourcing the package. I realized that linking against libxc 5.1.2 does not result in successfull build with following trimmed error log:

[ 64%] Building Fortran object slateratom/lib/CMakeFiles/skprogs-slateratom.dir/dft.f90.o
/home/pezhman/repos/dev/skprogs/slateratom/lib/dft.f90:67:27:

   67 |     type(xc_f90_pointer_t) :: xcfunc_x, xcfunc_c, xcinfo
      |                           1
Error: Derived type ‘xc_f90_pointer_t’ at (1) is being used before it is defined
/home/pezhman/repos/dev/skprogs/slateratom/lib/dft.f90:78:36:

   78 |       call xc_f90_func_init(xcfunc_c, xcinfo, XC_LDA_C_PW, XC_POLARIZED)
      |                                    1
Error: Symbol ‘xcfunc_c’ at (1) has no IMPLICIT type
/home/pezhman/repos/dev/skprogs/slateratom/lib/dft.f90:77:36:

   77 |       call xc_f90_func_init(xcfunc_x, xcinfo, XC_LDA_X, XC_POLARIZED)
      |                                    1
Error: Symbol ‘xcfunc_x’ at (1) has no IMPLICIT type
/home/pezhman/repos/dev/skprogs/slateratom/lib/dft.f90:77:44:

   77 |       call xc_f90_func_init(xcfunc_x, xcinfo, XC_LDA_X, XC_POLARIZED)
      |                                            1
Error: Symbol ‘xcinfo’ at (1) has no IMPLICIT type; did you mean ‘xcnr’?

I could successfully build the package using libxc 4.3.4. I thought to share it here if someone else also faced similar issue. Also, it could be nice to have a fix for this or warning in documentation at some point in future.

aradi commented 3 years ago

Thanks! Yes, the problem is the changed interface in libxc. We should consider to move to the new interface at some point, probably, indeed.

tsihyoung commented 2 years ago

Hello @pzarabadip , we have adapted to LibXC 5.x interface in the commit https://github.com/dftbplus/skprogs/commit/2c0c5d9b155ad2fb740aeca92caf464b04594165.

ezpzbz commented 2 years ago

Thanks @tsihyoung.