From: Timo Heister Date: Wed, 20 Mar 2013 15:13:13 +0000 (+0000) Subject: step-42: update timing stuff X-Git-Tag: v8.0.0~942 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fc996430ef9326dc71fbf2286d6ad78c7830d72;p=dealii.git step-42: update timing stuff git-svn-id: https://svn.dealii.org/trunk@28954 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-42/step-42.cc b/deal.II/examples/step-42/step-42.cc index 25f86d3827..1a77c4e03b 100644 --- a/deal.II/examples/step-42/step-42.cc +++ b/deal.II/examples/step-42/step-42.cc @@ -605,7 +605,8 @@ namespace Step42 gamma (0.01), e_modul (2.0e+5), nu (0.3), - computing_timer (pcout, + computing_timer (MPI_COMM_WORLD, + pcout, TimerOutput::summary, TimerOutput::wall_times) { @@ -661,12 +662,14 @@ namespace Step42 { // setup dofs { + computing_timer.enter_section("Setup: distribute DoFs"); dof_handler.distribute_dofs (fe); locally_owned_dofs = dof_handler.locally_owned_dofs (); locally_relevant_dofs.clear(); DoFTools::extract_locally_relevant_dofs (dof_handler, locally_relevant_dofs); + computing_timer.exit_section("Setup: distribute DoFs"); } // setup hanging nodes and dirichlet constraints @@ -703,6 +706,7 @@ namespace Step42 // setup sparsity pattern { + computing_timer.enter_section("Setup: matrix"); TrilinosWrappers::SparsityPattern sp (locally_owned_dofs, mpi_communicator); @@ -724,6 +728,7 @@ namespace Step42 number_iterations = 0; diag_mass_matrix_vector.compress (VectorOperation::insert); + computing_timer.exit_section("Setup: matrix"); } } @@ -1190,7 +1195,7 @@ namespace Step42 template void PlasticityContactProblem::solve () { - computing_timer.enter_section ("Solving and Preconditioning"); + computing_timer.enter_section ("Solve"); TrilinosWrappers::MPI::Vector distributed_solution (system_rhs_newton); distributed_solution = solution; @@ -1200,13 +1205,13 @@ namespace Step42 distributed_solution.compress(VectorOperation::insert); system_rhs_newton.compress(VectorOperation::insert); - computing_timer.enter_section("Preconditioning"); + computing_timer.enter_section("Solve: setup preconditioner"); preconditioner_u.initialize (system_matrix_newton, additional_data); - computing_timer.exit_section("Preconditioning"); + computing_timer.exit_section("Solve: setup preconditioner"); - computing_timer.enter_section("Solving"); + computing_timer.enter_section("Solve: iterate"); PrimitiveVectorMemory mem; TrilinosWrappers::MPI::Vector tmp (system_rhs_newton); @@ -1226,7 +1231,7 @@ namespace Step42 << " FGMRES iterations." << std::endl; - computing_timer.exit_section("Solving"); + computing_timer.exit_section("Solve: iterate"); number_iterations += solver_control.last_step(); @@ -1234,7 +1239,7 @@ namespace Step42 solution = distributed_solution; - computing_timer.exit_section("Solving and Preconditioning"); + computing_timer.exit_section("Solve"); } @@ -1486,7 +1491,7 @@ namespace Step42 const unsigned int n_cycles = 6; for (cycle=0; cycle(dof_handler)); refine_grid (); + computing_timer.exit_section("Setup: refine mesh"); } setup_system (); @@ -1511,7 +1518,7 @@ namespace Step42 solution = distributed_solution; } - computing_timer.exit_section("Mesh refinement and setup system"); + computing_timer.exit_section("Setup"); solve_newton (); @@ -1526,7 +1533,6 @@ namespace Step42 computing_timer.exit_section("Graphical output"); computing_timer.print_summary(); - computing_timer.disable_output(); } } }