Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
FerFlow.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
Fernando Pérez Panadero
FerFlow.jl
Commits
8d880e20
Commit
8d880e20
authored
1 year ago
by
Fernando Pérez Panadero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now can run on existing configs.
parent
bd1d44b4
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
76 additions
and
36 deletions
+76
-36
main.jl
main.jl
+2
-3
src/io.jl
src/io.jl
+2
-22
src/mc.jl
src/mc.jl
+68
-5
src/meas.jl
src/meas.jl
+0
-2
src/utils.jl
src/utils.jl
+4
-4
No files found.
main.jl
View file @
8d880e20
...
@@ -22,11 +22,10 @@ include("./src/mc.jl")
...
@@ -22,11 +22,10 @@ include("./src/mc.jl")
global
log_file
=
open
(
"./output/"
*
params
[
"Run"
][
"name"
]
*
".log"
,
"w+"
)
global
log_file
=
open
(
"./output/"
*
params
[
"Run"
][
"name"
]
*
".log"
,
"w+"
)
write_log
()
write_log
()
load_fields
()
load_fields
()
therm_or_readlist
()
end
end
@timeit
"Thermalization"
thermalize
()
while
RUN_ON
while
isfile
(
"run_on"
)
@timeit
"HMC"
Gauge_update
()
@timeit
"HMC"
Gauge_update
()
...
...
This diff is collapsed.
Click to expand it.
src/io.jl
View file @
8d880e20
...
@@ -29,7 +29,7 @@ function parse_commandline()
...
@@ -29,7 +29,7 @@ function parse_commandline()
arg_type
=
String
arg_type
=
String
"-c"
"-c"
help
=
"Gauge configuration file"
help
=
"Gauge configuration
list
file"
arg_type
=
String
arg_type
=
String
"--cern"
"--cern"
...
@@ -67,6 +67,7 @@ function load_structs()
...
@@ -67,6 +67,7 @@ function load_structs()
global
N_noise
=
params
[
"Measurements"
][
"N_noise"
]
global
N_noise
=
params
[
"Measurements"
][
"N_noise"
]
global
MCid
=
0
global
MCid
=
0
global
Nmc_acc
=
0
global
Nmc_acc
=
0
global
RUN_ON
=
true
return
nothing
return
nothing
end
end
...
@@ -154,27 +155,6 @@ function save_data()
...
@@ -154,27 +155,6 @@ function save_data()
end
end
"""
function load_gauge_field()
Returns the gauge field and computes the Csw term
"""
function
load_gauge_field
()
if
!
parsed_args
[
"cern"
]
println
(
log_file
,
"
\n
Reading gauge field with LGPU native convention from: "
,
parsed_args
[
"c"
],
"..."
)
U
,
_
=
read_cnfg
(
parsed_args
[
"c"
])
else
println
(
log_file
,
"
\n
Reading gauge field with CERN convention from: "
,
parsed_args
[
"c"
],
"..."
)
U
=
read_cnfg_cern
(
parsed_args
[
"c"
],
lp
)
end
f
=
open
(
parsed_args
[
"c"
],
"r"
)
println
(
log_file
,
"MD5 checksum of gauge config: "
,
bytes2hex
(
md5
(
f
)),
"
\n
"
)
close
(
f
)
Csw!
(
dws
,
U
,
gp
,
lp
)
return
U
end
function
read_cnfg_cern
(
path
::
String
,
lp
::
SpaceParm
)
function
read_cnfg_cern
(
path
::
String
,
lp
::
SpaceParm
)
Ucpu
=
Array
{
SU3
{
Float64
},
3
}(
undef
,
lp
.
bsz
,
lp
.
ndim
,
lp
.
rsz
)
Ucpu
=
Array
{
SU3
{
Float64
},
3
}(
undef
,
lp
.
bsz
,
lp
.
ndim
,
lp
.
rsz
)
...
...
This diff is collapsed.
Click to expand it.
src/mc.jl
View file @
8d880e20
...
@@ -5,20 +5,40 @@ using ArgParse
...
@@ -5,20 +5,40 @@ using ArgParse
using
CUDA
using
CUDA
function
therm
alize
()
function
therm
_or_readlist
()
println
(
log_file
,
"
\n
Starting simulation
\n
"
)
println
(
log_file
,
"
\n
Starting simulation
\n
"
)
if
parsed_args
[
"c"
]
==
nothing
println
(
log_file
,
"Thermalizing..."
)
println
(
log_file
,
"Thermalizing..."
)
flush
(
log_file
)
flush
(
log_file
)
@timeit
"Thermalization"
for
_
in
1
:
params
[
"HMC"
][
"nth"
]
for
_
in
1
:
params
[
"HMC"
][
"nth"
]
HMC!
(
U
,
intsch
,
lp
,
gp
,
ymws
)
HMC!
(
U
,
intsch
,
lp
,
gp
,
ymws
)
end
end
else
println
(
log_file
,
"Loading gauge configurations from "
*
string
(
parsed_args
[
"c"
]))
read_config_list
()
end
f
=
open
(
"RUN_ON_"
*
params
[
"Run"
][
"name"
],
"w+"
)
close
(
f
)
return
nothing
return
nothing
end
end
function
Gauge_update
()
function
Gauge_update
()
if
parsed_args
[
"c"
]
==
nothing
Gauge_update_hmc
()
global
RUN_ON
=
isfile
(
"RUN_ON_"
*
params
[
"Run"
][
"name"
])
else
load_gauge_field
()
global
RUN_ON
=
(
isfile
(
"RUN_ON_"
*
params
[
"Run"
][
"name"
])
&&
CONFIG_LIST
[
MCid
+
1
]
!=
""
)
end
return
nothing
end
function
Gauge_update_hmc
()
println
(
log_file
,
"Performing "
*
string
(
params
[
"HMC"
][
"dmeas"
])
*
" HMC steps..."
)
println
(
log_file
,
"Performing "
*
string
(
params
[
"HMC"
][
"dmeas"
])
*
" HMC steps..."
)
flush
(
log_file
)
flush
(
log_file
)
...
@@ -42,5 +62,48 @@ function Gauge_update()
...
@@ -42,5 +62,48 @@ function Gauge_update()
flush
(
log_file
)
flush
(
log_file
)
return
nothing
return
nothing
end
function
read_config_list
()
global
CONFIG_LIST
=
Vector
{
String
}(
undef
,
0
)
f
=
open
(
parsed_args
[
"c"
],
"r"
)
while
true
push!
(
CONFIG_LIST
,
"./cnfg/"
*
readline
(
f
))
CONFIG_LIST
[
end
]
==
""
?
break
:
nothing
end
println
(
log_file
,
"Read "
,
length
(
CONFIG_LIST
)
-
1
,
" config names for analisis"
)
return
nothing
end
"""
function load_gauge_field()
Loads the gauge field and computes the Csw term
"""
function
load_gauge_field
()
global
MCid
=
MCid
+
1
if
!
parsed_args
[
"cern"
]
println
(
log_file
,
"
\n
Reading gauge field with LGPU native convention: "
,
CONFIG_LIST
[
MCid
],
"..."
)
global
U
,
_
=
read_cnfg
(
CONFIG_LIST
[
MCid
])
else
println
(
log_file
,
"
\n
Reading gauge field with CERN convention: "
,
CONFIG_LIST
[
MCid
],
"..."
)
global
U
=
read_cnfg_cern
(
CONFIG_LIST
[
MCid
],
lp
)
end
println
(
log_file
,
"Updated to Gauge configuration n"
*
string
(
MCid
))
f
=
open
(
CONFIG_LIST
[
MCid
],
"r"
)
println
(
log_file
,
"MD5 checksum of gauge config: "
,
bytes2hex
(
md5
(
f
)),
"
\n
"
)
close
(
f
)
println
(
log_file
,
"Plaq = "
,
plaquette
(
U
,
lp
,
gp
,
ymws
))
println
(
log_file
,
"Qtop = "
,
Qtop
(
U
,
gp
,
lp
,
ymws
))
Csw!
(
dws
,
U
,
gp
,
lp
)
U_CPU
.=
Array
(
U
)
flush
(
log_file
)
return
nothing
end
end
This diff is collapsed.
Click to expand it.
src/meas.jl
View file @
8d880e20
...
@@ -141,8 +141,6 @@ end
...
@@ -141,8 +141,6 @@ end
"""
"""
function two_pt_rnd()
function two_pt_rnd()
...
...
This diff is collapsed.
Click to expand it.
src/utils.jl
View file @
8d880e20
using
LatticeGPU
#
using LatticeGPU
using
ADerrors
using
ADerrors
using
BDIO
using
BDIO
...
@@ -23,7 +23,7 @@ function read_ff(name::String)
...
@@ -23,7 +23,7 @@ function read_ff(name::String)
BDIO_read
(
file
,
th
)
BDIO_read
(
file
,
th
)
BDIO_read
(
file
,
nflow
)
BDIO_read
(
file
,
nflow
)
flow_times
=
Vector
{
Float64
}(
undef
,
nflow
[
1
])
flow_times
=
Vector
{
Float64
}(
undef
,
nflow
[
1
])
BDIO_read
(
file
,
flow_times
)
nflow
[
1
]
>
0
?
BDIO_read
(
file
,
flow_times
)
:
nothing
BDIO_read
(
file
,
N_noise
)
BDIO_read
(
file
,
N_noise
)
N_noise
=
N_noise
[
1
]
N_noise
=
N_noise
[
1
]
...
@@ -103,11 +103,11 @@ end
...
@@ -103,11 +103,11 @@ end
"""
"""
function uwff(file::String)
function uwff(file::String)
Loads in the variables '
pp_corr','ap_corr','pp_corr_t','ap_corr_t' and 'Sigma
' the corresponding
Loads in the variables '
Epft', 'pp_corr', 'ap_corr', 'pp_corr_t','ap_corr_t', 'Sigma' and 'Sigma_cfl
' the corresponding
'uwreal' quantities. The indices are, when corresponding, eucliden time and flow times
'uwreal' quantities. The indices are, when corresponding, eucliden time and flow times
"""
"""
function
uwff
(
file
::
String
)
function
uwff
(
file
::
String
)
Eoft_mc
,
pp_corr_mc
,
ap_corr_mc
,
pp_corr_t_mc
,
ap_corr_t_mc
,
Sigma_mc
,
Phat_t_mc
=
read_ff
(
file
)
Eoft_mc
,
pp_corr_mc
,
ap_corr_mc
,
pp_corr_t_mc
,
ap_corr_t_mc
,
Sigma_mc
,
Sigma_cfl_mc
,
Phat_t_mc
=
read_ff
(
file
)
runame
=
String
(
split
(
split
(
file
,
"/"
)[
end
],
"."
)[
1
])
runame
=
String
(
split
(
split
(
file
,
"/"
)[
end
],
"."
)[
1
])
T
=
size
(
pp_corr_mc
)[
2
]
T
=
size
(
pp_corr_mc
)[
2
]
...
...
This diff is collapsed.
Click to expand it.
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