etmc / tmLQCD

tmLQCD is a freely available software suite providing a set of tools to be used in lattice QCD simulations. This is mainly a HMC implementation (including PHMC and RHMC) for Wilson, Wilson Clover and Wilson twisted mass fermions and inverter for different versions of the Dirac operator. The code is fully parallelised and ships with optimisations for various modern architectures, such as commodity PC clusters and the Blue Gene family.
http://www.itkp.uni-bonn.de/~urbach/software.html
GNU General Public License v3.0
32 stars 47 forks source link

invert_doublet_eo_quda does not reset the MG precon settings #580

Closed kostrzewa closed 5 months ago

kostrzewa commented 5 months ago

When using tmLQCD as an interface to drive QUDA solvers involving both light and ND inversions, the former using MG preconditioning, invert_doublet_eo_quda will not initialise its solver parameters correctly. In particular, the MG preconditioner will not be disabled even though it is not supported.

To be specific, in a run with the following operators defined:

BeginOperator CLOVER
  CSW = 1.74
  kappa = 0.1400645
  2KappaMu = 0.001484684
  UseExternalInverter = quda
  SolverPrecision = 1e-24
  useevenodd = yes

  MaxSolverIterations = 500
  solver = mg
  UseSloppyPrecision = single
EndOperator

BeginOperator CLOVER
  CSW = 1.74
  kappa = 0.1400645
  2KappaMu = -0.001484684
  UseExternalInverter = quda
  SolverPrecision = 1e-24
  useevenodd = yes

  MaxSolverIterations = 500
  solver = mg
  UseSloppyPrecision = single
EndOperator

BeginOperator DBCLOVER
  CSW = 1.74
  kappa = 0.1400645
  2KappaMuBar = 0.03944216322
  2KappaEpsBar = 0.0426076209
  UseExternalInverter = quda
  SolverPrecision = 1e-24
  useevenodd = yes

  MaxSolverIterations = 30000
  solver = cg
  UseSloppyPrecision = half
EndOperator

when either of the CLOVER operators is inverted before the DBCLOVER operator, the inv_param will be left in a state in which QUDA will attempt to use the MG preconditioner, which of course fails.

kostrzewa commented 5 months ago

fixed by #581