Commit 43bf8f06 authored by Ben Hazelwood's avatar Ben Hazelwood
Browse files

Use list initialisation not make_pair

parent bc346be3
......@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
}
#ifdef COMPARE_PROGRESS
MPI_Sendrecv(MPI_IN_PLACE, 0, MPI_BYTE, MPI_PROC_NULL, 1, MPI_IN_PLACE, 0, MPI_BYTE, MPI_PROC_NULL, 0, MPI_COMM_SELF, MPI_STATUS_IGNORE);
MPI_Sendrecv(MPI_IN_PLACE, 0, MPI_BYTE, MPI_PROC_NULL, 0, MPI_IN_PLACE, 0, MPI_BYTE, MPI_PROC_NULL, 0, MPI_COMM_SELF, MPI_STATUS_IGNORE);
#endif
MPI_Barrier(MPI_COMM_WORLD);
}
......
......@@ -50,11 +50,11 @@ void Timing::initialiseTiming() {
synchroniseRanksInTeam();
timer.startTime = PMPI_Wtime();
for (int i=0; i < getNumberOfTeams(); i++) {
timer.heartbeatTimes.insert(std::make_pair(i, std::list<double>());
timer.heartbeatTimeRequests.insert(std::make_pair(i, std::list<MPI_Request>()));
timer.heartbeatTimes.insert({i, std::list<double>()});
timer.heartbeatTimeRequests.insert({i, std::list<MPI_Request>()});
timer.heartbeatHashes.insert(std::make_pair(i, std::list<std::size_t>()));
timer.heartbeatHashRequests.insert(std::make_pair(i, std::list<MPI_Request>()));
timer.heartbeatHashes.insert({i, std::list<std::size_t>()});
timer.heartbeatHashRequests.insert({i, std::list<MPI_Request>()});
}
}
......@@ -66,7 +66,7 @@ void Timing::finaliseTiming() {
void Timing::markTimeline(int tag) {
if (timer.isHeartbeatTriggeredForTag.find(tag) == timer.isHeartbeatTriggeredForTag.end()) {
// New heartbeat tag found
timer.isHeartbeatTriggeredForTag.insert( std::make_pair(tag, false));
timer.isHeartbeatTriggeredForTag.insert({tag, false});
timer.heartbeatTimes.at(getTeam()).push_back(PMPI_Wtime());
} else if (timer.isHeartbeatTriggeredForTag.at(tag) == false) {
// Trigger heartbeat
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment