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
Open sidebar
phylo
fastcodeml
Commits
26be0e27
Commit
26be0e27
authored
Mar 11, 2016
by
omid
Browse files
some changes in final timing reports and initial number of threads to
prevent possible false sharing
parent
21a4d11a
Changes
1
Hide whitespace changes
Inline
Side-by-side
fast.cpp
View file @
26be0e27
...
...
@@ -90,6 +90,8 @@ int main(int aRgc, char **aRgv) {
if
((
cmd
.
mNumThreads
>=
1
)
&&
(
cmd
.
mNumThreads
<=
(
unsigned
int
)
num_threads
))
num_threads
=
cmd
.
mNumThreads
;
else
num_threads
=
num_threads
/
2
+
1
;
// to prevent possible false sharing when it is set to maximum
// std::cout<<"num of thr: "<< num_threads <<std::endl;
omp_set_num_threads
(
num_threads
);
...
...
@@ -653,9 +655,8 @@ int main(int aRgc, char **aRgv) {
timer_app
.
stop
();
if
(
cmd
.
mVerboseLevel
>=
VERBOSE_ONLY_RESULTS
)
{
std
::
cout
<<
std
::
endl
<<
"Time used: "
<<
timer_app
.
get
()
/
60000
<<
":"
<<
(
timer_app
.
get
()
/
1000
)
%
60
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
<<
"Time used: "
<<
timer_app
.
get
()
/
60000
<<
"m:"
<<
(
timer_app
.
get
()
/
1000
)
%
60
<<
"s"
<<
std
::
endl
;
std
::
cout
<<
"Cores used: "
<<
num_threads
<<
std
::
endl
;
}
return
0
;
...
...
@@ -883,7 +884,7 @@ int main(int aRgc, char **aRgv) {
timer_app
.
stop
();
if
(
cmd
.
mVerboseLevel
>=
VERBOSE_ONLY_RESULTS
)
{
std
::
cout
<<
std
::
endl
<<
"Time used: "
<<
timer_app
.
get
()
/
60000
<<
":"
<<
(
timer_app
.
get
()
/
1000
)
%
60
<<
std
::
endl
;
<<
"
m
:"
<<
(
timer_app
.
get
()
/
1000
)
%
60
<<
"s"
<<
std
::
endl
;
std
::
cout
<<
"Cores used: "
<<
num_threads
<<
std
::
endl
;
}
...
...
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