[cig-commits] [commit] master: do not output timings if throwing exception (8e609ba)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed May 21 04:37:49 PDT 2014


Repository : https://github.com/geodynamics/aspect

On branch  : master
Link       : https://github.com/geodynamics/aspect/compare/1f4ab820b0191d9a4058b78c91b629bc94c437ec...1baa8f4d732ef72f666a3a03d0a9052a0dcd7564

>---------------------------------------------------------------

commit 8e609bae8e685ca9a95a62fe8c6d428deb0171e8
Author: Timo Heister <timo.heister at gmail.com>
Date:   Wed May 21 00:40:10 2014 -0400

    do not output timings if throwing exception
    
    TimerOutput now no longer produces useless output if an exception is
    thrown.


>---------------------------------------------------------------

8e609bae8e685ca9a95a62fe8c6d428deb0171e8
 source/simulator/core.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/source/simulator/core.cc b/source/simulator/core.cc
index 8a27b31..c7ddb10 100644
--- a/source/simulator/core.cc
+++ b/source/simulator/core.cc
@@ -92,7 +92,7 @@ namespace aspect
             this_mpi_process(mpi_communicator)
             == 0)),
 
-    computing_timer (pcout, TimerOutput::summary,
+    computing_timer (pcout, TimerOutput::never,
                      TimerOutput::wall_times),
 
     geometry_model (GeometryModel::create_geometry_model<dim>(prm)),
@@ -1616,6 +1616,10 @@ namespace aspect
           break;
       }
     while (true);
+
+    // we disable automatic summary printing so that it won't happen when
+    // throwing an exception. Therefore, we have to do this manually here:
+    computing_timer.print_summary ();
   }
 }
 



More information about the CIG-COMMITS mailing list