From ecd9594fec89bce199744418806e02c09d8d88f1 Mon Sep 17 00:00:00 2001 From: Cristian C Lalescu <Cristian.Lalescu@ds.mpg.de> Date: Mon, 12 Jun 2017 12:46:00 +0200 Subject: [PATCH] move iter timing output before stopping condition break --- bfps/cpp/full_code/direct_numerical_simulation.cpp | 4 ++-- bfps/cpp/full_code/postprocess.cpp | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bfps/cpp/full_code/direct_numerical_simulation.cpp b/bfps/cpp/full_code/direct_numerical_simulation.cpp index 7b179fc5..edc2f994 100644 --- a/bfps/cpp/full_code/direct_numerical_simulation.cpp +++ b/bfps/cpp/full_code/direct_numerical_simulation.cpp @@ -103,11 +103,11 @@ int direct_numerical_simulation::main_loop(void) this->step(); if (this->iteration % this->niter_out == 0) this->write_checkpoint(); + this->print_simple_timer( + "iteration " + std::to_string(this->iteration)); this->check_stopping_condition(); if (this->stop_code_now) break; - this->print_simple_timer( - "iteration " + std::to_string(this->iteration)); } this->do_stats(); this->print_simple_timer( diff --git a/bfps/cpp/full_code/postprocess.cpp b/bfps/cpp/full_code/postprocess.cpp index 1d3e6890..edb5929f 100644 --- a/bfps/cpp/full_code/postprocess.cpp +++ b/bfps/cpp/full_code/postprocess.cpp @@ -22,6 +22,10 @@ int postprocess::main_loop(void) this->work_on_current_iteration(); this->print_simple_timer( "iteration " + std::to_string(this->iteration)); + + this->check_stopping_condition(); + if (this->stop_code_now) + break; } return EXIT_SUCCESS; } -- GitLab