First test for tsource in Sigma. Read not updated.

parent 47fdfc88
using Pkg using Pkg
Pkg.activate("/home/fperez/Git/LGPU_fork_ferflow") Pkg.activate("/home/fperez/Git/LGPU_fork")
using LatticeGPU using LatticeGPU
using TOML using TOML
......
...@@ -146,8 +146,10 @@ function save_data() ...@@ -146,8 +146,10 @@ function save_data()
for fl in 1:length(flow_times) for fl in 1:length(flow_times)
BDIO_write!(fb,pp_corr_t[:,noi,fl]) BDIO_write!(fb,pp_corr_t[:,noi,fl])
BDIO_write!(fb,ap_corr_t[:,noi,fl]) BDIO_write!(fb,ap_corr_t[:,noi,fl])
BDIO_write!(fb,[Quark_cond[noi,fl]]) ## Testblock 4 : Changed the saving of Sigma
BDIO_write!(fb,[Quark_cond_cfl[noi,fl]]) BDIO_write!(fb,[Quark_cond[:,noi,fl]])
BDIO_write!(fb,[Quark_cond_cfl[:,noi,fl]])
##
BDIO_write!(fb,[phat_t[noi,fl]]) BDIO_write!(fb,[phat_t[noi,fl]])
end end
end end
......
...@@ -25,8 +25,15 @@ function load_fields() ...@@ -25,8 +25,15 @@ function load_fields()
global Eofpla = Array{Complex{Float64}}(undef,lp.iL[4],lp.npls); global Eofpla = Array{Complex{Float64}}(undef,lp.iL[4],lp.npls);
global phat_t = Array{Float64}(undef,N_noise,length(flow_times)); global phat_t = Array{Float64}(undef,N_noise,length(flow_times));
global Quark_cond = Array{Complex{Float64}}(undef,N_noise,length(flow_times)); # global Quark_cond = Array{Complex{Float64}}(undef,N_noise,length(flow_times));
global Quark_cond_cfl = Array{Complex{Float64}}(undef,N_noise,length(flow_times)); # global Quark_cond_cfl = Array{Complex{Float64}}(undef,N_noise,length(flow_times));
## Test block 1
global Quark_cond = Array{Complex{Float64}}(undef,lp.iL[4],N_noise,length(flow_times));
global Quark_cond_cfl = Array{Complex{Float64}}(undef,lp.iL[4],N_noise,length(flow_times));
##
return nothing return nothing
end end
...@@ -121,7 +128,9 @@ function one_pt() ...@@ -121,7 +128,9 @@ function one_pt()
for noi in 1:N_noise for noi in 1:N_noise
pfrandomize!(psi,lp) ## Testblock 6 : added tsource
pfrandomize!(psi,lp,params["Fermion"]["tsource"])
##
backflow(psi, U, flow_times[fl], params["Measurements"]["Nsaves"], gp, dpar, lp, ymws, dws) backflow(psi, U, flow_times[fl], params["Measurements"]["Nsaves"], gp, dpar, lp, ymws, dws)
...@@ -138,16 +147,31 @@ function one_pt() ...@@ -138,16 +147,31 @@ function one_pt()
flush(log_file) flush(log_file)
@timeit "CPU to GPU" copyto!(dws.sp,psi_CPU) @timeit "CPU to GPU" copyto!(dws.sp,psi_CPU)
Quark_cond[noi,fl] = sum(dot.(dws.sp,psi)) # Quark_cond[noi,fl] = sum(dot.(dws.sp,psi))
Quark_cond_cfl[noi,fl] = -sum(norm2.(dws.sp)) # Quark_cond_cfl[noi,fl] = -sum(norm2.(dws.sp))
#### Test block 2
Quark_cond[:,noi,fl] .= zero(ComplexF64)
Quark_cond_cfl[:,noi,fl] .= zero(ComplexF64)
for t in 1:lp.iL[4]
for i in 1:lp.iL[1] for j in 1:lp.iL[2] for k in 1:lp.iL[3]
b,r = point_index(CartesianIndex{lp.ndim}((i,j,k,t)),lp)
Quark_cond[t,noi,fl] += dot(dws.sp[b,r],psi[b,r])
Quark_cond_cfl[t,noi,fl] += -sum(norm2.(dws.sp))
end end end
end
#######
@timeit "CPU to GPU" copyto!(U,U_CPU) @timeit "CPU to GPU" copyto!(U,U_CPU)
end end
end end
Quark_cond .= Quark_cond./V4 ## Testblock 3 : Changed division V4 to prod(...)
Quark_cond_cfl .= Quark_cond_cfl./V4 Quark_cond .= Quark_cond./prod(lp.iL[1:3])
Quark_cond_cfl .= Quark_cond_cfl./prod(lp.iL[1:3])
##
println(log_file,"Finished measuring 1pt") println(log_file,"Finished measuring 1pt")
return nothing return nothing
......
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