Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
L
load_leveller
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
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
Lukas Weber
load_leveller
Commits
0a915760
Commit
0a915760
authored
May 19, 2020
by
Lukas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove doubling in the pt_statistics.h5 file
parent
91ad6c5d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
+12
-14
src/runner_pt.cpp
src/runner_pt.cpp
+11
-13
src/runner_pt.h
src/runner_pt.h
+1
-1
No files found.
src/runner_pt.cpp
View file @
0a915760
...
...
@@ -295,26 +295,24 @@ void runner_pt_master::write_statistics(const pt_chain_run &chain_run) {
cg
.
insert_back
(
"rank_to_pos"
,
chain_run
.
rank_to_pos
);
}
void
runner_pt_master
::
write_param_optimization_statistics
()
{
void
runner_pt_master
::
write_param_optimization_statistics
(
const
pt_chain
&
chain
)
{
std
::
string
stat_name
=
job_
.
jobdir
()
+
"/pt_statistics.h5"
;
iodump
stat
=
iodump
::
open_readwrite
(
stat_name
);
auto
g
=
stat
.
get_root
();
g
.
write
(
"chain_length"
,
chain_len_
);
for
(
auto
&
chain
:
pt_chains_
)
{
auto
cg
=
g
.
open_group
(
fmt
::
format
(
"chain{:04d}"
,
chain
.
id
));
cg
.
insert_back
(
"params"
,
chain
.
params
);
auto
cg
=
g
.
open_group
(
fmt
::
format
(
"chain{:04d}"
,
chain
.
id
));
cg
.
insert_back
(
"params"
,
chain
.
params
);
std
::
vector
<
double
>
rejection_est
(
chain
.
rejection_rates
);
bool
odd
=
false
;
for
(
auto
&
r
:
rejection_est
)
{
r
/=
chain
.
rejection_rate_entries
[
odd
];
odd
=
!
odd
;
}
cg
.
insert_back
(
"rejection_rates"
,
rejection_est
);
std
::
vector
<
double
>
rejection_est
(
chain
.
rejection_rates
);
bool
odd
=
false
;
for
(
auto
&
r
:
rejection_est
)
{
r
/=
chain
.
rejection_rate_entries
[
odd
];
odd
=
!
odd
;
}
cg
.
insert_back
(
"rejection_rates"
,
rejection_est
);
}
void
runner_pt_master
::
checkpoint_write
()
{
...
...
@@ -449,7 +447,7 @@ void runner_pt_master::pt_param_optimization(pt_chain &chain) {
"convergence={:.2g}"
,
chain
.
id
,
chain
.
rejection_rate_entries
[
0
],
efficiency
,
convergence
));
checkpoint_write
();
write_param_optimization_statistics
();
write_param_optimization_statistics
(
chain
);
chain
.
clear_histograms
();
}
}
...
...
src/runner_pt.h
View file @
0a915760
...
...
@@ -76,7 +76,7 @@ private:
void
checkpoint_read
();
void
write_params_json
();
void
write_statistics
(
const
pt_chain_run
&
chain_run
);
void
write_param_optimization_statistics
();
void
write_param_optimization_statistics
(
const
pt_chain
&
chain
);
int
schedule_chain_run
();
void
pt_global_update
(
pt_chain
&
chain
,
pt_chain_run
&
chain_run
);
...
...
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