From 9676ba02d48682b90b0cbd0c6d13220851b0202e Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Apr 21 2016 21:45:07 +0000 Subject: Update to 3.0.0. --- diff --git a/.gitignore b/.gitignore index 194dd96..375bcd3 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /libxc-2.0.3.tar.gz /libxc-2.1.0.tar.gz /libxc-2.1.2.tar.gz +/libxc-3.0.0.tar.gz diff --git a/libxc-2.1.2-build.patch b/libxc-2.1.2-build.patch deleted file mode 100644 index 1caa3b8..0000000 --- a/libxc-2.1.2-build.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -up libxc-2.1.2/src/Makefile.am.orig libxc-2.1.2/src/Makefile.am ---- libxc-2.1.2/src/Makefile.am.orig 2015-02-19 14:35:44.000000000 +0100 -+++ libxc-2.1.2/src/Makefile.am 2015-04-24 22:46:53.997186406 +0200 -@@ -62,11 +62,13 @@ libxc_la_SOURCES = $(libxc_la_FUNC_SOURC - - if COMPILE_SINGLE - nodist_libxc_la_SOURCES = $(libxc_la_FUNC_SINGLE_SOURCES) -+else -+ nodist_libxc_la_SOURCES = - endif - - if COMPILE_FORTRAN - libxc_la_SOURCES += xc_f.c -- nodist_libxc_la_SOURCES = libxc_funcs.f90 libxc.f90 -+ nodist_libxc_la_SOURCES += libxc_funcs.f90 libxc.f90 - if COMPILE_SINGLE - nodist_libxc_la_SOURCES += xc_f_s.c libxc_s.f90 - endif diff --git a/libxc-2.1.2-hybrids.patch b/libxc-2.1.2-hybrids.patch deleted file mode 100644 index 5c136e2..0000000 --- a/libxc-2.1.2-hybrids.patch +++ /dev/null @@ -1,114 +0,0 @@ -diff -up libxc-2.1.2/src/hyb_gga_xc_cam_b3lyp.c.orig libxc-2.1.2/src/hyb_gga_xc_cam_b3lyp.c ---- libxc-2.1.2/src/hyb_gga_xc_cam_b3lyp.c.orig 2015-02-19 14:35:44.000000000 +0100 -+++ libxc-2.1.2/src/hyb_gga_xc_cam_b3lyp.c 2015-04-24 23:22:28.696184475 +0200 -@@ -31,32 +31,38 @@ XC(hyb_gga_xc_cam_b3lyp_init)(XC(func_ty - static int funcs_id [4] = {XC_GGA_X_B88, XC_GGA_X_ITYH, XC_LDA_C_VWN, XC_GGA_C_LYP}; - static FLOAT funcs_coef[4]; - -+ /* Need temp variables since cam_ parameters are initialized in mix_init */ -+ static FLOAT omega, alpha, beta; -+ - switch(p->info->number){ - case XC_HYB_GGA_XC_CAM_B3LYP: - /* N.B. The notation used in Yanai et al uses a different - convention for alpha and beta. In libxc, alpha is the weight - for HF exchange, which in Yanai et al is alpha+beta. - */ -- p->cam_omega = 0.33; -- p->cam_alpha = 0.65; -- p->cam_beta =-0.46; -+ omega = 0.33; -+ alpha = 0.65; -+ beta =-0.46; - break; - case XC_HYB_GGA_XC_TUNED_CAM_B3LYP: - /* The same note applies here. */ -- p->cam_omega = 0.150; -- p->cam_alpha = 1.0000; -- p->cam_beta =-0.9201; -+ omega = 0.150; -+ alpha = 1.0000; -+ beta =-0.9201; - break; - } - -- funcs_coef[0] = 1.0 - p->cam_alpha; -- funcs_coef[1] = -p->cam_beta; -+ funcs_coef[0] = 1.0 - alpha; -+ funcs_coef[1] = -beta; - funcs_coef[2] = 1.0 - ac; - funcs_coef[3] = ac; - - XC(mix_init)(p, 4, funcs_id, funcs_coef); -+ XC(gga_x_ityh_set_params)(p->func_aux[1], XC_GGA_X_B88, omega); - -- XC(gga_x_ityh_set_params)(p->func_aux[1], XC_GGA_X_B88, p->cam_omega); -+ p->cam_omega = omega; -+ p->cam_alpha = alpha; -+ p->cam_beta = beta; - } - - const XC(func_info_type) XC(func_info_hyb_gga_xc_cam_b3lyp) = { -diff -up libxc-2.1.2/src/hyb_gga_xc_camy_blyp.c.orig libxc-2.1.2/src/hyb_gga_xc_camy_blyp.c ---- libxc-2.1.2/src/hyb_gga_xc_camy_blyp.c.orig 2015-02-19 14:35:44.000000000 +0100 -+++ libxc-2.1.2/src/hyb_gga_xc_camy_blyp.c 2015-04-24 23:22:28.704184475 +0200 -@@ -29,19 +29,28 @@ XC(hyb_gga_xc_camy_blyp_init)(XC(func_ty - static int funcs_id [3] = {XC_GGA_X_B88, XC_GGA_X_SFAT, XC_GGA_C_LYP}; - static FLOAT funcs_coef[3]; - -- p->cam_alpha = 0.20; -- p->cam_beta = 0.80; -- p->cam_omega = 0.44; /* we use omega for gamma here, 'cause -- both denote dampening parameters for -- range related interactions */ -- -- funcs_coef[0] = 1.0 - p->cam_alpha - p->cam_beta; -- funcs_coef[1] = p->cam_beta; /* 1.0 - p->cam_alpha - p->cam_beta? */ -+ /* N.B. The notation used in the original reference uses a different -+ convention for alpha and beta. In libxc, alpha is the weight for -+ HF exchange, which in the original reference is alpha+beta. -+ */ -+ FLOAT alpha, beta, omega; -+ -+ alpha = 1.00; -+ beta =-0.80; -+ omega = 0.44; /* we use omega for gamma here, 'cause -+ both denote dampening parameters for -+ range related interactions */ -+ -+ funcs_coef[0] = 1.0 - alpha; -+ funcs_coef[1] =-beta; - funcs_coef[2] = 1.0; - - XC(mix_init)(p, 3, funcs_id, funcs_coef); -- - XC(gga_x_sfat_set_params)(p->func_aux[1], XC_GGA_X_B88, p->cam_omega); -+ -+ p->cam_omega=omega; -+ p->cam_alpha=alpha; -+ p->cam_beta=beta; - } - - const XC(func_info_type) XC(func_info_hyb_gga_xc_camy_blyp) = { -diff -up libxc-2.1.2/src/hyb_gga_xc_hse.c.orig libxc-2.1.2/src/hyb_gga_xc_hse.c ---- libxc-2.1.2/src/hyb_gga_xc_hse.c.orig 2015-02-19 14:35:44.000000000 +0100 -+++ libxc-2.1.2/src/hyb_gga_xc_hse.c 2015-04-24 23:22:28.688184475 +0200 -@@ -121,9 +121,6 @@ hyb_gga_xc_hjs_init(XC(func_type) *p) - static int funcs_id [3] = {-1, -1, XC_GGA_C_PBE}; - static FLOAT funcs_coef[3] = {1.0, -0.25, 1.0}; - -- p->cam_omega = 0.11; -- p->cam_beta = 0.25; -- - switch(p->info->number){ - case XC_HYB_GGA_XC_HJS_PBE: - funcs_id[0] = funcs_id[1] = XC_GGA_X_HJS_PBE; -@@ -143,6 +140,8 @@ hyb_gga_xc_hjs_init(XC(func_type) *p) - } - - XC(mix_init)(p, 3, funcs_id, funcs_coef); -+ p->cam_omega = 0.11; -+ p->cam_beta = 0.25; - XC(gga_x_hjs_set_params)(p->func_aux[1], p->cam_omega); - } - diff --git a/libxc-3.0.0-single.patch b/libxc-3.0.0-single.patch new file mode 100644 index 0000000..b3c011c --- /dev/null +++ b/libxc-3.0.0-single.patch @@ -0,0 +1,17 @@ +diff -up libxc-3.0.0/src/Makefile.am.single libxc-3.0.0/src/Makefile.am +--- libxc-3.0.0/src/Makefile.am.single 2016-04-21 11:03:11.000000000 +0200 ++++ libxc-3.0.0/src/Makefile.am 2016-04-21 23:31:42.141929318 +0200 +@@ -159,13 +159,6 @@ nodist_include_HEADERS += $(XCLIBMODS) + if COMPILE_SINGLE + + if F90_MOD_UPPERCASE +- LIBSFUNCMOD = LIBXC_S_FUNCS_M.@ax_cv_f90_modext@ +-else +- LIBSFUNCMOD = libxc_s_funcs_m.@ax_cv_f90_modext@ +-endif +-nodist_include_HEADERS += $(LIBSFUNCMOD) +- +-if F90_MOD_UPPERCASE + XCLIBMODS_S = XC_S_F90_LIB_M.@ax_cv_f90_modext@ XC_S_F90_TYPES_M.@ax_cv_f90_modext@ + else + XCLIBMODS_S = xc_s_f90_lib_m.@ax_cv_f90_modext@ xc_s_f90_types_m.@ax_cv_f90_modext@ diff --git a/libxc-3.0.0-static.patch b/libxc-3.0.0-static.patch new file mode 100644 index 0000000..e63641d --- /dev/null +++ b/libxc-3.0.0-static.patch @@ -0,0 +1,64 @@ +diff -up libxc-3.0.0/src/lda_xc_ksdt.c.static libxc-3.0.0/src/lda_xc_ksdt.c +--- libxc-3.0.0/src/lda_xc_ksdt.c.static 2016-04-21 11:03:11.000000000 +0200 ++++ libxc-3.0.0/src/lda_xc_ksdt.c 2016-04-21 23:21:52.065929425 +0200 +@@ -74,7 +74,7 @@ XC(lda_xc_ksdt_set_params)(XC(func_type) + params->T = T; + } + +-void ++static void + ksdt_fxc(int ispin, int order, FLOAT t, FLOAT *rs, FLOAT *fxc, FLOAT *dfxcdt, + FLOAT *dfxcdrs, FLOAT *d2fxdt2, FLOAT *d2fxcrsdt, FLOAT *d2fxcdrs2) + { +@@ -162,7 +162,7 @@ ksdt_fxc(int ispin, int order, FLOAT t, + + } + +-void ++static void + ksdt_alpha(int order, FLOAT t, FLOAT *rs, FLOAT *alpha, FLOAT *dalphadt, FLOAT *dalphadrs) + { + const FLOAT ksdt_g[] = {2.0/3.0, -0.0139261, 0.183208}; +@@ -196,7 +196,7 @@ ksdt_alpha(int order, FLOAT t, FLOAT *rs + } + + +-void ++static void + ksdt_phi(int order, FLOAT zeta, FLOAT alpha, + FLOAT *phi, FLOAT *dphidz, FLOAT *dphidalpha) + { +diff -up libxc-3.0.0/src/mgga_c_scan.c.static libxc-3.0.0/src/mgga_c_scan.c +--- libxc-3.0.0/src/mgga_c_scan.c.static 2016-04-21 11:03:11.000000000 +0200 ++++ libxc-3.0.0/src/mgga_c_scan.c 2016-04-21 23:21:52.067929425 +0200 +@@ -25,12 +25,12 @@ + #define XC_MGGA_C_SCAN 267 /* SCAN correlation */ + + /* Constants */ +-const FLOAT b1c=0.02858, b2c=0.0889, b3c=0.1255; +-const FLOAT c1c=0.64, c2c=1.5, dc=0.7; +-const FLOAT c_gamma=0.03109069086965490; /* (1-log(2))/Pi^2 */ +-const FLOAT beta_a=0.066725, beta_b=0.1, beta_c=0.1778; +-const FLOAT G_c=2.3621; +-const FLOAT chi=0.128026; ++static const FLOAT b1c=0.02858, b2c=0.0889, b3c=0.1255; ++static const FLOAT c1c=0.64, c2c=1.5, dc=0.7; ++static const FLOAT c_gamma=0.03109069086965490; /* (1-log(2))/Pi^2 */ ++static const FLOAT beta_a=0.066725, beta_b=0.1, beta_c=0.1778; ++static const FLOAT G_c=2.3621; ++static const FLOAT chi=0.128026; + + /* Calculates E_c^{LDA0} = -b1c / ( 1 + b2c*r^{1/2} + b3c*r ) */ + static void +diff -up libxc-3.0.0/src/version.c.static libxc-3.0.0/src/version.c +--- libxc-3.0.0/src/version.c.static 2016-04-21 11:03:11.000000000 +0200 ++++ libxc-3.0.0/src/version.c 2016-04-21 23:22:15.263929263 +0200 +@@ -22,7 +22,7 @@ + #include "xc.h" + #include "config.h" + +-const char * libxc_version = PACKAGE_VERSION; ++static const char * libxc_version = PACKAGE_VERSION; + + void XC(version)(int *major, int *minor, int *micro) { + diff --git a/libxc.spec b/libxc.spec index ce3bd8d..4a48446 100644 --- a/libxc.spec +++ b/libxc.spec @@ -7,18 +7,18 @@ Name: libxc Summary: Library of exchange and correlation functionals to be used in DFT codes -Version: 2.1.2 -Release: 5%{?dist} +Version: 3.0.0 +Release: 1%{?dist} License: LGPLv3+ Group: Applications/Engineering BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot Source0: http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-%{version}.tar.gz # Workaround for BZ #1079415 causing builds to fail on ppc archs in EPEL Patch0: libxc-2.1.0-ppc.patch -# Fix broken makefile (from upstream) -Patch1: libxc-2.1.2-build.patch -# Fix hybrids (from upstream) -Patch2: libxc-2.1.2-hybrids.patch +# Add in some missing static declarations (from upstream) +Patch1: libxc-3.0.0-static.patch +# Fix single precision install (from upstream) +Patch2: libxc-3.0.0-single.patch URL: http://www.tddft.org/programs/octopus/wiki/index.php/Libxc BuildRequires: gcc-gfortran @@ -57,9 +57,8 @@ in order to compile programs against libxc. %patch0 -p1 -b .ppc %endif %endif - -%patch1 -p1 -b .build -%patch2 -p1 -b .hybrids +%patch1 -p1 -b .static +%patch2 -p1 -b .single autoreconf -i %build @@ -94,19 +93,28 @@ rm -rf %{buildroot} %doc README NEWS COPYING AUTHORS ChangeLog TODO %{_bindir}/xc-info %{_libdir}/libxc.so.* +%{_libdir}/libxcf03.so.* +%{_libdir}/libxcf90.so.* %files devel %defattr(-,root,root,-) %{_libdir}/libxc.so +%{_libdir}/libxcf03.so +%{_libdir}/libxcf90.so %{_includedir}/xc*.h %{_fmoddir}/libxc_funcs_m.mod +%{_fmoddir}/xc_f03_*.mod %{_fmoddir}/xc_f90_*.mod %if %{with single} +%{_fmoddir}/xc_s_f03_*.mod %{_fmoddir}/xc_s_f90_*.mod %endif %{_libdir}/pkgconfig/libxc.pc %changelog +* Thu Apr 21 2016 Susi Lehtola - 3.0.0-1 +- Update to 3.0.0. + * Wed Jun 17 2015 Fedora Release Engineering - 2.1.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 4f80640..0f548ec 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f811ad5e0e0a5be027036bf855258d5a libxc-2.1.2.tar.gz +8227fa3053f8fc215bd9d7b0d36de03c libxc-3.0.0.tar.gz