def test_hmc(total_site, ga): # q.qmkdir_info("results") q.qmkdir_info("results/gf_info") q.qmkdir_info("results/wilson_flow_energy_info") q.qmkdir_info("results/gm_force_info") # geo = q.Geometry(total_site, 1) rs = q.RngState("test_hmc-{}x{}x{}x{}".format(total_site[0], total_site[1], total_site[2], total_site[3])) gf = q.GaugeField(geo) q.set_unit(gf) traj = 0 for i in range(4): traj += 1 run_hmc(gf, ga, traj, rs.split("hmc-{}".format(traj))) plaq_avg = q.gf_avg_plaq(gf) plaq_sum = np.prod(total_site) * 6.0 * (1.0 - plaq_avg) q.displayln_info("test_hmc: traj={} ; plaq_avg={}".format( traj, plaq_avg)) if traj % 2 == 0: q.display_gauge_field_info_table_with_wilson_flow( "results/gf_info/traj={}.lat".format(traj), "results/wilson_flow_energy_info/traj={}.lat".format(traj), gf, 0.1, 5, 2) q.save_gm_force_magnitudes_list( "results/gm_force_info/traj={}.lat".format(traj))
#!/usr/bin/env python3 import qlat_gpt as qg import qlat as q import gpt as g qg.begin_with_gpt() q.qremove_all_info("results") q.qmkdir_info("results") total_site = [4, 4, 4, 8] geo = q.Geometry(total_site, 1) q.displayln_info("geo.show() =", geo.show()) rs = q.RngState("seed") gf = q.GaugeField(geo) gf.set_unit() gf.show_info() mass = 0.05 m5 = 1.0 qinv = q.InverterDwfFreeField(mass=mass, m5=m5, timer=q.Timer("py:InverterDwfFreeField")) mobius_params = { "mass": mass, "M5": m5, "b": 1.0,
def run(job_tag, traj): q.qmkdir_info(f"locks") q.qmkdir_info(get_save_path(f"")) q.qmkdir_info(get_save_path(f"eig")) q.qmkdir_info(get_save_path(f"eig/{job_tag}")) q.qmkdir_info(get_save_path(f"configs")) q.qmkdir_info(get_save_path(f"configs/{job_tag}")) # total_site = ru.get_total_site(job_tag) geo = q.Geometry(total_site, 1) q.displayln_info("geo.show() =", geo.show()) # path_gf = get_load_path(f"configs/{job_tag}/ckpoint_lat.{traj}") if path_gf is None: gf = mk_sample_gauge_field(job_tag, traj) gf.show_info() gf.save(get_save_path(f"configs/{job_tag}/ckpoint_lat.{traj}")) else: gf = q.GaugeField() gf.load(path_gf) # if q.obtain_lock(f"locks/{job_tag}-{traj}-compute-eig"): get_eig = compute_eig(gf, job_tag, inv_type=0, path=f"eig/{job_tag}/traj={traj}") test_eig(gf, get_eig(), job_tag, inv_type=0) q.release_lock()