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
0a66fa36
Commit
0a66fa36
authored
Jul 11, 2018
by
Ben Hazelwood
Browse files
Support for start/end heartbeat with +ve/-ve tag
parent
43bf8f06
Changes
1
Show whitespace changes
Inline
Side-by-side
lib/Timing.cpp
View file @
0a66fa36
...
...
@@ -38,8 +38,6 @@ struct Timer {
// Store the MPI_Requests for each heartbeat delta (per replica)
std
::
map
<
int
,
std
::
list
<
MPI_Request
>
>
heartbeatTimeRequests
;
std
::
map
<
int
,
bool
>
isHeartbeatTriggeredForTag
;
// Hash for each heartbeat buffer (per replica)
std
::
map
<
int
,
std
::
list
<
std
::
size_t
>
>
heartbeatHashes
;
// Store the MPI_Requests for each heartbeat (per replica)
...
...
@@ -64,19 +62,16 @@ void Timing::finaliseTiming() {
}
void
Timing
::
markTimeline
(
int
tag
)
{
if
(
timer
.
isHeartbeatTriggeredForTag
.
find
(
tag
)
==
timer
.
isHeartbeatTriggeredForTag
.
end
())
{
// New heartbeat tag found
timer
.
isHeartbeatTriggeredForTag
.
insert
({
tag
,
false
});
timer
.
heartbeatTimes
.
at
(
getTeam
()).
push_back
(
PMPI_Wtime
());
}
else
if
(
timer
.
isHeartbeatTriggeredForTag
.
at
(
tag
)
==
false
)
{
// Trigger heartbeat
if
(
tag
>
0
)
{
timer
.
heartbeatTimes
.
at
(
getTeam
()).
push_back
(
PMPI_Wtime
());
}
else
{
// End heartbeat
}
else
if
(
tag
<
0
)
{
if
(
timer
.
heartbeatTimes
.
at
(
getTeam
()).
size
())
{
timer
.
heartbeatTimes
.
at
(
getTeam
()).
back
()
=
PMPI_Wtime
()
-
timer
.
heartbeatTimes
.
at
(
getTeam
()).
back
();
compareProgressWithReplicas
();
}
timer
.
isHeartbeatTriggeredForTag
.
at
(
tag
)
=
!
timer
.
isHeartbeatTriggeredForTag
.
at
(
tag
);
}
else
{
// TODO: if tag == 0 then single heartbeat mode not deltas
}
}
void
Timing
::
markTimeline
(
int
tag
,
const
void
*
sendbuf
,
int
sendcount
,
MPI_Datatype
sendtype
)
{
...
...
Write
Preview
Supports
Markdown
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