Commit e90a7fc6 authored by Phillip Samfass's avatar Phillip Samfass

put in some debugging code and a TODO

parent 61bb9508
...@@ -68,7 +68,7 @@ void Timing::markTimeline(int tag) { ...@@ -68,7 +68,7 @@ void Timing::markTimeline(int tag) {
if (timer.heartbeatTimes.at(getTeam()).size()) { if (timer.heartbeatTimes.at(getTeam()).size()) {
timer.heartbeatTimes.at(getTeam()).back() = PMPI_Wtime() - timer.heartbeatTimes.at(getTeam()).back(); 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()); printf("World Rank: %d, team rank: %d, team: %d, submitted time %f\n", getWorldRank(), getTeamRank(), getTeam(),timer.heartbeatTimes.at(getTeam()).back());
//compareProgressWithReplicas(); compareProgressWithReplicas();
} }
} else { } else {
// TODO: if tag == 0 then single heartbeat mode not deltas // TODO: if tag == 0 then single heartbeat mode not deltas
...@@ -96,6 +96,7 @@ void Timing::compareProgressWithReplicas() { ...@@ -96,6 +96,7 @@ void Timing::compareProgressWithReplicas() {
PMPI_Irecv(&timer.heartbeatTimes.at(r).back(), 1, MPI_DOUBLE, PMPI_Irecv(&timer.heartbeatTimes.at(r).back(), 1, MPI_DOUBLE,
mapTeamToWorldRank(getTeamRank(), r), r, getLibComm(), &timer.heartbeatTimeRequests.at(r).back()); mapTeamToWorldRank(getTeamRank(), r), r, getLibComm(), &timer.heartbeatTimeRequests.at(r).back());
// Progress on outstanding receives and sends
auto it = timer.heartbeatTimeRequests.at(r).begin(); auto it = timer.heartbeatTimeRequests.at(r).begin();
while (it != timer.heartbeatTimeRequests.at(r).end()) { while (it != timer.heartbeatTimeRequests.at(r).end()) {
int flag; int flag;
...@@ -163,6 +164,17 @@ void Timing::outputTiming() { ...@@ -163,6 +164,17 @@ void Timing::outputTiming() {
std::cout.flush(); std::cout.flush();
PMPI_Barrier(MPI_COMM_WORLD); 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 filenamePrefix = getEnvString("TMPI_FILE");
std::string outputPathPrefix = getEnvString("TMPI_OUTPUT_PATH"); std::string outputPathPrefix = getEnvString("TMPI_OUTPUT_PATH");
...@@ -227,6 +239,14 @@ void Timing::outputTiming() { ...@@ -227,6 +239,14 @@ void Timing::outputTiming() {
f.close(); 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); PMPI_Barrier(MPI_COMM_WORLD);
} }
Markdown is supported
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