Preconditioning - lattice/quda GitHub Wiki

Precondition an inversion with a good preconditioner speeds up the inversion.

In QUDA when using preconditioned CG (PCG) for Mobius domain wall fermion there are two options to set when choosing the preconditioner:

  1. Schwarz type: additive or none. See MSPCG.
  2. Accelerator type: MADWF or none. See MADWF.

The outer product of these options give 4 different preconditioners:

Syntax MADWF No accelerator
Additive Schwarz The MdagMLocal op with MADWF The MdagMLocal op
No Schwarz The MdagM op with MADWF The MdagM op

A test command: (note the options for --precon-type, --precon-schwarz-type and --precon-accelerator-type)

for INNER_SOLVER in "cg" "ca-cg"
do
for ACCELERATOR_TYPE in "madwf" "invalid"
do
for SCHWARZ_TYPE in "additive" "invalid"
do
$EXE \
 --dim ${LOCALSIZE} --gridsize ${GRIDSIZE} \
 --dslash-type mobius --Lsdim 12 --m5 -1.1 --b5 1.5 --c5 0.5 --mass 0.00152 \
 --verbosity verbose --verbosity-precondition summarize \
 --nsrc 1 \
 --solution-type mat --matpc even-even --solve-type normop-pc \
 --prec double --prec-sloppy half --prec-precondition half \
 --recon 12 \
 --reliable-delta 0.1 --alternative-reliable true \
 --inv-type pcg --precon-type ${INNER_SOLVER} --precon-schwarz-type ${SCHWARZ_TYPE} --precon-accelerator-type ${ACCELERATOR_TYPE} \
 --tol 1e-10 --tol-precondition 1e-6 --niter 14000 --maxiter-precondition 6 --ca-basis-type-precondition chebyshev \
 --madwf-diagonal-suppressor 0.310 \
 --madwf-ls 4 \
 --madwf-null-miniter 10 \
 --madwf-null-tol 1e-6 \
 --madwf-train-maxiter 160 \
 --madwf-param-load false \
 --madwf-param-save true \
 --madwf-param-infile ${QUDA_RESOURCE_PATH} \
 --madwf-param-outfile ${QUDA_RESOURCE_PATH}
done
done
done

Note that running with --madwf-param-load false with MADWF will trigger a parameter training, so you probably do not want to run with that with multiple sources. Once the trained parameter has been saved, one can run directly with --madwf-param-save true.