1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using LatticeGPU
using TOML
using TimerOutputs
using ArgParse
using CUDA
function thermalize()
println(log_file,"\n Starting simulation\n")
println(log_file,"Thermalizing...")
flush(log_file)
for _ in 1:params["HMC"]["nth"]
HMC!(U,intsch,lp,gp,ymws)
end
return nothing
end
function Gauge_update()
println(log_file,"Performing "*string(params["HMC"]["dmeas"])*" HMC steps...")
flush(log_file)
global dH = 0.0
global acc = true
for _ in 1:params["HMC"]["dmeas"]
dH,acc = HMC!(U,intsch,lp,gp,ymws)
acc ? (global Nmc_acc += 1) : println(log_file,"Rejected HCM step")
end
global MCid = MCid + 1
println(log_file,"Updated to Gauge configuration n"*string(MCid))
println(log_file,"dH = ",dH)
println(log_file,"acc = ",Nmc_acc/(params["HMC"]["dmeas"] * MCid))
println(log_file,"Plaq = ", plaquette(U, lp, gp, ymws))
println(log_file,"Qtop = ", Qtop(U, gp, lp, ymws))
Csw!(dws,U,gp,lp)
U_CPU .= Array(U)
flush(log_file)
return nothing
end