Skip to content

Commit

Permalink
Merge pull request #300 from evaleev/release-281
Browse files Browse the repository at this point in the history
release 2.8.1
  • Loading branch information
evaleev authored Dec 19, 2023
2 parents 29b10cf + 438f4a9 commit 705fe07
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 47 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
cat > CMakeLists.txt <<EOF
cmake_minimum_required(VERSION 3.8)
project(hf++)
find_package(Libint2 2.8.0 REQUIRED)
find_package(Libint2 2.8.1 REQUIRED)
find_package(Threads) # clang does not autolink threads even though we are using std::thread
add_executable(hf++ EXCLUDE_FROM_ALL $LIBINT_EXPORTED_DIR/tests/hartree-fock/hartree-fock++.cc)
target_link_libraries(hf++ Libint2::cxx Threads::Threads)
Expand Down Expand Up @@ -300,7 +300,7 @@ jobs:
cat > CMakeLists.txt <<EOF
cmake_minimum_required(VERSION 3.8)
project(hf++)
find_package(Libint2 2.8.0 REQUIRED)
find_package(Libint2 2.8.1 REQUIRED)
get_target_property(_l2_maxam Libint2::int2 Libint2_MAX_AM_ERI)
message("Libint2_MAX_AM_ERI \${_l2_maxam}")
find_package(Threads) # clang does not autolink threads even though we are using std::thread
Expand Down
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

Following is a brief summary of changes made in each release of Libint.

- 2023-12-19: 2.8.1
- PR #307: fixup progman dvi and html building
- PR #305: disable latex2html detection/use by default
- PR #304: natural order for (σ·p)V(σ·p) integrals (HT @JonathonMisiewicz)
- PR #302: build fix (HT @JonathonMisiewicz)
- 2023-12-12: 2.8.0
- PR #297: clang-format
- PR #293: read Gaussian basis set files with L>=7 AOs correctly
Expand Down
26 changes: 24 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define([libint_mmm_version],[2.8.0])
define([libint_mmm_version],[2.8.1])
define([libint_buildid],[])
define([libint_so_version],[2:3:0])

Expand Down Expand Up @@ -1117,9 +1117,31 @@ AC_PATH_PROG(PDFLATEX,pdflatex,,$PATH:/usr/local/bin:/opt/local/bin)
AC_PATH_PROG(PSLATEX,pslatex,,$PATH:/usr/local/bin:/opt/local/bin)
AC_PATH_PROG(DVIPS,dvips,,$PATH:/usr/local/bin:/opt/local/bin)
AC_PATH_PROG(LATEX,latex,,$PATH:/usr/local/bin:/opt/local/bin)
AC_PATH_PROG(LATEX2HTML,latex2html,,$PATH:/usr/local/bin:/opt/local/bin)
AC_PATH_PROG(BIBTEX,bibtex,,$PATH:/usr/local/bin:/opt/local/bin)

CHECK_FOR_LATEX2HTML=no
AC_ARG_ENABLE(latex2html,
AS_HELP_STRING([--enable-latex2html],[Enable detection of latex2html (broken on many platforms, hence disabled by default)]),
[
case $enableval in
yes)
CHECK_FOR_LATEX2HTML=yes
;;
no)
CHECK_FOR_LATEX2HTML=no
;;
*)
AC_MSG_ERROR([Invalid value for --enable-latex2html ($enableval)])
;;
esac
],[
CHECK_FOR_LATEX2HTML=no
]
)
if test "X$CHECK_FOR_LATEX2HTML" = "Xyes" ; then
AC_PATH_PROG(LATEX2HTML,latex2html,,$PATH:/usr/local/bin:/opt/local/bin)
fi

dnl The lack of certain tools is a show stopper

changequote(<<, >>)dnl
Expand Down
4 changes: 3 additions & 1 deletion doc/MakeRules.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ default:: $(TARGET)

install:: install_target

install_target:: default
install_target:: $(TARGET)
$(INSTALL) $(INSTALLDIROPT) $(DESTDIR)$(docdir)
$(LTINST) $(INSTALL) $(INSTALLDOCOPT) $(TARGET) $(DESTDIR)$(docdir)

Expand All @@ -18,3 +18,5 @@ targetclean:: clean

realclean:: clean
-rm -f $(TEXGARBAGE)

.PHONY: dvi html pdf ps install_target default install clean distclean targetclean realclean
4 changes: 1 addition & 3 deletions doc/MakeVars.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ BIBTEX = @BIBTEX@
# The document suffix (pdf or ps)
# Preferentially make pdf manuals, only revert to ps if necessary
ifdef BIBTEX
DOCSUF = dvi
ifdef PSLATEX
DOCSUF = ps
LATEX = $(PSLATEX)
endif
ifdef PDFLATEX
DOCSUF = pdf
LATEX = $(PDFLATEX)
endif
endif
TEXINPUTS = :$(SRCDIR):$(SRCDIR)/..:
Expand All @@ -54,4 +53,3 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
docdir=$(prefix)/doc
includedir=@libintincludedir@

4 changes: 2 additions & 2 deletions doc/progman/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ install-dvi:: dvi
TEXINPUTS=$(TEXINPUTS) $(LATEX) $<

ifdef LATEX2HTML
html:: dvi
$(LATEX2HTML) $(TARGETNAME)
html:: $(SRCDIR)/$(TARGETNAME).tex
$(LATEX2HTML) $<
endif

endif
Expand Down
4 changes: 2 additions & 2 deletions export/cmake/CMakeLists.txt.export
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project(Libint LANGUAGES CXX C)
# Set Libint version ===================================================================================================
set(LIBINT_MAJOR_VERSION 2)
set(LIBINT_MINOR_VERSION 8)
set(LIBINT_MICRO_VERSION 0)
set(LIBINT_MICRO_VERSION 1)
set(LIBINT_BUILDID )
set(LIBINT_VERSION "${LIBINT_MAJOR_VERSION}.${LIBINT_MINOR_VERSION}.${LIBINT_MICRO_VERSION}")
if (LIBINT_BUILDID)
Expand Down Expand Up @@ -217,7 +217,7 @@ target_compile_features(libint2_obj PUBLIC "cxx_std_11")
set_target_properties(
libint2_obj
PROPERTIES
UNITY_BUILD FALSE
UNITY_BUILD TRUE
)
if (TARGET MPFR::GMPXX)
target_link_libraries(libint2_obj PUBLIC MPFR::GMPXX)
Expand Down
16 changes: 16 additions & 0 deletions include/libint2/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -302,4 +302,20 @@
#define LIBINT_DEPRECATED(msg) LIBINT_XPRAGMA( LIBINT_CONCAT(message, msg) )
#endif

#ifdef __has_cpp_attribute
#if __has_cpp_attribute(maybe_unused)
#define LIBINT_MAYBE_UNUSED [[maybe_unused]]
#endif
#endif // __has_cpp_attribute
#ifndef LIBINT_MAYBE_UNUSED
#if defined __has_attribute
# if __has_attribute (unused)
# define LIBINT_MAYBE_UNUSED __attribute__ ((unused))
# endif
#endif // __has_attribute
#endif // LIBINT_MAYBE_UNUSED
#ifndef LIBINT_MAYBE_UNUSED // fallback
#define LIBINT_MAYBE_UNUSED
#endif

