Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LGPU FPP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fernando Pérez Panadero
LGPU FPP
Commits
2cdfeac8
Commit
2cdfeac8
authored
Nov 20, 2023
by
Fernando Pérez Panadero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Su2fund pfrandomize and Dw bug fix for periodic
parent
3674df75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
5 deletions
+38
-5
src/Dirac/Dirac.jl
src/Dirac/Dirac.jl
+38
-5
No files found.
src/Dirac/Dirac.jl
View file @
2cdfeac8
...
@@ -452,7 +452,7 @@ function Dw_new!(so, U, si, dpar::DiracParam, dws::DiracWorkspace, lp::SpaceParm
...
@@ -452,7 +452,7 @@ function Dw_new!(so, U, si, dpar::DiracParam, dws::DiracWorkspace, lp::SpaceParm
if
abs
(
dpar
.
csw
)
>
1.0E-10
if
abs
(
dpar
.
csw
)
>
1.0E-10
@timeit
"Dw_new"
begin
@timeit
"Dw_new"
begin
CUDA
.
@sync
begin
CUDA
.
@sync
begin
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_Dwimpr_new!
(
so
,
U
,
si
,
dws
.
csw
,
dpar
.
m0
,
dpar
.
th
,
dpar
.
csw
,
dpar
.
ct
,
lp
)
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_Dwimpr_new!
(
so
,
U
,
si
,
dws
.
csw
,
dpar
.
m0
,
dpar
.
th
,
dpar
.
csw
,
lp
)
end
end
end
end
else
else
...
@@ -611,13 +611,12 @@ function krnl_Dw_new!(so, U, si, m0, th, ct, lp::SpaceParm{4,6,BC_SF_ORBI,D}) wh
...
@@ -611,13 +611,12 @@ function krnl_Dw_new!(so, U, si, m0, th, ct, lp::SpaceParm{4,6,BC_SF_ORBI,D}) wh
return
nothing
return
nothing
end
end
function
g5Dw_new
!
(
so
,
U
,
si
,
dpar
::
DiracParam
,
dws
::
DiracWorkspace
,
lp
::
SpaceParm
{
4
,
6
,
B
,
D
})
where
{
B
,
D
}
function
g5Dw_new
!
(
so
,
U
,
si
,
dpar
::
DiracParam
,
dws
::
DiracWorkspace
,
lp
::
SpaceParm
{
4
,
6
,
B
,
D
})
where
{
B
,
D
}
if
abs
(
dpar
.
csw
)
>
1.0E-10
if
abs
(
dpar
.
csw
)
>
1.0E-10
@timeit
"g5Dw_new"
begin
@timeit
"g5Dw_new"
begin
CUDA
.
@sync
begin
CUDA
.
@sync
begin
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_g5Dwimpr_new!
(
so
,
U
,
si
,
dws
.
csw
,
dpar
.
m0
,
dpar
.
th
,
dpar
.
csw
,
dpar
.
ct
,
lp
)
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_g5Dwimpr_new!
(
so
,
U
,
si
,
dws
.
csw
,
dpar
.
m0
,
dpar
.
th
,
dpar
.
csw
,
lp
)
end
end
end
end
else
else
...
@@ -884,7 +883,7 @@ function pfrandomize!(f::AbstractArray{Spinor{4, SU3fund{T}}},lp::SpaceParm,t::I
...
@@ -884,7 +883,7 @@ function pfrandomize!(f::AbstractArray{Spinor{4, SU3fund{T}}},lp::SpaceParm,t::I
@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
CUDA
.
@sync
begin
CUDA
.
@sync
begin
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_assign_pf!
(
f
,
p
,
lp
,
t
)
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_assign_pf
_su3
!
(
f
,
p
,
lp
,
t
)
end
end
end
end
...
@@ -892,7 +891,7 @@ function pfrandomize!(f::AbstractArray{Spinor{4, SU3fund{T}}},lp::SpaceParm,t::I
...
@@ -892,7 +891,7 @@ function pfrandomize!(f::AbstractArray{Spinor{4, SU3fund{T}}},lp::SpaceParm,t::I
end
end
function
krnl_assign_pf
!
(
f
::
AbstractArray
,
p
,
lp
::
SpaceParm
,
t
::
Int64
)
function
krnl_assign_pf
_su3
!
(
f
::
AbstractArray
,
p
,
lp
::
SpaceParm
,
t
::
Int64
)
@inbounds
begin
@inbounds
begin
b
=
Int64
(
CUDA
.
threadIdx
()
.
x
)
b
=
Int64
(
CUDA
.
threadIdx
()
.
x
)
...
@@ -914,6 +913,40 @@ function krnl_assign_pf!(f::AbstractArray, p ,lp::SpaceParm, t::Int64)
...
@@ -914,6 +913,40 @@ function krnl_assign_pf!(f::AbstractArray, p ,lp::SpaceParm, t::Int64)
end
end
function
pfrandomize
!
(
f
::
AbstractArray
{
Spinor
{
4
,
SU2fund
{
T
}}},
lp
::
SpaceParm
,
t
::
Int64
=
0
)
where
{
T
}
@timeit
"Randomize pseudofermion field"
begin
p
=
ntuple
(
i
->
CUDA
.
randn
(
T
,
lp
.
bsz
,
2
,
lp
.
rsz
,
2
),
4
)
# complex generation not suported for Julia 1.5.4
CUDA
.
@sync
begin
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_assign_pf_su2!
(
f
,
p
,
lp
,
t
)
end
end
return
nothing
end
function
krnl_assign_pf_su2
!
(
f
::
AbstractArray
,
p
,
lp
::
SpaceParm
,
t
::
Int64
)
@inbounds
begin
b
=
Int64
(
CUDA
.
threadIdx
()
.
x
)
r
=
Int64
(
CUDA
.
blockIdx
()
.
x
)
if
t
==
0
f
[
b
,
r
]
=
Spinor
(
map
(
x
->
SU3fund
(
x
[
b
,
1
,
r
,
1
]
+
im
*
x
[
b
,
1
,
r
,
2
],
x
[
b
,
2
,
r
,
1
]
+
im
*
x
[
b
,
2
,
r
,
2
]),
p
))
elseif
point_time
((
b
,
r
),
lp
)
==
t
f
[
b
,
r
]
=
Spinor
(
map
(
x
->
SU3fund
(
x
[
b
,
1
,
r
,
1
]
+
im
*
x
[
b
,
1
,
r
,
2
],
x
[
b
,
2
,
r
,
1
]
+
im
*
x
[
b
,
2
,
r
,
2
]),
p
))
end
end
return
nothing
end
export
Dw!
,
DwdagDw!
,
g5Dw!
,
pfrandomize!
,
Csw!
,
Dw_new!
,
g5Dw_new!
,
DwdagDw_new!
,
SF_bndfix!
export
Dw!
,
DwdagDw!
,
g5Dw!
,
pfrandomize!
,
Csw!
,
Dw_new!
,
g5Dw_new!
,
DwdagDw_new!
,
SF_bndfix!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment