paboyle / Grid

Data parallel C++ mathematical object library
GNU General Public License v2.0
155 stars 111 forks source link

NERSC and ILDG for non-SU(3) configuration checkpoints #377

Closed RJHudspith closed 2 years ago

RJHudspith commented 2 years ago

Fixes this issue : https://github.com/paboyle/Grid/issues/376 so that the NERSC header is more Nc-aware. Checked the NERSC_GAUGE and NERSC_GAUGE_2x2 against my implementation in GLU for SU(2) (and checked that I didn't break the SU(3) config writer/reader), where NERSC_GAUGE is understood to be logically just the first row for SU(2).

I changed the normalisation for the trace (function LinkTrace) in: ./Grid/qcd/utils/WilsonLoops.h from 3 to Nc. This matches the convention used in other parts of the code, such as the average plaquette.

While compiling the tests for Nc=2 a couple of files will not compile: ./tests/core/Test_lie_generators.cc ./tests/core/Test_reunitarise.cc as they have specific calls to SU3:: for gauge-field stuff and then call peeks and pokes that are Nc-aware so these obviously break. Lazily, I just guard these with an #ifdef Nc==3 block. A similar problem, that I resolved better was with the #if #else block in ./tests/solver/Test_coarse_even_odd.cc

As I compiled without the lime library I found out that several other tests simply fail to compile, so I #ifdef'd them out or switched them to natively-supported options, these were: ./tests/lanczos/Test_compressed_lanczos.cc ./tests/lanczos/Test_dwf_compressed_lanczos_reorg.cc ./tests/solver/Test_dwf_mrhs_cg.cc ./tests/hmc/Test_hmc_ScalarActionNxN.cc ./tests/hmc/Test_hmc_WG_Production.cc

I added a 5 into the configure.ac for the helper argument as the code says this is suported.

I deleted Version.h and Config.h from the HFILES ./Grid/Makefile.am as Config.h is included elsewhere and included like this break the compilation for generic, non-simd builds and I am not entirely sure what the purpose of Version.h really is here. This issue has been discussed in https://github.com/paboyle/Grid/issues/227 and https://github.com/paboyle/Grid/issues/289

paboyle commented 2 years ago

Thanks Jamie, apologies for taking so long to look through this.