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

add control over refinement precision to QUDA interface #501

Closed kostrzewa closed 2 years ago

kostrzewa commented 2 years ago

In solves using QUDA's multishift-CG, one can choose to perform the multi-shift solve up to some given precision (let's say single) which may already converge some of the largest shifts. The remaining ones are then refined using mixed-precision CG one by one up to target precision (for those that already converged, no iterations are done, but their residuals are checked). Currently, the QUDA interface sets the precision for the multi-shift solve and the refinement stage to the same value.

In order to optimise the 1+1 sector, it would probably be useful to do the multishift-CG in single precision and to then refine using a double-half mixed solver.

This requires the introduction of another parameter to control refinement precision directly and to modify how the precisions are set in the QUDA interface.

kostrzewa commented 2 years ago

done in 64c3ec62d0d1388f1b7ccaba1013996cd66541c9

kostrzewa commented 2 years ago

Unfortunately this causes a regression in the treatment of precisions in the MG when gauge and coarse clover precisions are compared. Attempting to fix it by keeping track of the precisions has not helped so I've pushed that and the reversion of the two commits 64c3ec6 and ded7dc507daa36dc56bd47b7fd8b11922d061ba3.

Leaving issue open to tackle in the future. The performance gain will not be major and right now a working setup is more important.

kostrzewa commented 2 years ago

https://github.com/lattice/quda/pull/1245 seems to have fixed the issue that I observed back in September and now we can proceed with #521. Needs testing before it's used in practice (since I messed up before and had to revert the previous incarnation of this...)

kostrzewa commented 2 years ago

closed via #521