Skip to content

Commit

Permalink
Loosen DWF tolerance by a factor of sqrt(Ls).
Browse files Browse the repository at this point in the history
  • Loading branch information
hummingtree committed Dec 6, 2023
1 parent e46c1ed commit d1888e1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/invert_test_gtest.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <gtest/gtest.h>
#include <quda_arch.h>
#include <cmath>

// tuple containing parameters for Schwarz solver
using schwarz_t = ::testing::tuple<QudaSchwarzType, QudaInverterType, QudaPrecision>;
Expand Down Expand Up @@ -136,6 +137,12 @@ TEST_P(InvertTest, verify)
if (res_t & QUDA_HEAVY_QUARK_RESIDUAL) inv_param.tol_hq = tol_hq;

auto tol = inv_param.tol;
if (inv_param.dslash_type == QUDA_DOMAIN_WALL_DSLASH ||
inv_param.dslash_type == QUDA_DOMAIN_WALL_4D_DSLASH ||
inv_param.dslash_type == QUDA_MOBIUS_DWF_DSLASH ||
inv_param.dslash_type == QUDA_MOBIUS_DWF_EOFA_DSLASH) {
tol *= std::sqrt(static_cast<double>(inv_param.Ls));
}
// FIXME eventually we should build in refinement to the *NR solvers to remove the need for this
if (is_normal_residual(::testing::get<0>(GetParam()))) tol *= 50;
// Slight loss of precision possible when reconstructing full solution
Expand Down

0 comments on commit d1888e1

Please sign in to comment.