Working version

This commit is contained in:
Fernando P. Panadero 2024-02-22 13:32:25 +01:00
commit e18ca8155b
7 changed files with 223 additions and 30 deletions

View file

@ -141,77 +141,77 @@ function compute_correlators()
println(log_file,"\nComputing correlators")
println(log_file,"\nComputing f1...")
println(log_file,"\nComputing f1...\n")
global f1 = f1_fun()
println(log_file,"f1 = \n")
println(log_file,"f1 =")
println(log_file,f1)
flush(log_file)
println(log_file,"\nComputing k1...")
println(log_file,"\nComputing k1...\n")
global k1 = k1_fun()
println(log_file,"k1 = \n")
println(log_file,"k1 =")
println(log_file,k1)
flush(log_file)
println(log_file,"\nComputing fP...")
println(log_file,"\nComputing fP...\n")
global fP = fP_fun()
println(log_file,"fP = \n")
println(log_file,"fP =")
for i in 1:lp.iL[4]
println(log_file,fP[i])
end
flush(log_file)
println(log_file,"\nComputing fA...")
println(log_file,"\nComputing fA...\n")
global fA = fA_fun()
println(log_file,"fA = \n")
println(log_file,"fA =")
for i in 1:lp.iL[4]
println(log_file,fA[i])
end
flush(log_file)
println(log_file,"\nComputing gP...")
println(log_file,"\nComputing gP...\n")
global gP = gP_fun()
println(log_file,"gP = \n")
println(log_file,"gP =")
for i in 1:lp.iL[4]
println(log_file,gP[i])
end
flush(log_file)
println(log_file,"\nComputing gA...")
println(log_file,"\nComputing gA...\n")
global gA = gA_fun()
println(log_file,"gA = \n")
println(log_file,"gA =")
for i in 1:lp.iL[4]
println(log_file,gA[i])
end
flush(log_file)
println(log_file,"\nComputing kV...")
println(log_file,"\nComputing kV...\n")
global kV = kV_fun()
println(log_file,"kV = \n")
println(log_file,"kV =")
for i in 1:lp.iL[4]
println(log_file,kV[i])
end
flush(log_file)
println(log_file,"\nComputing lV...")
println(log_file,"\nComputing lV...\n")
global lV = lV_fun()
println(log_file,"lV = \n")
println(log_file,"lV =")
for i in 1:lp.iL[4]
println(log_file,lV[i])
end
flush(log_file)
println(log_file,"\nComputing kT...")
println(log_file,"\nComputing kT...\n")
global kT = kT_fun()
println(log_file,"kT = \n")
println(log_file,"kT =")
for i in 1:lp.iL[4]
println(log_file,kT[i])
end
flush(log_file)
println(log_file,"\nComputing lT...")
println(log_file,"\nComputing lT...\n")
global lT = lT_fun()
println(log_file,"lT = \n")
println(log_file,"lT =")
for i in 1:lp.iL[4]
println(log_file,lT[i])
end

View file

@ -12,7 +12,6 @@ Stores as global variables 'parsed_args' (info from the command line) and 'param
"""
function read_input()
global parsed_args = parse_commandline()
println(log_file,"Reading input file from:", parsed_args["i"], "...")
global params = TOML.parsefile(parsed_args["i"])
return nothing
end
@ -49,7 +48,7 @@ Returns the gauge field and computes the Csw term
"""
function load_gauge_field()
if !parsed_args["cern"]
println(log_file,"\nReading gauge field with LGPU native convention from: ", parsed_args["c"], "...\n")
println(log_file,"\nReading gauge field with LGPU native convention from: ", parsed_args["c"], "...")
U,_ = read_cnfg(parsed_args["c"])
else
println(log_file,"\nReading gauge field with CERN convention from: ", parsed_args["c"], "...\n")
@ -153,12 +152,14 @@ function write_log()
print(log_file,"Calling: ")
print(log_file,PROGRAM_FILE*" "); for x in ARGS; print(log_file,x*" "); end
println(log_file,"")
println(log_file,"\n")
println(log_file,"Version info:")
println(log_file,versioninfo())
versioninfo(log_file)
println(log_file,"")
println(log_file,"Reading input file from:", parsed_args["i"], "...\n")
println(log_file,"Parameters:")
println(log_file,"Lattice size: ", lp.iL)
println(log_file,"Phi0 = ", params["Space"]["phi0"])
@ -170,8 +171,8 @@ function write_log()
println(log_file,"ct = ", dpar.ct)
println(log_file,"tolerance = ", params["Solver"]["tolerance"])
println(log_file,"maxiter = ", params["Solver"]["maxiter"])
println(log_file,"")
flush(log_file)
return nothing
end

View file

@ -15,7 +15,7 @@ function compute_propagators()
psi = scalar_field(Spinor{4,SU3fund{Float64}},lp)
println(log_file,"Computing propagators from t=0 to the bulk")
println(log_file,"\n\nComputing propagators from t=0 to the bulk")
flush(log_file)
niter = bndpropagator!(psi, U, dpar, dws, lp, params["Solver"]["maxiter"], params["Solver"]["tolerance"], 1, 1)
println(log_file,"CG converged for c=1 and s=1 after ",niter," iterations with absolute residue ", CUDA.mapreduce(x -> norm(x), +, dws.sr))
@ -82,7 +82,6 @@ function compute_propagators()
niter = Tbndpropagator!(psi, U, dpar, dws, lp, params["Solver"]["maxiter"], params["Solver"]["tolerance"], 3, 2)
println(log_file,"CG converged for c=3 and s=2 after ",niter," iterations with absolute residue ", CUDA.mapreduce(x -> norm(x), +, dws.sr))
global B32 = Array(psi)
println(log_file,"\n")
flush(log_file)
return nothing
@ -90,7 +89,7 @@ end
function gauge_meas()
println(log_file,"\nGauge meassurements:")
println(log_file,"\nGauge meassurements:\n")
println(log_file,"Plaquette: ", plaquette(U, lp, gp, ymws))
println(log_file,"Topological charge: ", Qtop(U, gp, lp, ymws))
println(log_file,"SF coupling (dS/deta): ",sfcoupling(U, lp, gp, ymws)[1])