From 215adbd90c70a48f38b132780725e9501758941c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chborchert=E2=80=9D?= <“hannes.borchert@stonybrook.edu”> Date: Thu, 15 Aug 2024 16:39:00 -0400 Subject: [PATCH] added switch for tiling of Vpsi and BSH apply in SCF.cc and changed mul_tol in exchangeoperator.h (0.0 previously) --- src/madness/chem/SCF.cc | 120 ++++++++++++++++------------ src/madness/chem/exchangeoperator.h | 4 +- 2 files changed, 74 insertions(+), 50 deletions(-) diff --git a/src/madness/chem/SCF.cc b/src/madness/chem/SCF.cc index 805b312fc9b..40e6f03e3c4 100644 --- a/src/madness/chem/SCF.cc +++ b/src/madness/chem/SCF.cc @@ -1375,28 +1375,38 @@ vecfuncT SCF::apply_potential(World& world, const tensorT& occ, // compute Vpsi and truncation START_TIMER(world); + const bool tile_Vpsi = true; size_t min_tile = 10; size_t ntile = std::min(amo.size(), min_tile); if (!molecule.parameters.pure_ae()) { gaxpy(world, 1.0, Vpsi, 1.0, gthpseudopotential->apply_potential(world, vloc, amo, occ, enl)); } else { - for (size_t ilo=0; ilo fac(nmo, -2.0); scale(world, Vpsi, fac); - //std::vector ops = make_bsh_operators(world, eps); - //set_thresh(world, Vpsi, FunctionDefaults<3>::get_thresh()); END_TIMER(world, "Compute residual stuff"); - START_TIMER(world); + const bool tile_applyBSH = true; + vecfuncT new_psi; - //vecfuncT new_psi = apply(world, ops, Vpsi); + if (tile_applyBSH) { + START_TIMER(world); + size_t min_tile = 10; + size_t ntile = std::min(amo.size(), min_tile); + new_psi = zero_functions(world, Vpsi.size()); + + for (size_t ilo=0; ilo(world, Vpsi.size()); + std::vector ops = make_bsh_operators(world, tmp_eps); + set_thresh(world, tmp_Vpsi, FunctionDefaults<3>::get_thresh()); - for (size_t ilo=0; ilo ops = make_bsh_operators(world, tmp_eps); - set_thresh(world, tmp_Vpsi, FunctionDefaults<3>::get_thresh()); + //put the results into their final home + for (size_t i = ilo; i ops = make_bsh_operators(world, eps); + set_thresh(world, Vpsi, FunctionDefaults<3>::get_thresh()); - //put the results into their final home - for (size_t i = ilo; i::ExchangeImpl { double lo = 1.e-4; double thresh = FunctionDefaults::get_thresh(); long printlevel = 0; - double mul_tol = 0.0; + double mul_tol = FunctionDefaults::get_thresh()*0.1; class MacroTaskExchangeSimple : public MacroTaskOperationBase { @@ -345,7 +345,9 @@ class Exchange::ExchangeImpl { const std::vector>& mo_ket) { World& world = vket.front().world(); + mul_tol = 0.0; print("mul_tol ", mul_tol); + resultT Kf = zero_functions_compressed(world, 1); auto poisson = Exchange::ExchangeImpl::set_poisson(world, lo);