Closed weinbe2 closed 1 year ago
The term masses
isn’t appropriate for Wilson and it would be more appropriate to call these offsets or shifts. Similarly, the scaling that’s been applied in invert_test
doesn’t make sense, since we would want ideally to just specify raw numbers from the poles from RHMC.
How about a flag —multishift-offset
to specify the raw (unscaled) shifts for Wilson like solvers and for staggered it could work with either the offset or masses option, with the rescaling only being applied when the masses option is specified?
The term
masses
isn’t appropriate for Wilson and it would be more appropriate to call these offsets or shifts. Similarly, the scaling that’s been applied ininvert_test
doesn’t make sense, since we would want ideally to just specify raw numbers from the poles from RHMC.How about a flag
—multishift-offset
to specify the raw (unscaled) shifts for Wilson like solvers and for staggered it could work with either the offset or masses option, with the rescaling only being applied when the masses option is specified?
I applied your suggestion for Wilson-type fermions. There are too many conventions under the hood for staggered fermions for me to want to "poke the bear" on handling shifts vs masses at this time...
This very narrow PR adds command line arguments for specifying custom masses, tolerances, and HQ tolerances for each shift in multishift solves for both staggered and Wilson-type solves. The default behavior is to base masses off the mass (with extended shifts adding
0.01 * i * i
, as before) and to usetol
andtol_hq
for all of the shifts, but the flags--multishift-masses
,--multishift-tol
, andmultishift-tols-hq
can be used to override this behavior.Examples below are for staggered; remove the
--dslash-type staggered --compute-fat-long true --test 5
to test Wilson-type operators.4-shift solve with default masses, tols:
4-shift solve with custom masses, default tols:
4-shift solve with custom masses and tolerances:
If the number of masses, etc, does not agree with the argument to
--multishift
the tests will intentionally error out.Outstanding work is minimal:
clang-format