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
1749010e
Commit
1749010e
authored
Nov 03, 2021
by
Alberto Ramos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Main program finished
parent
d533eaf2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
120 additions
and
26 deletions
+120
-26
Manifest.toml
Manifest.toml
+21
-9
Project.toml
Project.toml
+1
-0
examples/ym.in
examples/ym.in
+21
-6
main/ym.jl
main/ym.jl
+77
-11
No files found.
Manifest.toml
View file @
1749010e
...
@@ -59,15 +59,21 @@ version = "3.5.0"
...
@@ -59,15 +59,21 @@ version = "3.5.0"
[[ChainRulesCore]]
[[ChainRulesCore]]
deps
=
[
"Compat"
,
"LinearAlgebra"
,
"SparseArrays"
]
deps
=
[
"Compat"
,
"LinearAlgebra"
,
"SparseArrays"
]
git-tree-sha1
=
"
3533f5a691e60601fe60c90d8bc47a27aa2907ec
"
git-tree-sha1
=
"
f885e7e7c124f8c92650d61b9477b9ac2ee607dd
"
uuid
=
"d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
uuid
=
"d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version
=
"1.11.0"
version
=
"1.11.1"
[[CodecZlib]]
deps
=
[
"TranscodingStreams"
,
"Zlib_jll"
]
git-tree-sha1
=
"ded953804d019afa9a3f98981d99b33e3db7b6da"
uuid
=
"944b1d66-785c-5afd-91f1-9de20f533193"
version
=
"0.7.0"
[[Compat]]
[[Compat]]
deps
=
[
"Base64"
,
"Dates"
,
"DelimitedFiles"
,
"Distributed"
,
"InteractiveUtils"
,
"LibGit2"
,
"Libdl"
,
"LinearAlgebra"
,
"Markdown"
,
"Mmap"
,
"Pkg"
,
"Printf"
,
"REPL"
,
"Random"
,
"SHA"
,
"Serialization"
,
"SharedArrays"
,
"Sockets"
,
"SparseArrays"
,
"Statistics"
,
"Test"
,
"UUIDs"
,
"Unicode"
]
deps
=
[
"Base64"
,
"Dates"
,
"DelimitedFiles"
,
"Distributed"
,
"InteractiveUtils"
,
"LibGit2"
,
"Libdl"
,
"LinearAlgebra"
,
"Markdown"
,
"Mmap"
,
"Pkg"
,
"Printf"
,
"REPL"
,
"Random"
,
"SHA"
,
"Serialization"
,
"SharedArrays"
,
"Sockets"
,
"SparseArrays"
,
"Statistics"
,
"Test"
,
"UUIDs"
,
"Unicode"
]
git-tree-sha1
=
"
31d0151f5716b655421d9d75b7fa74cc4e744df2
"
git-tree-sha1
=
"
dce3e3fea680869eaa0b774b2e8343e9ff442313
"
uuid
=
"34da2185-b29b-5c13-b0c7-acf172513d20"
uuid
=
"34da2185-b29b-5c13-b0c7-acf172513d20"
version
=
"3.
39
.0"
version
=
"3.
40
.0"
[[CompilerSupportLibraries_jll]]
[[CompilerSupportLibraries_jll]]
deps
=
[
"Artifacts"
,
"Libdl"
]
deps
=
[
"Artifacts"
,
"Libdl"
]
...
@@ -118,9 +124,9 @@ version = "8.1.2"
...
@@ -118,9 +124,9 @@ version = "8.1.2"
[[GPUCompiler]]
[[GPUCompiler]]
deps
=
[
"ExprTools"
,
"InteractiveUtils"
,
"LLVM"
,
"Libdl"
,
"Logging"
,
"TimerOutputs"
,
"UUIDs"
]
deps
=
[
"ExprTools"
,
"InteractiveUtils"
,
"LLVM"
,
"Libdl"
,
"Logging"
,
"TimerOutputs"
,
"UUIDs"
]
git-tree-sha1
=
"
ba475ea91facd7bde9f0f113f60e975882b4f5ca
"
git-tree-sha1
=
"
77d915a0af27d474f0aaf12fcd46c400a552e84c
"
uuid
=
"61eb1bfa-7361-4325-ad38-22787b887f55"
uuid
=
"61eb1bfa-7361-4325-ad38-22787b887f55"
version
=
"0.13.
6
"
version
=
"0.13.
7
"
[[IOCapture]]
[[IOCapture]]
deps
=
[
"Logging"
,
"Random"
]
deps
=
[
"Logging"
,
"Random"
]
...
@@ -169,7 +175,7 @@ version = "0.0.11+0"
...
@@ -169,7 +175,7 @@ version = "0.0.11+0"
[[LatticeGPU]]
[[LatticeGPU]]
deps
=
[
"CUDA"
,
"Random"
,
"TimerOutputs"
]
deps
=
[
"CUDA"
,
"Random"
,
"TimerOutputs"
]
git-tree-sha1
=
"
d1280b7894cab31b547a98576c0e51e57ea343d4
"
git-tree-sha1
=
"
62d7728203bfe2cf4934648f9cc356cf16f69cf3
"
repo-rev
=
"master"
repo-rev
=
"master"
repo-url
=
"https://igit.ific.uv.es/alramos/latticegpu.jl"
repo-url
=
"https://igit.ific.uv.es/alramos/latticegpu.jl"
uuid
=
"958c3683-801a-4582-9cfa-2d6e2ae1763b"
uuid
=
"958c3683-801a-4582-9cfa-2d6e2ae1763b"
...
@@ -252,9 +258,9 @@ version = "0.5.5+0"
...
@@ -252,9 +258,9 @@ version = "0.5.5+0"
[[Parsers]]
[[Parsers]]
deps
=
["Dates"]
deps
=
["Dates"]
git-tree-sha1
=
"
f19e978f81eca5fd7620650d7dbea58f825802ee
"
git-tree-sha1
=
"
ae4bbcadb2906ccc085cf52ac286dc1377dceccc
"
uuid
=
"69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
uuid
=
"69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version
=
"2.1.
0
"
version
=
"2.1.
2
"
[[Pkg]]
[[Pkg]]
deps
=
[
"Artifacts"
,
"Dates"
,
"Downloads"
,
"LibGit2"
,
"Libdl"
,
"Logging"
,
"Markdown"
,
"Printf"
,
"REPL"
,
"Random"
,
"SHA"
,
"Serialization"
,
"TOML"
,
"Tar"
,
"UUIDs"
,
"p7zip_jll"
]
deps
=
[
"Artifacts"
,
"Dates"
,
"Downloads"
,
"LibGit2"
,
"Libdl"
,
"Logging"
,
"Markdown"
,
"Printf"
,
"REPL"
,
"Random"
,
"SHA"
,
"Serialization"
,
"TOML"
,
"Tar"
,
"UUIDs"
,
"p7zip_jll"
]
...
@@ -351,6 +357,12 @@ git-tree-sha1 = "7cb456f358e8f9d102a8b25e8dfedf58fa5689bc"
...
@@ -351,6 +357,12 @@ git-tree-sha1 = "7cb456f358e8f9d102a8b25e8dfedf58fa5689bc"
uuid
=
"a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
uuid
=
"a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
version
=
"0.5.13"
version
=
"0.5.13"
[[TranscodingStreams]]
deps
=
[
"Random"
,
"Test"
]
git-tree-sha1
=
"216b95ea110b5972db65aa90f88d8d89dcb8851c"
uuid
=
"3bb67fe8-82b1-5028-8e26-92a6c54297fa"
version
=
"0.9.6"
[[UUIDs]]
[[UUIDs]]
deps
=
[
"Random"
,
"SHA"
]
deps
=
[
"Random"
,
"SHA"
]
uuid
=
"cf7118a7-6976-5b1a-9a39-7adc72f591a4"
uuid
=
"cf7118a7-6976-5b1a-9a39-7adc72f591a4"
...
...
Project.toml
View file @
1749010e
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
ArgParse
=
"c7e460c6-2fb9-53a9-8c5b-16f535851c63"
ArgParse
=
"c7e460c6-2fb9-53a9-8c5b-16f535851c63"
BDIO
=
"375f315e-f2c4-11e9-2ef9-134f02f79e27"
BDIO
=
"375f315e-f2c4-11e9-2ef9-134f02f79e27"
CUDA
=
"052768ef-5323-5732-b1bb-66c8b64840ba"
CUDA
=
"052768ef-5323-5732-b1bb-66c8b64840ba"
CodecZlib
=
"944b1d66-785c-5afd-91f1-9de20f533193"
InteractiveUtils
=
"b77e0a4c-d291-57a0-90e8-8db25a27a240"
InteractiveUtils
=
"b77e0a4c-d291-57a0-90e8-8db25a27a240"
LatticeGPU
=
"958c3683-801a-4582-9cfa-2d6e2ae1763b"
LatticeGPU
=
"958c3683-801a-4582-9cfa-2d6e2ae1763b"
Pkg
=
"44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Pkg
=
"44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
...
...
examples/ym.in
View file @
1749010e
#
# Input file to reproduce results of
#
# M. Luscher. "Properties and uses of the
# Wilson flow in Lattice QCD"
# https://arxiv.org/pdf/1006.4518.pdf
# (see table 1)
#
[Run]
[Run]
user = "alberto"
user = "alberto"
host = "artemisa"
host = "artemisa"
name = "SU
2_PBC_bt2.4_L12
"
name = "SU
3_PBC_bt5.96_L24x24x24x48
"
seed = 1234
seed = 1234
[Simulation]
[Simulation]
group = "SU3" # Choose SU2, SU3
group = "SU3" # Choose SU2, SU3
dimensions = 4
dimensions = 4
size = [
12,12,12,12
]
size = [
24,24,24,48
]
blocks = [4,4,4,4]
blocks = [4,4,4,4]
bcs = "SF" # Choose PERIODIC, SF
bcs = "PERIODIC" # Choose PERIODIC, SF
beta = 2.4
ntwist = [0,0,0,0,0,0]
beta = 5.96
c0 = 1.0 # 1.0 is Wilson action, 1.66... is LW, 3.648 is Iwasaki
c0 = 1.0 # 1.0 is Wilson action, 1.66... is LW, 3.648 is Iwasaki
cG = 0.0 # Only used with SF bcs
cG
= 0.0 # Only used with SF bcs
[HMC]
[HMC]
integrator = "OMF4" # "LEAPFROPG", "OMF2", "OMF4"
integrator = "OMF4" # "LEAPFROPG", "OMF2", "OMF4"
ns =
1
0
ns =
2
0
eps = 0.1
eps = 0.1
nthm = 1000
nthm = 1000
ntraj = 10000
ntraj = 10000
[Flow]
integrator = "RK3" # EULER, RK2, RK3
eps = 0.01
ns = 300
dtr = 10 # Frequency of flow measurements
main/ym.jl
View file @
1749010e
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
###
###
using
LatticeGPU
,
TOML
,
BDIO
,
ArgParse
,
Random
,
CUDA
,
Pkg
,
InteractiveUtils
,
TimerOutputs
,
Printf
using
LatticeGPU
,
TOML
,
BDIO
,
ArgParse
,
Random
,
CUDA
,
Pkg
,
InteractiveUtils
,
TimerOutputs
,
Printf
,
CodecZlib
function
parse_commandline
()
function
parse_commandline
()
s
=
ArgParseSettings
()
s
=
ArgParseSettings
()
...
@@ -41,7 +41,7 @@ function read_options(fname)
...
@@ -41,7 +41,7 @@ function read_options(fname)
dim
=
s
[
"Simulation"
][
"dimensions"
]
dim
=
s
[
"Simulation"
][
"dimensions"
]
lp
=
SpaceParm
{
dim
}(
Tuple
(
x
for
x
in
s
[
"Simulation"
][
"size"
]),
lp
=
SpaceParm
{
dim
}(
Tuple
(
x
for
x
in
s
[
"Simulation"
][
"size"
]),
Tuple
(
x
for
x
in
s
[
"Simulation"
][
"blocks"
]),
Tuple
(
x
for
x
in
s
[
"Simulation"
][
"blocks"
]),
BCS
)
BCS
,
Tuple
(
x
for
x
in
s
[
"Simulation"
][
"ntwist"
])
)
# Gauge Parameters
# Gauge Parameters
if
s
[
"Simulation"
][
"group"
]
==
"SU2"
if
s
[
"Simulation"
][
"group"
]
==
"SU2"
...
@@ -66,13 +66,30 @@ function read_options(fname)
...
@@ -66,13 +66,30 @@ function read_options(fname)
error
(
"Unknown integrator"
)
error
(
"Unknown integrator"
)
end
end
if
s
[
"Flow"
][
"integrator"
]
==
"EULER"
flwint
=
wfl_euler
(
T
,
s
[
"Flow"
][
"eps"
],
0.0
)
elseif
s
[
"Flow"
][
"integrator"
]
==
"RK2"
flwint
=
wfl_rk2
(
T
,
s
[
"Flow"
][
"eps"
],
0.0
)
elseif
s
[
"Flow"
][
"integrator"
]
==
"RK3"
flwint
=
wfl_rk3
(
T
,
s
[
"Flow"
][
"eps"
],
0.0
)
else
error
(
"Flow integrator not known"
)
end
flw_ns
=
s
[
"Flow"
][
"ns"
]
flw_dtr
=
s
[
"Flow"
][
"dtr"
]
# Write basic info to log file
# Write basic info to log file
flog
=
open
(
s
[
"Run"
][
"name"
]
*
".log"
,
"w+"
)
flog
=
GzipCompressorStream
(
open
(
s
[
"Run"
][
"name"
]
*
".log.gz"
,
"w+"
))
println
(
flog
,
"
\n
## HMC LatticeGPU simulation"
)
if
GRP
==
SU2
println
(
flog
,
"
\n
## HMC SU(2) LatticeGPU simulation"
)
else
println
(
flog
,
"
\n
## HMC SU(3) LatticeGPU simulation"
)
end
println
(
flog
,
lp
)
println
(
flog
,
lp
)
println
(
flog
,
gp
)
println
(
flog
,
gp
)
println
(
flog
,
int
)
println
(
flog
,
int
)
println
(
flog
,
flwint
)
println
(
flog
,
" # [Enviroment Info]"
)
println
(
flog
,
" # [Enviroment Info]"
)
println
(
flog
,
"User: "
,
s
[
"Run"
][
"user"
])
println
(
flog
,
"User: "
,
s
[
"Run"
][
"user"
])
...
@@ -92,19 +109,19 @@ function read_options(fname)
...
@@ -92,19 +109,19 @@ function read_options(fname)
BDIO_write!
(
fb
,
read
(
fname
))
BDIO_write!
(
fb
,
read
(
fname
))
BDIO_write_hash!
(
fb
)
BDIO_write_hash!
(
fb
)
#
Random.seed!(CURAND.default_rng(), s["Run"]["seed"])
Random
.
seed!
(
CURAND
.
default_rng
(),
s
[
"Run"
][
"seed"
])
Random
.
seed!
(
s
[
"Run"
][
"seed"
])
Random
.
seed!
(
s
[
"Run"
][
"seed"
])
nthm
=
s
[
"HMC"
][
"nthm"
]
nthm
=
s
[
"HMC"
][
"nthm"
]
nt
=
s
[
"HMC"
][
"ntraj"
]
nt
=
s
[
"HMC"
][
"ntraj"
]
return
gp
,
lp
,
int
,
nthm
,
nt
,
fb
,
flog
,
GRP
,
T
,
BCS
return
gp
,
lp
,
int
,
flwint
,
nthm
,
nt
,
flw_ns
,
flw_dtr
,
fb
,
flog
,
GRP
,
T
,
BCS
end
end
parsed_args
=
parse_commandline
()
parsed_args
=
parse_commandline
()
infile
=
parsed_args
[
"i"
]
infile
=
parsed_args
[
"i"
]
gp
,
lp
,
int
,
nthm
,
nt
,
fb
,
flog
,
GRP
,
T
,
BCS
=
read_options
(
infile
)
gp
,
lp
,
int
,
flwint
,
nthm
,
nt
,
flw_ns
,
flw_dtr
,
fb
,
flog
,
GRP
,
T
,
BCS
=
read_options
(
infile
)
U
=
vector_field
(
GRP
{
T
},
lp
)
U
=
vector_field
(
GRP
{
T
},
lp
)
fill!
(
U
,
one
(
GRP
{
T
}))
fill!
(
U
,
one
(
GRP
{
T
}))
...
@@ -134,7 +151,12 @@ for i in 1:nthm
...
@@ -134,7 +151,12 @@ for i in 1:nthm
end
end
end
end
Ecl
=
Array
{
T
,
2
}(
undef
,
flw_ns
+
1
,
div
(
nt
,
flw_dtr
))
Epl
=
Array
{
T
,
2
}(
undef
,
flw_ns
+
1
,
div
(
nt
,
flw_dtr
))
Qt
=
Array
{
T
,
2
}(
undef
,
flw_ns
+
1
,
div
(
nt
,
flw_dtr
))
println
(
flog
,
"
\n
# Measurements"
)
println
(
flog
,
"
\n
# Measurements"
)
kfl
=
0
for
i
in
1
:
nt
for
i
in
1
:
nt
k
=
i
+
nthm
k
=
i
+
nthm
dh
[
k
],
acc
[
k
]
=
HMC!
(
U
,
int
,
lp
,
gp
,
ymws
,
noacc
=
true
)
dh
[
k
],
acc
[
k
]
=
HMC!
(
U
,
int
,
lp
,
gp
,
ymws
,
noacc
=
true
)
...
@@ -149,10 +171,32 @@ for i in 1:nt
...
@@ -149,10 +171,32 @@ for i in 1:nt
i
,
nt
,
acc
[
k
]
?
"true "
:
"false"
,
dh
[
k
],
pl
[
k
],
i
,
nt
,
acc
[
k
]
?
"true "
:
"false"
,
dh
[
k
],
pl
[
k
],
sfc
[
k
,
1
],
sfc
[
k
,
2
])
sfc
[
k
,
1
],
sfc
[
k
,
2
])
end
end
ymws
.
U1
.=
U
if
i
%
flw_dtr
==
0
global
kfl
=
kfl
+
1
for
j
in
1
:
flw_ns
Epl
[
j
,
kfl
]
=
Eoft_plaq
(
U
,
gp
,
lp
,
ymws
)
Ecl
[
j
,
kfl
]
=
Eoft_clover
(
U
,
gp
,
lp
,
ymws
)
Qt
[
j
,
kfl
]
=
Qtop
(
U
,
gp
,
lp
,
ymws
)
flw
(
U
,
flwint
,
1
,
gp
,
lp
,
ymws
)
if
(
j
-
1
)
%
div
(
flw_ns
,
10
)
==
0
t
=
j
*
flwint
.
eps
@printf
(
flog
,
" FLOW t=%8.4f: %20.12e %20.12e %10.4e
\n
"
,
t
,
t
^
2
*
Epl
[
j
,
kfl
],
t
^
2
*
Ecl
[
j
,
kfl
],
Qt
[
j
,
kfl
])
end
end
Epl
[
end
,
kfl
]
=
Eoft_plaq
(
U
,
gp
,
lp
,
ymws
)
Ecl
[
end
,
kfl
]
=
Eoft_clover
(
U
,
gp
,
lp
,
ymws
)
Qt
[
end
,
kfl
]
=
Qtop
(
U
,
gp
,
lp
,
ymws
)
end
U
.=
ymws
.
U1
end
end
print_timer
(
flog
)
print_timer
(
flog
)
println
(
flog
,
"
\n
## END HMC LatticeGPU simulation"
)
println
(
flog
,
"
\n
## END HMC LatticeGPU simulation"
)
close
(
flog
)
# Measurements
# Measurements
...
@@ -165,6 +209,9 @@ println(flog, "\n## END HMC LatticeGPU simulation")
...
@@ -165,6 +209,9 @@ println(flog, "\n## END HMC LatticeGPU simulation")
# uid 9: dsdeta measurements
# uid 9: dsdeta measurements
# uid 10: ddsdnu measurements
# uid 10: ddsdnu measurements
# uid 11: ddsdnu measurements
# uid 11: ddsdnu measurements
# uid 12: Epl measurements
# uid 13: Ecl measurements
# uid 14: Qtop measurements
function
write_record
(
fb
,
uid
,
dt
)
function
write_record
(
fb
,
uid
,
dt
)
...
@@ -178,10 +225,29 @@ function write_record(fb, uid, dt)
...
@@ -178,10 +225,29 @@ function write_record(fb, uid, dt)
return
nothing
return
nothing
end
end
function
write_flow_record
(
fb
,
uid
,
dt
)
BDIO_start_record!
(
fb
,
BDIO_BIN_F64LE
,
uid
,
true
)
foo
=
[
flwint
.
eps
,
convert
(
T
,
flw_ns
)]
BDIO_write!
(
fb
,
foo
)
for
k
in
1
:
div
(
nt
,
flw_dtr
)
BDIO_write!
(
fb
,
dt
[
:
,
k
])
end
BDIO_write_hash!
(
fb
)
return
nothing
end
write_record
(
fb
,
2
,
dh
)
write_record
(
fb
,
2
,
dh
)
write_record
(
fb
,
4
,
pl
)
write_record
(
fb
,
4
,
pl
)
write_record
(
fb
,
8
,
sfc
[
:
,
1
])
if
BCS
==
BC_SF_AFWB
write_record
(
fb
,
10
,
sfc
[
:
,
2
])
write_record
(
fb
,
8
,
sfc
[
:
,
1
])
write_record
(
fb
,
10
,
sfc
[
:
,
2
])
end
write_flow_record
(
fb
,
12
,
Epl
)
write_flow_record
(
fb
,
13
,
Ecl
)
write_flow_record
(
fb
,
14
,
Qt
)
BDIO_close!
(
fb
)
BDIO_close!
(
fb
)
...
...
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