lattice / quda

QUDA is a library for performing calculations in lattice QCD on GPUs.
https://lattice.github.io/quda
Other
287 stars 94 forks source link

Staggered invert test cleanup + expanded staggered gtest support #1421

Closed weinbe2 closed 7 months ago

weinbe2 commented 8 months ago

This PR is a massive cleanup and refactor of various staggered test executables: staggered_dslash_(c)test, staggered_invert_test, staggered_eigensolve_test, and hisq_stencil_test. Motivators:

Some cleanup happened along the way:

A few gotchas of note:

I did make a few changes in preparation of adding support for the "local" staggered operators, which can be used for Schwarz preconditioning. This includes copying and pasting some relevant bits of code from Wilson-type files into the staggered-type files, commenting the code out, and explicitly leaving an additional comment that this is for future reference. I know this is generally not a best practice, but hopefully it's understandable in this case.

As it stands, a staggered-only build does indeed pass ctest -v.

There are some small bits of outstanding work, but nothing I see as holding up PR review right now. They are:

weinbe2 commented 7 months ago
  • Staggered eigensolves take much longer than their Wilson brethren. Anything to be done here?
  • HISQ stencil test looks like it's taking longer than expected: is there unnecessary setup being redone between partitions?

Based on offline conversations, the time spent on staggered eigensolves has been addressed in https://github.com/lattice/quda/pull/1421/commits/a1303bd612cf8dfaf5b7a7070cd5871ad4b6b5ce , plus some additional opportunities to speed up the unit tests run on CSCS in https://github.com/lattice/quda/pull/1421/commits/3252b6cdf1c1e66a27ce27677e9b776014e15190 . The HISQ stencil test time was decided to be reasonable.

weinbe2 commented 7 months ago

~@maddyscientist this should be good for a last review + clang-format~

Got a few things to fix in BiCGstab with regards to MG (near-null vector generation and pre-smoothing)