lattice / quda

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

Bugfix for single-parity vector inflation in `VectorIO` #1457

Closed weinbe2 closed 2 months ago

weinbe2 commented 2 months ago

This hotfix branch fixes a bug where the flag --eig-io-parity-inflate yes (more specifically, the underlying variable set in the eigensolver parameters structure) wasn't being respected when saving vectors from single-parity operators.

As part of fixing this bug, I extended the io_test unit tests to explicitly check parity inflation for both even and odd vectors. The test to save an inflated single-parity field, load the resulting full field, and make sure the even or odd subset of the loaded full field (as appropriate) matches the saved field.

This bug was originally reported by @leonhostetler, who has independently verified that this fix addresses the issue he was hitting in his workflow --- thank you for catching it!

(FYI @maddyscientist --- I clang-formated this along the way, so there's no need for a subsequent clang-format commit.)

weinbe2 commented 2 months ago

FYI: I confirmed that mpirun -np 2 ./io_test --gridsize 1 1 1 2, i.e., a multi-GPU run with both staggered and Wilson fermions, successfully passes.