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
b603674f
Commit
b603674f
authored
Sep 05, 2024
by
Fernando Pérez Panadero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes in 1pt and minor bug fix
parent
af973362
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
42 deletions
+23
-42
main.jl
main.jl
+1
-1
src/io.jl
src/io.jl
+4
-6
src/mc.jl
src/mc.jl
+1
-1
src/meas.jl
src/meas.jl
+7
-24
src/utils.jl
src/utils.jl
+10
-10
No files found.
main.jl
View file @
b603674f
...
...
@@ -19,7 +19,7 @@ include("./src/mc.jl")
@timeit
"Input reading and space allocation"
begin
read_input
()
load_structs
()
global
log_file
=
open
(
"./output/"
*
params
[
"Run"
][
"name"
]
*
".log"
,
"
w+
"
)
global
log_file
=
open
(
"./output/"
*
params
[
"Run"
][
"name"
]
*
".log"
,
"
a
"
)
write_log
()
load_fields
()
therm_or_readlist
()
...
...
src/io.jl
View file @
b603674f
...
...
@@ -79,7 +79,7 @@ end
function
write_log
()
println
(
log_file
,
"Running Fer
mass
.jl by "
,
params
[
"Run"
][
"user"
],
". Name of the run: "
,
params
[
"Run"
][
"name"
])
println
(
log_file
,
"Running Fer
flow
.jl by "
,
params
[
"Run"
][
"user"
],
". Name of the run: "
,
params
[
"Run"
][
"name"
])
println
(
log_file
,
""
)
print
(
log_file
,
"Calling: "
)
...
...
@@ -117,7 +117,7 @@ function save_data()
fb
=
BDIO_open
(
fname
,
"a"
)
println
(
log_file
,
"
\n
Appending output to "
*
fname
*
"
\n
"
)
else
fb
=
BDIO_open
(
fname
,
"w"
,
"BDIO output from
sfcf
.jl"
)
fb
=
BDIO_open
(
fname
,
"w"
,
"BDIO output from
ferflow
.jl"
)
println
(
log_file
,
"Creating new BDIO output file "
*
fname
)
BDIO_start_record!
(
fb
,
BDIO_BIN_GENERIC
,
14
)
...
...
@@ -146,10 +146,8 @@ function save_data()
for
fl
in
1
:
length
(
flow_times
)
BDIO_write!
(
fb
,
pp_corr_t
[
:
,
noi
,
fl
])
BDIO_write!
(
fb
,
ap_corr_t
[
:
,
noi
,
fl
])
## Testblock 4 : Changed the saving of Sigma
BDIO_write!
(
fb
,[
Quark_cond
[
:
,
noi
,
fl
]])
BDIO_write!
(
fb
,[
Quark_cond_cfl
[
:
,
noi
,
fl
]])
##
BDIO_write!
(
fb
,
Quark_cond
[
:
,
noi
,
fl
])
BDIO_write!
(
fb
,
Quark_cond_cfl
[
:
,
noi
,
fl
])
BDIO_write!
(
fb
,[
phat_t
[
noi
,
fl
]])
end
end
...
...
src/mc.jl
View file @
b603674f
...
...
@@ -32,7 +32,7 @@ function Gauge_update()
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
]
!=
""
)
global
RUN_ON
=
(
isfile
(
"RUN_ON_"
*
params
[
"Run"
][
"name"
])
&&
CONFIG_LIST
[
MCid
+
1
]
!=
"
./cnfg/
"
)
end
return
nothing
...
...
src/meas.jl
View file @
b603674f
...
...
@@ -25,14 +25,8 @@ function load_fields()
global
Eofpla
=
Array
{
Complex
{
Float64
}}(
undef
,
lp
.
iL
[
4
],
lp
.
npls
);
global
phat_t
=
Array
{
Float64
}(
undef
,
N_noise
,
length
(
flow_times
));
# global Quark_cond = Array{Complex{Float64}}(undef,N_noise,length(flow_times));
# global Quark_cond_cfl = Array{Complex{Float64}}(undef,N_noise,length(flow_times));
## Test block 1
global
Quark_cond
=
Array
{
Complex
{
Float64
}}(
undef
,
lp
.
iL
[
4
],
N_noise
,
length
(
flow_times
));
global
Quark_cond_cfl
=
Array
{
Complex
{
Float64
}}(
undef
,
lp
.
iL
[
4
],
N_noise
,
length
(
flow_times
));
##
return
nothing
end
...
...
@@ -71,11 +65,10 @@ function two_pt()
end
end
end
end
delta_t
=
0.0
delta_t
=
flow_times
.-
[
0.0
,
flow_times
[
1
:
end
-
1
]
...
]
neps
=
int
.
eps_ini
for
fl
in
1
:
length
(
flow_times
)
delta_t
=
flow_times
[
fl
]
-
delta_t
_
,
epslist
=
flw_adapt
(
U
,
psi
,
int
,
delta_t
,
neps
,
gp
,
dpar
,
lp
,
ymws
,
dws
)
_
,
epslist
=
flw_adapt
(
U
,
psi
,
int
,
delta_t
[
fl
],
neps
,
gp
,
dpar
,
lp
,
ymws
,
dws
)
neps
=
epslist
[
end
]
if
noi
==
1
...
...
@@ -128,9 +121,9 @@ function one_pt()
for
noi
in
1
:
N_noise
## Testblock 6 : added tsource
## The change in the field before randomize should be moved to the package
psi
.=
0.0
*
psi
pfrandomize!
(
psi
,
lp
,
params
[
"Fermion"
][
"tsource"
])
##
backflow
(
psi
,
U
,
flow_times
[
fl
],
params
[
"Measurements"
][
"Nsaves"
],
gp
,
dpar
,
lp
,
ymws
,
dws
)
...
...
@@ -147,31 +140,22 @@ function one_pt()
flush
(
log_file
)
@timeit
"CPU to GPU"
copyto!
(
dws
.
sp
,
psi_CPU
)
# Quark_cond[noi,fl] = sum(dot.(dws.sp,psi))
# Quark_cond_cfl[noi,fl] = -sum(norm2.(dws.sp))
#### Test block 2
Quark_cond
[
:
,
noi
,
fl
]
.=
zero
(
ComplexF64
)
Quark_cond_cfl
[
:
,
noi
,
fl
]
.=
zero
(
ComplexF64
)
for
t
in
1
:
lp
.
iL
[
4
]
for
i
in
1
:
lp
.
iL
[
1
]
for
j
in
1
:
lp
.
iL
[
2
]
for
k
in
1
:
lp
.
iL
[
3
]
b
,
r
=
point_index
(
CartesianIndex
{
lp
.
ndim
}((
i
,
j
,
k
,
t
)),
lp
)
CUDA
.
@allowscalar
Quark_cond
[
t
,
noi
,
fl
]
+=
dot
(
dws
.
sp
[
b
,
r
],
psi
[
b
,
r
])
CUDA
.
@allowscalar
Quark_cond_cfl
[
t
,
noi
,
fl
]
+=
-
norm2
.
(
dws
.
sp
[
b
,
r
])
CUDA
.
@allowscalar
Quark_cond_cfl
[
t
,
noi
,
fl
]
+=
-
norm2
(
dws
.
sp
[
b
,
r
])
end
end
end
end
#######
@timeit
"CPU to GPU"
copyto!
(
U
,
U_CPU
)
end
end
## Testblock 3 : Changed division V4 to prod(...)
Quark_cond
.=
Quark_cond
./
prod
(
lp
.
iL
[
1
:
3
])
Quark_cond_cfl
.=
Quark_cond_cfl
./
prod
(
lp
.
iL
[
1
:
3
])
##
println
(
log_file
,
"Finished measuring 1pt"
)
return
nothing
...
...
@@ -194,11 +178,10 @@ function two_pt_rnd()
pfrandomize!
(
psi
,
lp
)
delta_t
=
0.0
delta_t
=
flow_times
.-
[
0.0
,
flow_times
[
1
:
end
-
1
]
...
]
neps
=
int
.
eps_ini
for
fl
in
1
:
length
(
flow_times
)
delta_t
=
flow_times
[
fl
]
-
delta_t
_
,
epslist
=
flw_adapt
(
U
,
psi
,
int
,
delta_t
,
neps
,
gp
,
dpar
,
lp
,
ymws
,
dws
)
_
,
epslist
=
flw_adapt
(
U
,
psi
,
int
,
delta_t
[
fl
],
neps
,
gp
,
dpar
,
lp
,
ymws
,
dws
)
neps
=
epslist
[
end
]
phat_t
[
noi
,
fl
]
=
sum
(
norm2
.
(
psi
))
...
...
src/utils.jl
View file @
b603674f
...
...
@@ -38,18 +38,18 @@ function read_ff(name::String)
ap_corr
=
Array
{
ComplexF64
}(
undef
,
1
,
iL
[
4
],
N_noise
);
pp_corr_t
=
Array
{
Float64
}(
undef
,
1
,
iL
[
4
],
N_noise
,
nflow
);
ap_corr_t
=
Array
{
ComplexF64
}(
undef
,
1
,
iL
[
4
],
N_noise
,
nflow
);
Sigma
=
Array
{
ComplexF64
}(
undef
,
1
,
N_noise
,
nflow
);
Sigma
=
Array
{
ComplexF64
}(
undef
,
1
,
iL
[
4
],
N_noise
,
nflow
);
Phat_t
=
Array
{
Float64
}(
undef
,
1
,
N_noise
,
nflow
);
Sigma_cfl
=
Array
{
ComplexF64
}(
undef
,
1
,
N_noise
,
nflow
);
Sigma_cfl
=
Array
{
ComplexF64
}(
undef
,
1
,
iL
[
4
],
N_noise
,
nflow
);
Eoft
=
Array
{
Complex
{
Float64
}}(
undef
,
1
,
1
+
nflow
,
iL
[
4
]);
pp_corr_mc
=
Array
{
Float64
}(
undef
,
0
,
iL
[
4
],
N_noise
);
ap_corr_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
iL
[
4
],
N_noise
);
pp_corr_t_mc
=
Array
{
Float64
}(
undef
,
0
,
iL
[
4
],
N_noise
,
nflow
);
ap_corr_t_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
iL
[
4
],
N_noise
,
nflow
);
Sigma_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
N_noise
,
nflow
);
Sigma_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
iL
[
4
],
N_noise
,
nflow
);
Phat_t_mc
=
Array
{
Float64
}(
undef
,
0
,
N_noise
,
nflow
);
Sigma_cfl_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
N_noise
,
nflow
);
Sigma_cfl_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
iL
[
4
],
N_noise
,
nflow
);
Eoft_mc
=
Array
{
Complex
{
Float64
}}(
undef
,
0
,
1
+
nflow
,
iL
[
4
]);
while
BDIO_get_uinfo
(
file
)
!=
8
...
...
@@ -72,10 +72,10 @@ function read_ff(name::String)
BDIO_read
(
file
,
TvecC
)
ap_corr_t
[
1
,
:
,
noi
,
fl
]
.=
TvecC
BDIO_read
(
file
,
CN
)
Sigma
[
1
,
noi
,
fl
]
=
CN
[
1
]
BDIO_read
(
file
,
CN
)
Sigma_cfl
[
1
,
noi
,
fl
]
=
CN
[
1
]
BDIO_read
(
file
,
TvecC
)
Sigma
[
1
,
:
,
noi
,
fl
]
.=
TvecC
BDIO_read
(
file
,
TvecC
)
Sigma_cfl
[
1
,
:
,
noi
,
fl
]
.=
TvecC
BDIO_read
(
file
,
RN
)
Phat_t
[
1
,
noi
,
fl
]
=
RN
[
1
]
end
...
...
@@ -126,8 +126,8 @@ function uwff(file::String)
global
pp_corr_t
=
[
uwreal
(
sum
(
pp_corr_t_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
]
./
Ns
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
]
global
ap_corr_t
=
[
uwreal
(
real
.
(
sum
(
ap_corr_t_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
]
./
Ns
),
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
]
global
Sigma
=
[
uwreal
(
real
.
(
sum
(
Sigma_mc
,
dims
=
2
)[
:
,
1
,
i
]
./
Ns
),
runame
)
for
i
in
1
:
Nfl
]
global
Sigma_cfl
=
[
uwreal
(
real
.
(
sum
(
Sigma_cfl_mc
,
dims
=
2
)[
:
,
1
,
i
]
./
Ns
),
runame
)
for
i
in
1
:
Nfl
]
global
Sigma
=
[
uwreal
(
real
.
(
sum
(
Sigma_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
]
./
Ns
),
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
]
global
Sigma_cfl
=
[
uwreal
(
real
.
(
sum
(
Sigma_cfl_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
]
./
Ns
),
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
]
global
Phat_t
=
[
uwreal
(
sum
(
Phat_t_mc
,
dims
=
2
)[
:
,
1
,
i
]
./
Ns
,
runame
)
for
i
in
1
:
Nfl
]
return
nothing
...
...
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