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
7cd8b32c
Commit
7cd8b32c
authored
Aug 01, 2019
by
Lukas Weber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
be more conservative about insufficiently filled histograms
parent
3cc738ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
15 deletions
+19
-15
src/runner_pt.cpp
src/runner_pt.cpp
+18
-14
src/runner_pt.h
src/runner_pt.h
+1
-1
No files found.
src/runner_pt.cpp
View file @
7cd8b32c
...
...
@@ -69,7 +69,6 @@ void pt_chain::checkpoint_read(const iodump::group &g) {
g
.
read
(
"nup_histogram"
,
nup_histogram
);
g
.
read
(
"ndown_histogram"
,
ndown_histogram
);
g
.
read
(
"entries_before_optimization"
,
entries_before_optimization
);
g
.
read
(
"histogram_entries"
,
histogram_entries
);
}
void
pt_chain
::
checkpoint_write
(
const
iodump
::
group
&
g
)
{
...
...
@@ -77,13 +76,15 @@ void pt_chain::checkpoint_write(const iodump::group &g) {
g
.
write
(
"nup_histogram"
,
nup_histogram
);
g
.
write
(
"ndown_histogram"
,
ndown_histogram
);
g
.
write
(
"entries_before_optimization"
,
entries_before_optimization
);
g
.
write
(
"histogram_entries"
,
histogram_entries
);
}
int
pt_chain
::
histogram_entries
()
{
return
nup_histogram
.
at
(
0
);
}
void
pt_chain
::
clear_histograms
()
{
std
::
fill
(
nup_histogram
.
begin
(),
nup_histogram
.
end
(),
0
);
std
::
fill
(
ndown_histogram
.
begin
(),
ndown_histogram
.
end
(),
0
);
histogram_entries
=
0
;
}
static
double
linear_regression
(
const
std
::
vector
<
double
>
&
x
,
const
std
::
vector
<
double
>
&
y
,
int
i
,
...
...
@@ -444,19 +445,22 @@ void runner_pt_master::pt_param_optimization(pt_chain &chain, pt_chain_run &chai
chain
.
ndown_histogram
[
chain_run
.
rank_to_pos
[
rank
]]
+=
chain_run
.
last_visited
[
rank
]
==
-
1
;
chain
.
nup_histogram
[
chain_run
.
rank_to_pos
[
rank
]]
+=
chain_run
.
last_visited
[
rank
]
==
1
;
}
chain
.
histogram_entries
++
;
if
(
chain
.
histogram_entries
>=
chain
.
entries_before_optimization
)
{
auto
[
fnonlinearity
,
convergence
]
=
chain
.
optimize_params
(
job_
.
jobfile
[
"jobconfig"
].
get
<
int
>
(
"pt_parameter_optimization_linreg_len"
,
2
));
job_
.
log
(
fmt
::
format
(
"chain {}: pt param optimization: entries={}, f nonlinearity={:.2g}, "
"convergence={:.2g}"
,
chain
.
id
,
chain
.
entries_before_optimization
,
fnonlinearity
,
convergence
));
if
(
chain
.
histogram_entries
()
>=
chain
.
entries_before_optimization
)
{
chain
.
entries_before_optimization
*=
job_
.
jobfile
[
"jobconfig"
].
get
<
double
>
(
"pt_parameter_optimization_nsamples_growth"
,
1.5
);
checkpoint_write
();
chain
.
clear_histograms
();
if
(
std
::
any_of
(
chain_run
.
last_visited
.
begin
(),
chain_run
.
last_visited
.
end
(),
[](
int
label
)
{
return
label
==
0
;
}))
{
job_
.
log
(
fmt
::
format
(
"chain {}: some ranks still have no label. holding off parameter optimization due to insufficient statistics"
));
}
else
{
auto
[
fnonlinearity
,
convergence
]
=
chain
.
optimize_params
(
job_
.
jobfile
[
"jobconfig"
].
get
<
int
>
(
"pt_parameter_optimization_linreg_len"
,
2
));
job_
.
log
(
fmt
::
format
(
"chain {}: pt param optimization: entries={}, f nonlinearity={:.2g}, "
"convergence={:.2g}"
,
chain
.
id
,
chain
.
entries_before_optimization
,
fnonlinearity
,
convergence
));
checkpoint_write
();
chain
.
clear_histograms
();
}
}
}
...
...
src/runner_pt.h
View file @
7cd8b32c
...
...
@@ -19,13 +19,13 @@ struct pt_chain {
std
::
vector
<
int
>
nup_histogram
;
std
::
vector
<
int
>
ndown_histogram
;
int
entries_before_optimization
{
0
};
int
histogram_entries
{};
bool
is_done
();
void
checkpoint_read
(
const
iodump
::
group
&
g
);
void
checkpoint_write
(
const
iodump
::
group
&
g
);
void
clear_histograms
();
int
histogram_entries
();
std
::
tuple
<
double
,
double
>
optimize_params
(
int
linreg_len
);
};
...
...
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