Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update reweighting routines for change in kappa #624

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Finkenrath
Copy link
Contributor

Update reweighting routines to enable reweighting in "kappa"

  • update global kappa during the calculations
  • reset global kappa after factors are calculated
  • update kappa within DDalphaAMG interface
    Note: Check if similar actions are needed within the QUDA interface (kappa is usually not changed during HMC / inversions etc.)

@Marcogarofalo
Copy link
Contributor

I checked that QUDA in the light sector works out of the box. For the non-degenerete it was not working, I add the interface using the multishift solver. The result seems unchanged to me

@@ -56,23 +56,23 @@ void reweighting_factor(const int N, const int nstore) {
init_sw_fields();

if(mnl->type != NDCLOVERRATCOR && (mnl->kappa != mnl->kappa2
|| (mnl->type == NDDETRATIO
|| (mnl->type == NDCLOVERDETRATIO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I change the lines here such that now with a:

  • NDCLOVERDETRATIO monomial we call sw_trace_nd
  • CLOVERDETRATIORW monomial we call sw_trace
  • NDDETRATIO monomial there is no trlog to compute, also this now can call QUDA inverter

it is necessary when using quda inverter since the only interface implemented is the multishift
@Marcogarofalo
Copy link
Contributor

now we pass the test that the reweighting factor of an NDCLOVERDETRATIO monomial with 2KappaEpsBar = 0 is equal to the one a CLOVERDETRATIORW with 2KappaMu = 2Kappamubar. The trlog part is exactly the same, the stochastic part is only the same up to stochastic noise anyhow for the parameter I tested the first two digits coincide.

In more detail NDCLOVERDETRATIO monomial

BeginMonomial NDCLOVERDETRATIO
  Timescale = 1
  CSW = 1.69
  # nominator parameters
  2KappaEpsBar  = 0.00
  2Kappamubar   = 0.06
  kappa = 0.1394265
  # denominator parameters
  2KappaEpsBar2 = 0.0
  2Kappamubar2  = 0.06001
  kappa2 = 0.1394265
  AcceptancePrecision =  1.e-26
  Name = ndcloverdetratio
  # useexternalinverter = quda
  UseSloppyPrecision = single
  RefinementPrecision = single
  solver= cgmmsnd
EndMonomial
BeginMonomial CLOVERDETRATIORW
  Timescale = 1
  CSW = 1.69
  # nominator parameters
  2KappaMu  = 0.06000
  kappa = 0.1394265
  rho = 0.0
  # denominator parameters
  2KappaMu2 = 0.06001
  ## for reweighting only rho=rho2 makes sense
  rho2 = 0.0
  kappa2 = 0.1394265
  AcceptancePrecision =  1.e-26
  Name = cloverdetratiorw
  useexternalinverter = quda
  UseSloppyPrecision = single
  #solver = mg
  solver = cg
EndMonomial

@Finkenrath
Copy link
Contributor Author

Good spotted.

@kostrzewa
Copy link
Member

@Marcogarofalo for NDCLOVERDETRATIO you can use

  UseSloppyPrecision = half
  RefinementPrecision = half

for an extra speed-up as this will be basically like running double-half mixed-precision CG. (with some small overhead)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants