Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
test_latticegpu.jl
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
Alberto Ramos
test_latticegpu.jl
Commits
5d1fade9
Commit
5d1fade9
authored
Nov 16, 2021
by
Alberto Ramos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added main to test periodic runs in OpenQCD.
parent
1f427d47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
143 additions
and
30 deletions
+143
-30
main/oqcd.jl
main/oqcd.jl
+110
-0
main/sfwfl.jl
main/sfwfl.jl
+33
-30
No files found.
main/oqcd.jl
0 → 100644
View file @
5d1fade9
###
### "THE BEER-WARE LICENSE":
### Alberto Ramos wrote this file. As long as you retain this
### notice you can do whatever you want with this stuff. If we meet some
### day, and you think this stuff is worth it, you can buy me a beer in
### return. <alberto.ramos@cern.ch>
###
### file: sfwfl.jl
### created: Sat Nov 13 23:14:40 2021
###
#using CUDA, LatticeGPU, ArgParse, Printf
using
CUDA
,
ArgParse
,
Printf
import
Pkg
Pkg
.
activate
(
"."
)
using
LatticeGPU
function
parse_commandline
()
s
=
ArgParseSettings
()
@add_arg_table
s
begin
"-c"
help
=
"configuration"
required
=
true
arg_type
=
String
end
@add_arg_table
s
begin
"-L"
help
=
"L/a"
required
=
true
arg_type
=
Int64
end
@add_arg_table
s
begin
"-T"
help
=
"T/a"
required
=
true
arg_type
=
Int64
end
return
parse_args
(
s
)
end
parsed_args
=
parse_commandline
()
fconf
=
parsed_args
[
"c"
]
parsed_args
=
parse_commandline
()
l
=
parsed_args
[
"L"
]
t
=
parsed_args
[
"T"
]
println
(
" ## Analizing configuration: "
,
fconf
)
lp
=
SpaceParm
{
4
}((
l
,
l
,
l
,
t
),
(
4
,
4
,
4
,
4
),
BC_PERIODIC
,
(
0
,
0
,
0
,
0
,
0
,
0
))
println
(
lp
)
U
=
import_cern64
(
fconf
,
3
,
lp
)
gp
=
GaugeParm
{
Float64
}(
SU3
{
Float64
},
6.7
,
1.0
)
println
(
gp
)
wflw
=
wfl_rk3
(
Float64
,
0.01
,
1.0E-7
)
zflw
=
zfl_rk3
(
Float64
,
0.01
,
1.0E-7
)
println
(
" ## "
)
ymws
=
YMworkspace
(
SU3
,
Float64
,
lp
)
println
(
" # Plaquette: "
,
plaquette
(
U
,
lp
,
gp
,
ymws
))
println
(
" ## "
)
flw_nc
=
10
nfstp
=
10
Ecl
=
Array
{
Float64
,
2
}(
undef
,
lp
.
iL
[
end
],
6
)
Epl
=
Array
{
Float64
,
2
}(
undef
,
lp
.
iL
[
end
],
6
)
Qt
=
Vector
{
Float64
}(
undef
,
lp
.
iL
[
end
])
ndtr
=
10
println
(
wflw
)
Ucopy
=
Array
(
U
)
let
tf
=
0.0
for
j
in
1
:
flw_nc
+
1
Eoft_plaq
(
Epl
,
U
,
gp
,
lp
,
ymws
)
Eoft_clover
(
Ecl
,
U
,
gp
,
lp
,
ymws
)
Qtop
(
Qt
,
U
,
gp
,
lp
,
ymws
)
@printf
(
" FLOW t=%8.4f: %20.12e %20.12e %10.4e
\n
"
,
tf
,
l
^
3
*
sum
(
Epl
),
l
^
3
*
sum
(
Ecl
),
sum
(
Qt
))
flw
(
U
,
wflw
,
nfstp
,
gp
,
lp
,
ymws
)
tf
+=
wflw
.
eps
*
nfstp
end
end
U
.=
CuArray
(
Ucopy
)
println
(
zflw
)
let
tf
=
0.0
for
j
in
1
:
flw_nc
+
1
Eoft_plaq
(
Epl
,
U
,
gp
,
lp
,
ymws
)
Eoft_clover
(
Ecl
,
U
,
gp
,
lp
,
ymws
)
Qtop
(
Qt
,
U
,
gp
,
lp
,
ymws
)
@printf
(
" FLOW t=%8.4f: %20.12e %20.12e %10.4e
\n
"
,
tf
,
l
^
3
*
sum
(
Epl
),
l
^
3
*
sum
(
Ecl
),
sum
(
Qt
))
flw
(
U
,
zflw
,
nfstp
,
gp
,
lp
,
ymws
)
tf
+=
zflw
.
eps
*
nfstp
end
end
U
.=
CuArray
(
Ucopy
)
println
(
" # Plaquette: "
,
plaquette
(
U
,
lp
,
gp
,
ymws
))
main/sfwfl.jl
View file @
5d1fade9
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
###
###
using
LatticeGPU
,
ArgParse
,
Printf
using
CUDA
,
LatticeGPU
,
ArgParse
,
Printf
function
parse_commandline
()
function
parse_commandline
()
s
=
ArgParseSettings
()
s
=
ArgParseSettings
()
...
@@ -60,6 +60,7 @@ println(" ## ")
...
@@ -60,6 +60,7 @@ println(" ## ")
ymws
=
YMworkspace
(
SU3
,
Float64
,
lp
)
ymws
=
YMworkspace
(
SU3
,
Float64
,
lp
)
println
(
" # Plaquette: "
,
plaquette
(
U
,
lp
,
gp
,
ymws
))
println
(
" # Plaquette: "
,
plaquette
(
U
,
lp
,
gp
,
ymws
))
println
(
" ## "
)
flw_nc
=
20
flw_nc
=
20
...
@@ -69,37 +70,39 @@ Qt = Vector{Float64}(undef, lp.iL[end])
...
@@ -69,37 +70,39 @@ Qt = Vector{Float64}(undef, lp.iL[end])
ndtr
=
10
ndtr
=
10
println
(
wflw
)
println
(
wflw
)
ymws
.
U1
.=
U
Ucopy
=
Array
(
U
)
tf
=
0.0
let
tf
=
0.0
for
j
in
1
:
flw_nc
+
1
for
j
in
1
:
flw_nc
+
1
Eoft_plaq
(
Epl
,
U
,
gp
,
lp
,
ymws
)
Eoft_plaq
(
Epl
,
U
,
gp
,
lp
,
ymws
)
Eoft_clover
(
Ecl
,
U
,
gp
,
lp
,
ymws
)
Eoft_clover
(
Ecl
,
U
,
gp
,
lp
,
ymws
)
Qtop
(
Qt
,
U
,
gp
,
lp
,
ymws
)
Qtop
(
Qt
,
U
,
gp
,
lp
,
ymws
)
@printf
(
" FLOW c=%8.4f: %20.12e %20.12e %10.4e
\n
"
,
@printf
(
" FLOW c=%8.4f: %20.12e %20.12e %10.4e
\n
"
,
sqrt
(
8
*
tf
)
/
l
,
l
^
3
*
sum
(
Epl
),
l
^
3
*
sum
(
Ecl
),
sum
(
Qt
))
sqrt
(
8
*
tf
)
/
l
,
l
^
3
*
sum
(
Epl
),
l
^
3
*
sum
(
Ecl
),
sum
(
Qt
))
c
=
0.6
*
j
/
flw_nc
c
=
0.6
*
j
/
flw_nc
dt
=
(
cl
)
^
2
/
8
-
tf
dt
=
(
c
*
l
)
^
2
/
8
-
tf
flw_adapt
(
U
,
wflw
,
dt
,
gp
,
lp
,
ymws
)
flw_adapt
(
U
,
wflw
,
dt
,
gp
,
lp
,
ymws
)
tf
+=
dt
tf
+=
dt
end
end
end
U
=
ymws
.
U1
U
.=
CuArray
(
Ucopy
)
println
(
zflw
)
println
(
zflw
)
tf
=
0.0
let
tf
=
0.0
for
j
in
1
:
flw_nc
+
1
for
j
in
1
:
flw_nc
+
1
Eoft_plaq
(
Epl
,
U
,
gp
,
lp
,
ymws
)
Eoft_plaq
(
Epl
,
U
,
gp
,
lp
,
ymws
)
Eoft_clover
(
Ecl
,
U
,
gp
,
lp
,
ymws
)
Eoft_clover
(
Ecl
,
U
,
gp
,
lp
,
ymws
)
Qtop
(
Qt
,
U
,
gp
,
lp
,
ymws
)
Qtop
(
Qt
,
U
,
gp
,
lp
,
ymws
)
@printf
(
" FLOW c=%8.4f: %20.12e %20.12e %10.4e
\n
"
,
@printf
(
" FLOW c=%8.4f: %20.12e %20.12e %10.4e
\n
"
,
sqrt
(
8
*
tf
)
/
l
,
l
^
3
*
sum
(
Epl
),
l
^
3
*
sum
(
Ecl
),
sum
(
Qt
))
sqrt
(
8
*
tf
)
/
l
,
l
^
3
*
sum
(
Epl
),
l
^
3
*
sum
(
Ecl
),
sum
(
Qt
))
c
=
0.6
*
j
/
flw_nc
c
=
0.6
*
j
/
flw_nc
dt
=
(
cl
)
^
2
/
8
-
tf
dt
=
(
c
*
l
)
^
2
/
8
-
tf
flw_adapt
(
U
,
zflw
,
dt
,
gp
,
lp
,
ymws
)
flw_adapt
(
U
,
zflw
,
dt
,
gp
,
lp
,
ymws
)
tf
+=
dt
tf
+=
dt
end
end
end
U
=
ymws
.
U1
U
.=
CuArray
(
Ucopy
)
println
(
" # Plaquette: "
,
plaquette
(
U
,
lp
,
gp
,
ymws
))
println
(
" # Plaquette: "
,
plaquette
(
U
,
lp
,
gp
,
ymws
))
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