Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, this is a modification to the
QDPCloverTerm
andCloverFermActParams
classes to allow calculations with the exponential version of the Wilson Clover Action (or Stabilized Wilson Fermions), see DOI: 10.1016/j.cpc.2020.107355 for more details.I had contacted B. Joo about a year ago, the solution I made then (and that I have been using since) was not really the optimal one, as it required a lot of file duplication.
This version here instead adds an optional parameter to the clover action , which defaults to false, the regular case. If it is true then some small changes are made in the creation of the
CloverTerm
linear operator and anexponentiate
function is called.The changes to the file
lib/actions/ferm/linop/clover_term_qdp_w.h
are minimal, and hopefully not breaking for any existing code.The changes in the
lib/actions/ferm/fermacts/clover_fermact_params_w.h
andlib/actions/ferm/fermacts/clover_fermact_params_w.cc
since the new parameter default to false surely are non breaking.There is just a new file that I called
lib/actions/ferm/linop/clover_term_qdp_stabilized_helpers.h
that contains the exponentiation of the clover term at the lattice site level. This latter is also added to the properMakefile.am
. (Probably one needs to add it to theCMakeLists.txt
file, but I have little experience with those for chroma, so I'd rather have a later commit fix it)The implementation right now only works with solvers that load the linear operator from the CPU and do not build it directly on an accelerator. I have tested this with the regular
CLOVER
solver, theQUDA_CLOVER_INVERTER
andQPHIX_CLOVER_INVERTER
solvers, all with results that are within the solver precision. These have also been compared with my old implementation which was tested against the openQCD version of the solver used in the paper linked above.This only works for spectroscopy, not for gauge generation, as there are no derivatives implemented for this new action yet.