If you #include <xc_version.h> you can include the new style header use xc_f03_lib_m #if XC_MAJOR_VERSION >= 7 use xc_f03_funcs_m #endif Alternatively, you can #include <xc_funcs.h> which means that XC_LDA_XC_KSDT and XC_LDA_XC_GDSMFB will get replaced by their numerical values in the source code, and you will again be compatible with all relevant versions of libxc.
If you #include <xc_version.h> you can include the new style header use xc_f03_lib_m #if XC_MAJOR_VERSION >= 7 use xc_f03_funcs_m #endif Alternatively, you can #include <xc_funcs.h> which means that ~XC_LDA_XC_KSDT~ and ~XC_LDA_XC_GDSMFB~ will get replaced by their numerical values in the source code, and you will again be compatible with all relevant versions of libxc.
The standard Fortran 2003 interface libxcf03 relying on the iso_c_binding C-Fortran interface has been available in Libxc at least since version 3.0.0 released in 2016, and was only briefly removed in Libxc 5.0.0 which was a brown bag release with other issues as well. Libxc 5.0.0 renamed the Fortran 2003 interface library libxcf03 to libxcf90, even though a different library called libxcf90 which predated iso_c_binding existed before in Libxc. The duplicate copy of libxcf03 under the name libxcf90,...
Libxc lead developer here. I do not see why you would have a runtime check for the used version of Libxc. As long as the code compiles, you should be good. I have successfully compiled elk 9.2.15 against libxc 7, and the tests pass. The changes between version 7 and 6 are minimal. So are the changes between versions 6 and 5. The interface is largely the same, the only differences are in the included functions. Perhaps the issue partly caused by duplicating libxc interfaces. Note that you should use...
why?
Add new templates for "array" functions and new...
Adjust makefile for array operations.
Generate the _array routines into the same sour...