Libxc 7.0.0 -> 7.1.1 (#5607)

This commit is contained in:
SY Wang 2026-07-20 23:55:05 +08:00 committed by GitHub
parent 3d5583cc72
commit 290501bb7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 36 additions and 47 deletions

View file

@ -2,8 +2,8 @@
"H2O-BP-OPTX.inp" = [{matcher="M011", tol=1.0E-13, ref=-17.173082884557527}]
"H2O-BP-BECKEX.inp" = [{matcher="M011", tol=1.0E-13, ref=-17.172192115148068}]
"H2O-BP-Coul.inp" = [{matcher="M011", tol=1.0E-13, ref=-17.172925552133442}]
"H2O-BP-sr.inp" = [{matcher="M011", tol=1.0E-13, ref=-16.712074689018060}]
"H2O-BP-sr.inp" = [{matcher="M011", tol=1.0E-13, ref=-16.712074689027640}]
"H2O-BP-lr.inp" = [{matcher="M011", tol=1.0E-13, ref=-16.689871565334784}]
"H2O-BP-cl.inp" = [{matcher="M011", tol=1.0E-13, ref=-17.635078754585429}]
"H2O-BP-cl-trunc.inp" = [{matcher="M011", tol=1.0E-13, ref=-17.629884992387993}]
"H2O-BP-cl.inp" = [{matcher="M011", tol=1.0E-13, ref=-17.635078754561230}]
"H2O-BP-cl-trunc.inp" = [{matcher="M011", tol=1.0E-13, ref=-17.629884992363387}]
#EOF

View file

@ -6,8 +6,8 @@
"h2o_pbe0.inp" = [{matcher="M060", tol=1e-05, ref=0.411901963703}]
"h2o_pbe0_admm.inp" = [{matcher="M060", tol=1e-05, ref=0.426369189904}]
#
"h2o_HSE06.inp" = [{matcher="M060", tol=1e-05, ref=0.436263865396}]
"h2o_HSE06_admm.inp" = [{matcher="M060", tol=1e-05, ref=0.381688458912}]
"h2o_HSE06.inp" = [{matcher="M060", tol=1e-05, ref=0.445432754543}]
"h2o_HSE06_admm.inp" = [{matcher="M060", tol=1e-05, ref=0.442023635799}]
#h2o_B88_mixcl.inp functional B88_LR 60 1e-05 0.000000000000E+00
#h2o_B88_mixcl_admm.inp functional B88_LR 60 1e-05 0.000000000000E+00
"h2o_pbe0TC.inp" = [{matcher="M060", tol=1e-05, ref=0.430192264863}]

View file

@ -21,7 +21,7 @@
&EFIELD
&END EFIELD
&MGRID
CUTOFF 200
CUTOFF 150
&END MGRID
&PRINT
&MOMENTS ON
@ -80,7 +80,7 @@
&END PROPERTIES
&SUBSYS
&CELL
ABC [angstrom] 5.0 5.0 5.0
ABC [angstrom] 4.0 4.0 4.0
PERIODIC NONE
&END CELL
&COORD

View file

@ -28,7 +28,7 @@
&EFIELD
&END EFIELD
&MGRID
CUTOFF 200
CUTOFF 150
&END MGRID
&PRINT
&MOMENTS ON
@ -87,7 +87,7 @@
&END PROPERTIES
&SUBSYS
&CELL
ABC [angstrom] 5.0 5.0 5.0
ABC [angstrom] 4.0 4.0 4.0
PERIODIC NONE
&END CELL
&COORD

View file

@ -12,10 +12,10 @@
{matcher="TDDFPT_Check_Osc_Strength", tol=1.0E-06, ref=0.53343196E+00}]
"test04.inp" = [{matcher="TDDFPT_Check_Energy", tol=5.0E-06, ref=0.102641E+01},
{matcher="TDDFPT_Check_Osc_Strength", tol=1.0E-06, ref=0.53056622E+00}]
"test05.inp" = [{matcher="TDDFPT_Check_Energy", tol=5.0E-06, ref=0.101974E+01},
{matcher="TDDFPT_Check_Osc_Strength", tol=1.0E-06, ref=0.53306556E+00}]
"test06.inp" = [{matcher="TDDFPT_Check_Energy", tol=5.0E-06, ref=0.102171E+01},
{matcher="TDDFPT_Check_Osc_Strength", tol=1.0E-06, ref=0.52845348E+00}]
"test05.inp" = [{matcher="TDDFPT_Check_Energy", tol=5.0E-06, ref=0.101772E+01},
{matcher="TDDFPT_Check_Osc_Strength", tol=1.0E-06, ref=0.53053109E+00}]
"test06.inp" = [{matcher="TDDFPT_Check_Energy", tol=5.0E-06, ref=0.102040E+01},
{matcher="TDDFPT_Check_Osc_Strength", tol=1.0E-06, ref=0.51211743E+00}]
"test07.inp" = [{matcher="TDDFPT_Check_Energy", tol=5.0E-06, ref=0.101792E+01},
{matcher="TDDFPT_Check_Osc_Strength", tol=1.0E-06, ref=0.55939759E+00}]
"test08.inp" = [{matcher="TDDFPT_Check_Energy", tol=5.0E-06, ref=0.103120E+01},

View file

@ -11,8 +11,8 @@
STATE 1
&END EXCITED_STATES
&MGRID
CUTOFF 200
REL_CUTOFF 60
CUTOFF 120
REL_CUTOFF 50
&END MGRID
&POISSON
PERIODIC NONE

View file

@ -19,8 +19,8 @@
STATE 1
&END EXCITED_STATES
&MGRID
CUTOFF 200
REL_CUTOFF 40
CUTOFF 120
REL_CUTOFF 30
&END MGRID
&POISSON
PERIODIC NONE

View file

@ -184,7 +184,7 @@ spack:
repos:
builtin:
commit: fc7222b5b8ababa8588be2e23ff39b33ecc9ce12 # 2026-07-09
commit: 9314cd0194cb79e73b44927e920130cd4379f012 # 2026-07-20
specs:
# Build tools
@ -215,7 +215,7 @@ spack:
- "libsmeagol@1.2"
- "libvdwxc@0.5.0"
- "libvori@220621"
- "libxc@7.0.0"
- "libxc@7.1.1"
- "libxs@1.0.0"
- "libxsmm@2.0.0"
# - "libxstream@1.0.0"

View file

@ -96,7 +96,7 @@ spack:
repos:
builtin:
commit: fc7222b5b8ababa8588be2e23ff39b33ecc9ce12 # 2026-07-09
commit: 9314cd0194cb79e73b44927e920130cd4379f012 # 2026-07-20
specs:
# Build tools
@ -113,7 +113,7 @@ spack:
- "libfci@0.1.0"
- "libint@2.13.1-cp2k-lmax-5"
- "libvori@220621"
- "libxc@7.0.0"
- "libxc@7.1.1"
- "libxs@1.0.0"
- "libxsmm@2.0.0"
- "openblas@0.3.33"

View file

@ -117,7 +117,7 @@ spack:
repos:
builtin:
commit: fc7222b5b8ababa8588be2e23ff39b33ecc9ce12 # 2026-07-09
commit: 9314cd0194cb79e73b44927e920130cd4379f012 # 2026-07-20
specs:
# Build tools
@ -138,7 +138,7 @@ spack:
# - "libgint@release_v1"
- "libint@2.13.1-cp2k-lmax-5"
- "libvori@220621"
- "libxc@7.0.0"
- "libxc@7.1.1"
- "libxs@1.0.0"
- "libxsmm@2.0.0"
# - "libxstream@1.0.0"

View file

@ -6,8 +6,8 @@
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"
libxc_ver="7.0.0"
libxc_sha256="e9ae69f8966d8de6b7585abd9fab588794ada1fab8f689337959a35abbf9527d"
libxc_ver="7.1.1"
libxc_sha256="0e913232757338f345830250bf344d8c60feca5b8ff6c0c6b2229c5189eea11f"
source "${SCRIPT_DIR}"/common_vars.sh
source "${SCRIPT_DIR}"/tool_kit.sh
source "${SCRIPT_DIR}"/signal_trap.sh
@ -34,34 +34,23 @@ case "$with_libxc" in
cd libxc-${libxc_ver}
mkdir build
cd build
# Lower the optimization level of KXC functionals for GCC to reduce time cost
# LXC functionals are not used so ignore them
if [ "${with_gcc}" != "__DONTUSE__" ]; then
if [ "${with_intel}" = "__DONTUSE__" ] && [ "${with_amd}" = "__DONTUSE__" ]; then
MAPLE2C_DIR="../src/maple2c"
for f in "$MAPLE2C_DIR"/gga_exc/*.c "$MAPLE2C_DIR"/mgga_exc/*.c "$MAPLE2C_DIR"/lda_exc/*.c; do
[ -f "$f" ] || continue
if grep -q "^func_kxc_" "$f" && ! grep -q "__attribute__((optimize" "$f"; then
sed -i 's/^func_kxc_/__attribute__((optimize("O1"))) func_kxc_/' "$f"
fi
done
if [ "${with_gcc}" != "__DONTUSE__" ] &&
[ "${with_intel}" = "__DONTUSE__" ] && [ "${with_amd}" = "__DONTUSE__" ]; then
# Turn off variable tracking
LIBXC_CFLAGS="${CFLAGS} -fno-var-tracking"
else
LIBXC_CFLAGS="${CFLAGS}"
LIBXC_CFLAGS=""
fi
fi
# CP2K does not make use of fourth derivatives, so skip their compilation with -DDISABLE_KXC=OFF
# Add "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" to keep legacy compatibility for CMake version 4.x
# CP2K make use of third derivatives in libxc
CFLAGS="${LIBXC_CFLAGS}" cmake \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_INSTALL_PREFIX="${pkg_install_dir}" \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF \
-DENABLE_FORTRAN=ON \
-DDISABLE_KXC=OFF \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DMAXORDER=3 \
.. > configure.log 2>&1 || tail_excerpt configure.log
make -j $(get_nprocs) > make.log 2>&1 || tail_excerpt make.log
make install > install.log 2>&1 || tail_excerpt install.log