etmc / tmLQCD

tmLQCD is a freely available software suite providing a set of tools to be used in lattice QCD simulations. This is mainly a HMC implementation (including PHMC and RHMC) for Wilson, Wilson Clover and Wilson twisted mass fermions and inverter for different versions of the Dirac operator. The code is fully parallelised and ships with optimisations for various modern architectures, such as commodity PC clusters and the Blue Gene family.
http://www.itkp.uni-bonn.de/~urbach/software.html
GNU General Public License v3.0
32 stars 47 forks source link

added interface for saving gauge back to host #582

Closed aniketsen closed 8 months ago

aniketsen commented 9 months ago

added interface function _saveGaugeQuda to save gauge from QUDA back to host. Reordering back to tmLQCD format is performed with reorder_gauge_fromQuda.

aniketsen commented 9 months ago

@kostrzewa since _saveGaugeQuda is implemented now, I think _loadGaugeQuda also needs to be generalized to load any given gauge and not just g_gauge_field. Otherwise one can only save the gauge on device back to only g_gauge_field in order to load it back again. Also one needs a flag for reloading already loaded gauge back to device, since currently the only way to do it is to set g_gauge_state.loaded to 0 (which I did for testing, but removed in the commit, since it is not correct).

kostrzewa commented 8 months ago

We should still discuss how to make sure that gauge_quda is reset when it is next used as in the current situation g_gauge_field and gauge_quda will of course go out of sync...