Minor bugs

parent a274e64f
...@@ -439,7 +439,7 @@ end ...@@ -439,7 +439,7 @@ end
function pfrandomize!(f::AbstractArray{T},lp::SpaceParm,t::Int64=0) where {T} function pfrandomize!(f::AbstractArray{Spinor{4, SU3fund{T}}},lp::SpaceParm,t::Int64=0) where {T}
@timeit "Randomize pseudofermion field" begin @timeit "Randomize pseudofermion field" begin
p = ntuple(i->CUDA.randn(T, lp.bsz, 3, lp.rsz,2),4) # complex generation not suported for Julia 1.5.4 p = ntuple(i->CUDA.randn(T, lp.bsz, 3, lp.rsz,2),4) # complex generation not suported for Julia 1.5.4
......
...@@ -150,7 +150,7 @@ end ...@@ -150,7 +150,7 @@ end
""" """
function bndtobnd(bndpro, U, dpar, dws, lp) function bndtobnd(bndpro, U, dpar, dws, lp)
Returns the boundary to boundary propagator of the Schrodinger functional given that bnd pro is the propagator from t = 0 to the bulk, given by the function bndpropagator. Returns the boundary to boundary propagator of the Schrodinger functional given that bndpro is the propagator from t = 0 to the bulk, given by the function bndpropagator.
""" """
function bndtobnd(bndpro::AbstractArray, U::AbstractArray, dpar::DiracParam, dws::DiracWorkspace, lp::SpaceParm{4,6,1,D}) where {D} function bndtobnd(bndpro::AbstractArray, U::AbstractArray, dpar::DiracParam, dws::DiracWorkspace, lp::SpaceParm{4,6,1,D}) where {D}
...@@ -159,9 +159,7 @@ function bndtobnd(bndpro::AbstractArray, U::AbstractArray, dpar::DiracParam, dws ...@@ -159,9 +159,7 @@ function bndtobnd(bndpro::AbstractArray, U::AbstractArray, dpar::DiracParam, dws
b=Int64(CUDA.threadIdx().x) b=Int64(CUDA.threadIdx().x)
r=Int64(CUDA.blockIdx().x) r=Int64(CUDA.blockIdx().x)
it = point_time((b, r), lp) if point_time((b, r), lp) == lp.iL[end]
if it == lp.iL[end]
psi[b,r] = gdagpmul(Pgamma{4,1},U[b,4,r],bndpro[b,r]) psi[b,r] = gdagpmul(Pgamma{4,1},U[b,4,r],bndpro[b,r])
else else
psi[b,r] = 0.0*bndpro[b,r] psi[b,r] = 0.0*bndpro[b,r]
...@@ -174,7 +172,7 @@ function bndtobnd(bndpro::AbstractArray, U::AbstractArray, dpar::DiracParam, dws ...@@ -174,7 +172,7 @@ function bndtobnd(bndpro::AbstractArray, U::AbstractArray, dpar::DiracParam, dws
CUDA.@cuda threads=lp.bsz blocks=lp.rsz krnl_bndtobnd!(dws.sp, bndpro ,U, lp) CUDA.@cuda threads=lp.bsz blocks=lp.rsz krnl_bndtobnd!(dws.sp, bndpro ,U, lp)
end end
res = -dpar.ct*CUDA.mapreduce(x -> x, +, dws.sp) / (lp.iL[1]*lp.iL[2]*lp.iL[3]) res = -dpar.ct * sum(dws.sp) / (lp.iL[1]*lp.iL[2]*lp.iL[3])
return res return res
end end
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