Skip to content

Commit

Permalink
Fix slow rank warning showing on first time step
Browse files Browse the repository at this point in the history
n_steps was incremented before it was used to deteremine the current
time step instead of after. I moved where it is incremented
  • Loading branch information
bcaddy committed Feb 8, 2024
1 parent d2ac33b commit d2d5eb3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/timing_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ void OneTime::End(bool const print_high_values)
if (n_steps > 0) {
t_all += t_max;
}
n_steps++;

#ifdef MPI_CHOLLA
// Print out information if the process is unusually slow
Expand All @@ -78,6 +77,9 @@ void OneTime::End(bool const print_high_values)
<< " GPU PCI Bus ID: " << gpu_id << std::endl;
}
#endif // MPI_CHOLLA

// Increment n_steps
n_steps++;
}

void OneTime::RecordTime(Real time)
Expand Down

0 comments on commit d2d5eb3

Please sign in to comment.