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

7
.gitignore vendored Normal file
View file

@ -0,0 +1,7 @@
output/*
cnfg/*
input/*
!output/Template_run.log
!cnfg/randfield
!input/sfcf.in

BIN
cnfg/randfield Normal file

Binary file not shown.

184
output/Template_run.log Normal file
View file

@ -0,0 +1,184 @@
Running sfcf.jl by Lattice_user. Name of the run: Template_run
Calling: sfcf.jl -i ./input/sfcf.in -c ./cnfg/randfield
Version info:
Julia Version 1.8.5
Commit 17cfb8e65ea (2023-01-08 06:45 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 128 × AMD EPYC 7452 32-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, znver2)
Threads: 1 on 128 virtual cores
Reading input file from:./input/sfcf.in...
Parameters:
Lattice size: (8, 8, 8, 8)
Phi0 = [0.0, 0.0]
PhiT = [0.0, 0.0]
cG = 0.965530530296619
kappa = 0.1324767
theta = 0.5
csw = 1.239426196162344
ct = 0.98718528389891
tolerance = 1.0e-13
maxiter = 1000
Reading gauge field with LGPU native convention from: ./cnfg/randfield...
Gauge meassurements:
Plaquette: 0.3306405864818687
Topological charge: -0.057705150807682376
SF coupling (dS/deta): 6.346811365600632
Computing propagators from t=0 to the bulk
CG converged for c=1 and s=1 after 50 iterations with absolute residue 0.0009654241012493543
CG converged for c=2 and s=1 after 50 iterations with absolute residue 0.0009792505060407602
CG converged for c=3 and s=1 after 50 iterations with absolute residue 0.0009410537206344275
CG converged for c=1 and s=2 after 50 iterations with absolute residue 0.0009706380660725444
CG converged for c=2 and s=2 after 50 iterations with absolute residue 0.0009348723257035598
CG converged for c=3 and s=2 after 50 iterations with absolute residue 0.0009646157878217441
Computing propagators from t=T to the bulk
CG converged for c=1 and s=1 after 50 iterations with absolute residue 0.0009409155699679223
CG converged for c=2 and s=1 after 50 iterations with absolute residue 0.0009591325218333536
CG converged for c=3 and s=1 after 50 iterations with absolute residue 0.000993180324656404
CG converged for c=1 and s=2 after 50 iterations with absolute residue 0.0009696740933237723
CG converged for c=2 and s=2 after 50 iterations with absolute residue 0.0009753894671580818
CG converged for c=3 and s=2 after 50 iterations with absolute residue 0.0009677391305951339
Computing correlators
Computing f1...
f1 =
7.968153189691683e-10
Computing k1...
k1 =
5.773208341735963e-10 + 0.0im
Computing fP...
fP =
0.0 + 0.0im
0.39164297606334497 + 0.0im
0.03838253084495811 + 0.0im
0.0036829603591832434 + 0.0im
0.00034990928932360324 + 0.0im
3.1848709670960246e-5 + 0.0im
2.83087866678673e-6 + 0.0im
2.552038846719931e-7 + 0.0im
Computing fA...
fA =
0.0 + 0.0im
-0.28022427481948287 + 3.9466441386130056e-20im
-0.028432536079057023 - 9.446402595355576e-22im
-0.002717462099554097 + 4.301339185275744e-23im
-0.0002553997594898297 - 2.8822074468644558e-24im
-2.3190475107607993e-5 - 1.34416849539867e-24im
-2.078551613006522e-6 - 3.0342745858421e-25im
-1.8801834874904572e-7 - 1.7443292336247013e-26im
Computing gP...
gP =
0.0 + 0.0im
2.538597063821986e-7 + 0.0im
2.8229409631152233e-6 + 0.0im
3.096526353494133e-5 + 0.0im
0.0003331843094846162 + 0.0im
0.0036254847521787863 + 0.0im
0.03837127818992878 + 0.0im
0.39410791485294716 + 0.0im
Computing gA...
gA =
0.0 + 0.0im
-1.8696507552685477e-7 - 6.096317075547979e-27im
-2.0658936442177055e-6 - 3.842068152788416e-26im
-2.2674085372631826e-5 - 8.56261180963095e-25im
-0.00024433351353064797 + 9.060212646869881e-24im
-0.0026482638745495414 + 2.161009350294785e-22im
-0.028194731180271545 + 5.375019620369574e-21im
-0.28340818434504744 + 2.511320339710992e-20im
Computing kV...
kV =
0.0 + 0.0im
0.33632172225753315 - 1.0340860564396276e-20im
0.03186802210515694 - 9.926167350636303e-23im
0.0029308316253718663 - 1.1084220208210557e-22im
0.0002663612299706971 + 3.171720661258017e-23im
2.3221979105382962e-5 - 1.3495537858449775e-24im
1.9759435694009697e-6 + 3.989827059409007e-25im
1.7038427603748213e-7 + 2.5655860266867883e-26im
Computing lV...
lV =
0.0 + 0.0im
1.692538762882869e-7 - 1.2470313189733742e-26im
1.972297868357158e-6 + 1.9703431420432253e-25im
2.2655589268307515e-5 + 4.094974855373194e-24im
0.0002539424459369091 - 2.540133797714921e-23im
0.0028788471359388916 - 4.1193594505140788e-22im
0.031803280548268274 + 2.5322755818956662e-21im
0.3390357554359771 - 7.90564084104014e-21im
Computing kT...
kT =
0.0 + 0.0im
-0.30173882074287517 + 5.293955920339405e-22im
-0.028918463611070797 - 1.548482106699267e-21im
-0.002655774263798736 + 6.81045371001993e-23im
-0.00024049035597286907 + 3.794691060087014e-23im
-2.0961481048454104e-5 - 1.4734154661100807e-24im
-1.7864824922599887e-6 + 1.9037001727701538e-25im
-1.543158528170733e-7 + 2.862618452866008e-26im
Computing lT...
lT =
0.0 + 0.0im
-1.5314862576847136e-7 + 3.022494262990794e-26im
-1.781979951825098e-6 + 3.204247815553729e-26im
-2.0486213262577787e-5 - 4.26515003347655e-25im
-0.00022976131918157333 - 4.718376077437893e-23im
-0.002600005011614236 + 1.9521462456251453e-22im
-0.028781733302634345 - 3.211666591672554e-21im
-0.3047801284340767 + 6.988021814847987e-21im
────────────────────────────────────────────────────────────────────────────────
Time Allocations
─────────────────────── ────────────────────────
Tot / % measured: 108s / 89.1% 11.3GiB / 90.7%
Section ncalls time %tot avg alloc %tot avg
────────────────────────────────────────────────────────────────────────────────
Propagator computa... 1 52.8s 54.7% 52.8s 5.99GiB 58.3% 5.99GiB
g5Dw 12 2.80s 2.9% 233ms 220MiB 2.1% 18.3MiB
DwdagDw 600 732ms 0.8% 1.22ms 14.7MiB 0.1% 25.1KiB
g5Dw 1.20k 694ms 0.7% 578μs 11.1MiB 0.1% 9.46KiB
SF boundary fix 1.20k 37.2ms 0.0% 31.0μs 3.41MiB 0.0% 2.91KiB
SF boundary fix 12 702ms 0.7% 58.5ms 29.9MiB 0.3% 2.49MiB
Gauge field reading 1 19.7s 20.4% 19.7s 1.52GiB 14.8% 1.52GiB
Csw computation 1 16.5s 17.1% 16.5s 1.14GiB 11.1% 1.14GiB
Gauge measurements 1 18.2s 18.8% 18.2s 1.83GiB 17.8% 1.83GiB
Qtop measurement 1 8.15s 8.5% 8.15s 691MiB 6.6% 691MiB
Plaquette measur... 1 1.96s 2.0% 1.96s 157MiB 1.5% 157MiB
SF coupling meas... 1 1.82s 1.9% 1.82s 137MiB 1.3% 137MiB
Imput reading and ... 1 4.46s 4.6% 4.46s 529MiB 5.0% 529MiB
Allocating Dirac... 1 157ms 0.2% 157ms 1.15MiB 0.0% 1.15MiB
Allocating YMWor... 1 46.5μs 0.0% 46.5μs 1.03KiB 0.0% 1.03KiB
Correlators contra... 1 1.39s 1.4% 1.39s 428MiB 4.1% 428MiB
────────────────────────────────────────────────────────────────────────────────

View file

@ -3,17 +3,18 @@ using TOML
using TimerOutputs
using ArgParse
using CUDA
using InteractiveUtils
include("./src/io.jl")
include("./src/meas.jl")
include("./src/corr.jl")
log_file = open("./output/"*params["Run"]["name"]*".log","w+")
write_log()
@timeit "Imput reading and space allocation" begin
read_input()
load_structs()
global log_file = open("./output/"*params["Run"]["name"]*".log","w+")
write_log()
U = vector_field(SU3{Float64}, lp)
end
@ -31,3 +32,4 @@ print_timer(log_file)
flush(log_file)
close(log_file)

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])