Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Weinzierl
teaMPI
Commits
e90a7fc6
Commit
e90a7fc6
authored
Oct 08, 2019
by
Phillip Samfass
Browse files
put in some debugging code and a TODO
parent
61bb9508
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/Timing.cpp
View file @
e90a7fc6
...
...
@@ -68,7 +68,7 @@ void Timing::markTimeline(int tag) {
if
(
timer
.
heartbeatTimes
.
at
(
getTeam
()).
size
())
{
timer
.
heartbeatTimes
.
at
(
getTeam
()).
back
()
=
PMPI_Wtime
()
-
timer
.
heartbeatTimes
.
at
(
getTeam
()).
back
();
printf
(
"World Rank: %d, team rank: %d, team: %d, submitted time %f
\n
"
,
getWorldRank
(),
getTeamRank
(),
getTeam
(),
timer
.
heartbeatTimes
.
at
(
getTeam
()).
back
());
//
compareProgressWithReplicas();
compareProgressWithReplicas
();
}
}
else
{
// TODO: if tag == 0 then single heartbeat mode not deltas
...
...
@@ -96,6 +96,7 @@ void Timing::compareProgressWithReplicas() {
PMPI_Irecv
(
&
timer
.
heartbeatTimes
.
at
(
r
).
back
(),
1
,
MPI_DOUBLE
,
mapTeamToWorldRank
(
getTeamRank
(),
r
),
r
,
getLibComm
(),
&
timer
.
heartbeatTimeRequests
.
at
(
r
).
back
());
// Progress on outstanding receives and sends
auto
it
=
timer
.
heartbeatTimeRequests
.
at
(
r
).
begin
();
while
(
it
!=
timer
.
heartbeatTimeRequests
.
at
(
r
).
end
())
{
int
flag
;
...
...
@@ -163,6 +164,17 @@ void Timing::outputTiming() {
std
::
cout
.
flush
();
PMPI_Barrier
(
MPI_COMM_WORLD
);
//TODO: finish outstanding communication requests
/*bool finished_all = false;
while(!finished_all) {
for(int r=0; r<getNumberOfTeams(); r++) {
finished_all &= timer.heartbeatTimeRequests.at(r).empty();
}
if(!finished_all) {
}
}*/
std
::
string
filenamePrefix
=
getEnvString
(
"TMPI_FILE"
);
std
::
string
outputPathPrefix
=
getEnvString
(
"TMPI_OUTPUT_PATH"
);
...
...
@@ -227,6 +239,14 @@ void Timing::outputTiming() {
f
.
close
();
}
/*for (int r=0; r < getNumberOfTeams(); r++) {
if (r != getTeam()) {
for (const double& t : timer.heartbeatTimes.at()) {
printf("World rank: %d, team rank: %d knows for replicand from team %d, time %f\n", getWorldRank(), getTeamRank(), r, t);
}
}
}*/
PMPI_Barrier
(
MPI_COMM_WORLD
);
}
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