Typos, volume bug and extra log

parent 7192a036
......@@ -3,7 +3,7 @@ user = "Lattice_user"
name = "Run1L32"
[Space]
bc = OPEN # Either OPEN, PERIODIC, SF_AFWB or SF_ORBI
bc = 3 # 3 OPEN, 0 PERIODIC, SF_AFWB or SF_ORBI
size = [32,32,32,32]
blocks = [4,4,4,4]
......
......@@ -55,7 +55,7 @@ Stores in global variables the needed structures, i.e. lp, gp, dpar, dws, ymws
function load_structs()
CUDA.device!(parsed_args["G"])
global lp = SpaceParm{4}(tuple(params["Space"]["size"]...), tuple(params["Space"]["blocks"]...),"BC_"*params["Space"]["bc"], (0,0,0,0,0,0))
global lp = SpaceParm{4}(tuple(params["Space"]["size"]...), tuple(params["Space"]["blocks"]...),params["Space"]["bc"], (0,0,0,0,0,0))
global gp = GaugeParm{Float64}(SU3{Float64},params["HMC"]["beta"],params["HMC"]["c0"],(params["HMC"]["cG"],0.0),(0.0,0.0),lp.iL);
global dpar = DiracParam{Float64}(SU3fund,(1/(2*params["Fermion"]["kappa"])) - 4,params["Fermion"]["csw"],ntuple(i -> exp(((i!=4)*im*params["Fermion"]["theta"]/lp.iL[i]) + ((i==4)*im*params["Fermion"]["theta_t"]/lp.iL[i])),4),0.0,params["Fermion"]["ct"]);
global dws = DiracWorkspace(SU3fund,Float64,lp);
......@@ -66,6 +66,11 @@ function load_structs()
global flow_times = params["Measurements"]["Flow_times"]
global N_noise = params["Measurements"]["N_noise"]
global MCid = 0
if params["Space"]["bc"] == 0
global V4 = prod(lp.iL[1:3])*(lp.iL[4]-1)
else
global V4 = prod(lp.iL)
end
global Nmc_acc = 0
global RUN_ON = true
......
......@@ -14,10 +14,10 @@ function therm_or_readlist()
@timeit "Thermalization" for _ in 1:params["HMC"]["nth"]
HMC!(U,intsch,lp,gp,ymws)
end
else
println(log_file,"Loading gauge configurations from "*string(parsed_args["c"]))
read_config_list()
flush(log_file)
end
f = open("RUN_ON_"*params["Run"]["name"],"w+")
close(f)
......@@ -70,7 +70,7 @@ function read_config_list()
f = open(parsed_args["c"],"r")
while true
push!(CONFIG_LIST,"./cnfg/"*readline(f))
CONFIG_LIST[end] == "" ? break : nothing
CONFIG_LIST[end] == "./cnfg/" ? break : nothing
end
println(log_file,"Read ", length(CONFIG_LIST)-1, " config names for analisis")
return nothing
......
......@@ -40,16 +40,17 @@ function two_pt()
println(log_file,"Measuring 2pt...")
flush(log_file)
Eoft[1] = Eoft_plaq(U, gp, lp, ymws) : nothing
Eoft[1] = Eoft_plaq(U, gp, lp, ymws)
for noi in 1:N_noise
propagator!(psi,U, dpar, dws, lp,params["Measurements"]["maxiter"], params["Measurements"]["tolerance"],params["Fermion"]["tsource"])
niter = propagator!(psi,U, dpar, dws, lp,params["Measurements"]["maxiter"], params["Measurements"]["tolerance"],params["Fermion"]["tsource"])
println(log_file,"CG converged after ",niter," iterations with residue ",CUDA.mapreduce(x -> norm2(x), +, dws.sr))
pp_density .= Array(norm2.(psi))
ap_density .= Array(dot.(psi,dmul.(Gamma{4},psi)))
pp_corr_t0[:,noi] .= zero(Float64)
ap_corr_t0[:,noi] .= zero(ComplexF64)
for t in 1:lp.iL[4]
......@@ -123,7 +124,9 @@ function one_pt()
dws.sp .= dmul.(Gamma{5},psi)
g5Dw!(psi,U,dws.sp,dpar,dws,lp)
CG!(psi,U,DwdagDw!,dpar,lp,dws,params["Measurements"]["maxiter"], params["Measurements"]["tolerance"])
niter = CG!(psi,U,DwdagDw!,dpar,lp,dws,params["Measurements"]["maxiter"], params["Measurements"]["tolerance"])
println(log_file,"CG converged after ",niter," iterations with residue ",CUDA.mapreduce(x -> norm2(x), +, dws.sr))
copyto!(dws.sp,psi_CPU)
Quark_cond[noi,fl] = sum(dot.(dws.sp,psi))
......@@ -134,8 +137,8 @@ function one_pt()
end
end
Quark_cond .= Quark_cond./prod(lp.iL)
Quark_cond_cfl .= Quark_cond_cfl./prod(lp.iL)
Quark_cond .= Quark_cond./V4
Quark_cond_cfl .= Quark_cond_cfl./V4
println(log_file,"Finished measuring 1pt")
return nothing
......@@ -171,7 +174,7 @@ function two_pt_rnd()
copyto!(U,U_CPU)
end
phat_t .= phat_t./prod(lp.iL)
phat_t .= phat_t./V4
println(log_file,"Finished measuring PhatPt")
flush(log_file)
......
......@@ -12,7 +12,7 @@ function read_ff(name::String)
end
dims=Vector{Int32}(undef,1)
iL=Vector{Int32}(undef,4)
dpars=Vector{Float64}(undef,3) # m0,csw,Cfl
dpars=Vector{Float64}(undef,2) # m0,csw
th=Vector{ComplexF64}(undef,4)
nflow=Vector{Int32}(undef,1)
N_noise=Vector{Int32}(undef,1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment