Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Camille Coti
TensorJoseph
Commits
303627ad
Commit
303627ad
authored
Feb 19, 2020
by
Camille Coti
Browse files
Time measurements
parent
40feff07
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/mw_addslave.cpp
View file @
303627ad
...
...
@@ -134,9 +134,9 @@ gi::ex multiply_1level_master_addslave( tensor3D_t& T, unsigned int size, MPI_Co
Tens
=
add_expressions
(
results
,
symbols
);
double
t5
=
getTime
();
std
::
cout
<<
t2
-
t1
<<
std
::
endl
;
std
::
cout
<<
"
\t
"
<<
t3
-
t2
<<
std
::
endl
;
std
::
cout
<<
"
\t
"
<<
t4
-
t3
<<
std
::
endl
;
std
::
cout
<<
t2
-
t1
;
std
::
cout
<<
"
\t
"
<<
t3
-
t2
;
std
::
cout
<<
"
\t
"
<<
t4
-
t3
;
std
::
cout
<<
"
\t
"
<<
t5
-
t4
<<
std
::
endl
;
#if DEBUG
...
...
src/mw_addslave4.cpp
View file @
303627ad
...
...
@@ -412,9 +412,9 @@ gi::ex multiply_1level_master_addslave4( tensor3D_t& T, unsigned int size, MPI_C
Tens
=
add_expressions_parall
(
results
,
symbols
,
pzero
,
comm
);
double
t5
=
getTime
();
std
::
cout
<<
t2
-
t1
<<
std
::
endl
;
std
::
cout
<<
"
\t
"
<<
t3
-
t2
<<
std
::
endl
;
std
::
cout
<<
"
\t
"
<<
t4
-
t3
<<
std
::
endl
;
std
::
cout
<<
t2
-
t1
;
std
::
cout
<<
"
\t
"
<<
t3
-
t2
;
std
::
cout
<<
"
\t
"
<<
t4
-
t3
;
std
::
cout
<<
"
\t
"
<<
t5
-
t4
<<
std
::
endl
;
#if DEBUG
...
...
src/mw_tree.cpp
View file @
303627ad
...
...
@@ -24,8 +24,11 @@ gi::ex add_tree( gi::ex mine, gi::lst symbols, MPI_Comm comm = MPI_COMM_WORLD )
MPI_Comm_size
(
comm
,
&
size
);
MPI_Comm_rank
(
comm
,
&
rank
);
std
::
vector
<
double
>
times
;
step
=
0
;
if
(
0
==
rank
)
times
.
push_back
(
getTime
()
);
while
(
(
0x1
<<
step
)
<
size
)
{
if
(
0
==
(
rank
%
(
0x1
<<
(
step
+
1
)
)
)
)
{
...
...
@@ -36,6 +39,7 @@ gi::ex add_tree( gi::ex mine, gi::lst symbols, MPI_Comm comm = MPI_COMM_WORLD )
if
(
buddy
<
size
)
{
/* receive the result and add it */
Tens
+=
recv_result
(
buddy
,
symbols
,
comm
);
if
(
0
==
rank
)
times
.
push_back
(
getTime
()
);
}
}
else
{
...
...
@@ -48,6 +52,14 @@ gi::ex add_tree( gi::ex mine, gi::lst symbols, MPI_Comm comm = MPI_COMM_WORLD )
}
step
++
;
}
if
(
0
==
rank
)
{
for
(
auto
t
:
times
){
std
::
cout
<<
t
-
times
[
0
]
<<
"
\t
"
;
}
std
::
cout
<<
std
::
endl
;
}
return
Tens
;
}
...
...
@@ -125,9 +137,9 @@ gi::ex multiply_1level_master_local( tensor3D_t& T, unsigned int size, MPI_Comm
add_tree
(
Tens
,
symbols
,
comm
);
double
t5
=
getTime
();
std
::
cout
<<
t2
-
t1
<<
std
::
endl
;
std
::
cout
<<
"
\t
"
<<
t3
-
t2
<<
std
::
endl
;
std
::
cout
<<
"
\t
"
<<
t4
-
t3
<<
std
::
endl
;
std
::
cout
<<
t2
-
t1
;
std
::
cout
<<
"
\t
"
<<
t3
-
t2
;
std
::
cout
<<
"
\t
"
<<
t4
-
t3
;
std
::
cout
<<
"
\t
"
<<
t5
-
t4
<<
std
::
endl
;
#if DEBUG
...
...
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