Skip to content

Commit e0cdbf5

Browse files
authored
Merge pull request #6696 from gassmoeller/make_compatible_with_dealii_dev
Do not access timer inside subsection
2 parents 0c13a04 + 3b61d10 commit e0cdbf5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

source/postprocess/timing_statistics.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,15 @@ namespace aspect
3030
std::pair<std::string,std::string>
3131
TimingStatistics<dim>::execute (TableHandler &statistics)
3232
{
33-
const auto &timer = this->get_computing_timer();
33+
auto &timer = this->get_computing_timer();
34+
35+
// The timer only allows access to its data outside of subsections
36+
// Leaving and entering the subsection again here means there will be
37+
// one additional call of this subsection per time step in the timing
38+
// output.
39+
timer.leave_subsection("Postprocessing");
3440
const std::map<std::string, double> &timing_map = timer.get_summary_data(TimerOutput::total_wall_time);
41+
timer.enter_subsection("Postprocessing");
3542

3643
for (const auto &section: timing_map)
3744
{

0 commit comments

Comments
 (0)