#endif /* header guard */
5 changes: 2 additions & 3 deletions include/libint2/initialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ inline bool initialized() {
inline void initialize(bool verbose = false) {
if (!initialized()) {
using namespace detail;
__initializer* x = managed_singleton<__initializer>::instance();
(void)x; // to suppress unused variable warning (not guaranteed to work)
// TODO revise when upgrade to C++17
LIBINT_MAYBE_UNUSED __initializer* x =
managed_singleton<__initializer>::instance();
assert(x != nullptr);
verbose_accessor() = verbose;

Expand Down
6 changes: 2 additions & 4 deletions src/bin/libint/tactic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ TwoCenter_OS_Tactic::RR TwoCenter_OS_Tactic::optimal_rr(
// children
// (to reduce the memory bandwidth demand)
size_t max_result_size = std::numeric_limits<size_t>::max();
size_t nties = 0;
(void)nties;
LIBINT_MAYBE_UNUSED size_t nties = 0;
for (auto& t : stack) {
if (t->braket_direction() ==
BraketDirection::None) { // skip all HRR RRs
Expand Down Expand Up @@ -263,8 +262,7 @@ FourCenter_OS_Tactic::RR FourCenter_OS_Tactic::optimal_rr(
// transfer direction matches the strategic direction since only non-ITR
// 2-body OS strategies will include transfers in single direction
size_t max_result_size = std::numeric_limits<size_t>::max();
size_t nties = 0;
(void)nties;
LIBINT_MAYBE_UNUSED size_t nties = 0;
for (auto& t : stack) {
if (t->partindex_direction() == 0) { // skip all ITR RRs

Expand Down
43 changes: 17 additions & 26 deletions tests/hartree-fock/hartree-fock++.cc
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,9 @@ int main(int argc, char* argv[]) {
}

{ // compute hessian
LIBINT_MAYBE_UNUSED const auto ncoords = 3 * atoms.size();
#if LIBINT2_DERIV_ONEBODY_ORDER > 1
// compute 1-e hessian
// compute 1-e hessian
Matrix H1 = Matrix::Zero(ncoords, ncoords);
Matrix H_Pulay = Matrix::Zero(ncoords, ncoords);
//////////
Expand Down Expand Up @@ -720,15 +721,15 @@ int main(int argc, char* argv[]) {
}

std::cout << "** 1-body hessian = ";
for (auto row = 0, i = 0; row != ncoords; ++row) {
for (auto row = 0; row != ncoords; ++row) {
for (auto col = row; col != ncoords; ++col) {
std::cout << H1(row, col) << " ";
}
}
std::cout << std::endl;

std::cout << "** Pulay hessian = ";
for (auto row = 0, i = 0; row != ncoords; ++row) {
for (auto row = 0; row != ncoords; ++row) {
for (auto col = row; col != ncoords; ++col) {
std::cout << H_Pulay(row, col) << " ";
}
Expand All @@ -753,7 +754,7 @@ int main(int argc, char* argv[]) {
}

std::cout << "** 2-body hessian = ";
for (auto row = 0, i = 0; row != ncoords; ++row) {
for (auto row = 0; row != ncoords; ++row) {
for (auto col = row; col != ncoords; ++col) {
std::cout << H2(row, col) << " ";
}
Expand Down Expand Up @@ -816,7 +817,7 @@ int main(int argc, char* argv[]) {
}

std::cout << "** nuclear repulsion hessian = ";
for (auto row = 0, i = 0; row != ncoords; ++row) {
for (auto row = 0; row != ncoords; ++row) {
for (auto col = row; col != ncoords; ++col) {
std::cout << HN(row, col) << " ";
}
Expand All @@ -825,7 +826,7 @@ int main(int argc, char* argv[]) {

auto H = H1 + H_Pulay + H2 + HN;
std::cout << "** Hartree-Fock hessian = ";
for (auto row = 0, i = 0; row != ncoords; ++row) {
for (auto row = 0; row != ncoords; ++row) {
for (auto col = row; col != ncoords; ++col) {
std::cout << H(row, col) << " ";
}
Expand Down Expand Up @@ -1184,8 +1185,7 @@ std::vector<Matrix> compute_1body_ints_deriv(unsigned deriv_order,
ShellSetDerivIterator shellset_diter(deriv_order,
nderivcenters_shset);
while (shellset_diter) {
const auto& deriv = *shellset_diter;
(void)deriv;
LIBINT_MAYBE_UNUSED const auto& deriv = *shellset_diter;
}
}
} // copy shell block switch
Expand Down Expand Up @@ -2029,8 +2029,7 @@ Matrix compute_2body_fock_general(const BasisSet& obs, const Matrix& D,
double precision) {
const auto n = obs.nbf();
const auto nshells = obs.size();
const auto n_D = D_bs.nbf();
(void)n_D;
LIBINT_MAYBE_UNUSED const auto n_D = D_bs.nbf();
assert(D.cols() == D.rows() && D.cols() == n_D);

using libint2::nthreads;
Expand Down Expand Up @@ -2403,10 +2402,8 @@ void api_basic_compile_test(const BasisSet& obs,
auto n1 = obs[s1].size(); // number of basis functions in first shell
auto n2 = obs[s2].size(); // number of basis functions in second shell

const auto* buf4 = results4[0];
(void)buf4;
const auto* buf2 = results2[0];
(void)buf2;
LIBINT_MAYBE_UNUSED const auto* buf4 = results4[0];
LIBINT_MAYBE_UNUSED const auto* buf2 = results2[0];

// this iterates over integrals in the order they are packed in array
// ints_shellset
Expand Down Expand Up @@ -2435,10 +2432,8 @@ void api_basic_compile_test(const BasisSet& obs,
obs[s2].size(); // number of basis functions in second shell
auto n3 = obs[s3].size(); // number of basis functions in third shell

const auto* buf4 = results4[0];
(void)buf4;
const auto* buf3 = results3[0];
(void)buf3;
LIBINT_MAYBE_UNUSED const auto* buf4 = results4[0];
LIBINT_MAYBE_UNUSED const auto* buf3 = results3[0];

// this iterates over integrals in the order they are packed in array
// ints_shellset
Expand Down Expand Up @@ -2470,10 +2465,8 @@ void api_basic_compile_test(const BasisSet& obs,

// loop over derivative shell sets
for (auto d = 0; d != 6; ++d) {
const auto* buf4 = results4[d < 3 ? d : d + 3];
(void)buf4;
const auto* buf2 = results2[d];
(void)buf2;
LIBINT_MAYBE_UNUSED const auto* buf4 = results4[d < 3 ? d : d + 3];
LIBINT_MAYBE_UNUSED const auto* buf2 = results2[d];

// this iterates over integrals in the order they are packed in array
// ints_shellset
Expand All @@ -2500,9 +2493,7 @@ void api_basic_compile_test(const BasisSet& obs,
eri4_engine.compute(obs[s1], Shell::unit(), obs[s2], Shell::unit());
eri2_engine.compute(obs[s1], obs[s2]);

auto bf1 = shell2bf[s1]; // first basis function in first shell
auto n1 = obs[s1].size(); // number of basis functions in first shell
auto bf2 = shell2bf[s2]; // first basis function in second shell
auto n2 = obs[s2].size(); // number of basis functions in second shell

// loop over derivative shell sets
Expand All @@ -2511,8 +2502,8 @@ void api_basic_compile_test(const BasisSet& obs,
for (auto d2 = d1; d2 != 6; ++d2, ++d12) {
const auto dd2 = d2 < 3 ? d2 : d2 + 3;
const auto dd12 = dd1 * (24 - dd1 - 1) / 2 + dd2;
const auto* buf4 = results4[dd12];
const auto* buf2 = results2[d12];
LIBINT_MAYBE_UNUSED const auto* buf4 = results4[dd12];
LIBINT_MAYBE_UNUSED const auto* buf2 = results2[d12];

// this iterates over integrals in the order they are packed in
// array
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/test-precision.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ TEST_CASE("2-body integrals precision", "[2-body][precision]") {
});

auto max_engine_screening_error = 0.;
bool engine_precision_too_low = false;
(void)engine_precision_too_low;
LIBINT_MAYBE_UNUSED bool engine_precision_too_low = false;
const auto max_allowed_exceening_error_factor = 2;
for (auto f = 0; f != nf; ++f) {
auto& ref_v = ref_ints[0][f];
Expand Down

0 comments on commit 705fe07

Please sign in to comment.