Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
MPIBP-Hummer
BioEM
Commits
e82d8fa0
Commit
e82d8fa0
authored
Jun 21, 2017
by
Luka Stanisic
Browse files
implementing another way of doing Autotuning (using bisection)
parent
433e8148
Changes
1
Hide whitespace changes
Inline
Side-by-side
bioem.cpp
View file @
e82d8fa0
...
...
@@ -526,6 +526,9 @@ int bioem::run()
int
workload
=
getenv
(
"GPUWORKLOAD"
)
==
NULL
?
100
:
atoi
(
getenv
(
"GPUWORKLOAD"
));
int
best_workload
=
workload
;
bool
stopTuning
=
false
;
int
a
=
1
,
b
=
50
,
c
=
100
,
x
=
75
,
limit
=
1
;
double
fb
=
0.
,
fx
=
0.
;
if
(
Autotuning
==
3
)
rebalance
(
b
);
if
(
DebugOutput
>=
1
&&
mpi_rank
==
0
)
printf
(
"
\t
Main Loop GridAngles %d, CTFs %d, RefMaps %d, Shifts (%d/%d)², Pixels %d², OMP Threads %d, MPI Ranks %d
\n
"
,
param
.
nTotGridAngles
,
param
.
nTotCTFs
,
RefMap
.
ntotRefMap
,
2
*
param
.
param_device
.
maxDisplaceCenter
+
param
.
param_device
.
GridSpaceCenter
,
param
.
param_device
.
GridSpaceCenter
,
param
.
param_device
.
NumberPixels
,
omp_get_max_threads
(),
mpi_size
);
...
...
@@ -636,6 +639,42 @@ int bioem::run()
}
rebalance
(
workload
);
}
if
(
Autotuning
==
3
&&
!
stopTuning
&&
(
iConv
%
7
==
6
))
{
if
(
compTime
==
0.
)
compTime
=
timer
.
GetCurrentElapsedTime
();
if
(
iOrient
==
iOrientStart
&&
iConv
==
6
)
{
fb
=
compTime
;
x
=
75
;
}
else
{
fx
=
compTime
;
if
(
fx
<
fb
)
{
if
(
x
<
b
)
c
=
b
;
else
a
=
b
;
b
=
x
;
fb
=
fx
;
}
else
{
if
(
x
<
b
)
a
=
x
;
else
c
=
x
;
}
x
=
(
c
-
b
>
b
-
a
)
?
(
int
)(
b
+
(
c
-
b
)
/
2
)
:
(
int
)(
a
+
(
b
-
a
)
/
2
);
}
if
(
(
c
-
b
==
limit
)
&&
(
b
-
a
==
limit
)
)
stopTuning
=
true
;
rebalance
(
x
);
}
}
if
(
DebugOutput
>=
1
)
{
...
...
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