diff --git a/framework/include/actions/Action.h b/framework/include/actions/Action.h index 1c4c799e3800..669334e149d9 100644 --- a/framework/include/actions/Action.h +++ b/framework/include/actions/Action.h @@ -243,9 +243,6 @@ class Action : public ConsoleStreamInterface, /// Convenience reference to a problem this action works on std::shared_ptr & _problem; - - /// Timers - PerfID _act_timer; }; template diff --git a/framework/include/actions/CouplingFunctorCheckAction.h b/framework/include/actions/CouplingFunctorCheckAction.h index f0d0f466f119..24abca4f93dc 100644 --- a/framework/include/actions/CouplingFunctorCheckAction.h +++ b/framework/include/actions/CouplingFunctorCheckAction.h @@ -29,8 +29,4 @@ class CouplingFunctorCheckAction : public Action protected: void act() override; - - const PerfID _reinitializing_vectors_because_of_algebraic_ghosting_timer; - const PerfID _adding_relationship_managers_timer; - const PerfID _reiniting_nonlinear_system; }; diff --git a/framework/include/actions/SetupMeshAction.h b/framework/include/actions/SetupMeshAction.h index 567e31037ddf..8ee22002b219 100644 --- a/framework/include/actions/SetupMeshAction.h +++ b/framework/include/actions/SetupMeshAction.h @@ -35,9 +35,4 @@ class SetupMeshAction : public MooseObjectAction * @return The new type of object that will be built. */ std::string modifyParamsForUseSplit(InputParameters & moose_object_params) const; - - /// Timers - PerfID _setup_mesh_timer; - PerfID _set_mesh_base_timer; - PerfID _init_mesh_timer; }; diff --git a/framework/include/mesh/FileMesh.h b/framework/include/mesh/FileMesh.h index c678b52e32f7..5f6c66926d0c 100644 --- a/framework/include/mesh/FileMesh.h +++ b/framework/include/mesh/FileMesh.h @@ -47,8 +47,4 @@ class FileMesh : public MooseMesh /// The requested dimension of the mesh. For some file meshes, this is not required may be implied /// from the element type(s). const unsigned int _dim; - - /// Timers - const PerfID _read_mesh_timer; }; - diff --git a/framework/include/multiapps/MultiApp.h b/framework/include/multiapps/MultiApp.h index 47ee6ee91b11..474a8629baad 100644 --- a/framework/include/multiapps/MultiApp.h +++ b/framework/include/multiapps/MultiApp.h @@ -440,12 +440,6 @@ class MultiApp : public MooseObject, /// The solution from the end of the previous solve, this is cloned from the Nonlinear solution during restore std::vector>> _end_solutions; - -private: - PerfID _perf_backup; - PerfID _perf_restore; - PerfID _perf_init; - PerfID _perf_reset_app; }; template <> diff --git a/framework/include/preconditioners/PhysicsBasedPreconditioner.h b/framework/include/preconditioners/PhysicsBasedPreconditioner.h index e21a74d33524..acf960411272 100644 --- a/framework/include/preconditioners/PhysicsBasedPreconditioner.h +++ b/framework/include/preconditioners/PhysicsBasedPreconditioner.h @@ -95,9 +95,4 @@ class PhysicsBasedPreconditioner : public MoosePreconditioner, public Preconditi * to keep looking this thing up through it's name. */ std::vector *>> _off_diag_mats; - - /// Timers - PerfID _init_timer; - PerfID _apply_timer; }; - diff --git a/framework/include/restart/RestartableDataIO.h b/framework/include/restart/RestartableDataIO.h index 7c67ed865afc..3281cd8e5624 100644 --- a/framework/include/restart/RestartableDataIO.h +++ b/framework/include/restart/RestartableDataIO.h @@ -136,10 +136,6 @@ class RestartableDataIO : public PerfGraphInterface /// A vector of file handles, one per thread std::vector> _in_file_handles; - /// Timers - const PerfID _restart_es_timer; - const PerfID _restart_data_timer; - static constexpr auto RESTARTABLE_DATA_EXT = ".rd"; static constexpr auto ES_BINARY_EXT = ".xdr"; static constexpr auto ES_ASCII_EXT = ".xda"; diff --git a/framework/include/samplers/Sampler.h b/framework/include/samplers/Sampler.h index 31d36c42feea..03eec54af40f 100644 --- a/framework/include/samplers/Sampler.h +++ b/framework/include/samplers/Sampler.h @@ -271,15 +271,4 @@ class Sampler : public MooseObject, /// Max number of entries for matrix returned by getNextLocalRow const dof_id_type _limit_get_next_local_row; - - ///@{ - /// PrefGraph timers - const PerfID _perf_get_global_samples; - const PerfID _perf_get_local_samples; - const PerfID _perf_get_next_local_row; - const PerfID _perf_sample_row; - const PerfID _perf_local_sample_matrix; - const PerfID _perf_sample_matrix; - const PerfID _perf_advance_generator; - ///@} }; diff --git a/framework/include/systems/NonlinearSystem.h b/framework/include/systems/NonlinearSystem.h index c7a7fe51b419..b098bd73e845 100644 --- a/framework/include/systems/NonlinearSystem.h +++ b/framework/include/systems/NonlinearSystem.h @@ -119,7 +119,4 @@ class NonlinearSystem : public NonlinearSystemBase /// The number of scaling groups std::size_t _num_scaling_groups; - - /// Performance Timers - const PerfID _initial_residual_timer; }; diff --git a/framework/include/utils/RankMap.h b/framework/include/utils/RankMap.h index 6c38daad2a6f..e5fb0d582b94 100644 --- a/framework/include/utils/RankMap.h +++ b/framework/include/utils/RankMap.h @@ -56,8 +56,6 @@ class RankMap : ParallelObject, PerfGraphInterface const std::vector & rankHardwareIds() const { return _rank_to_hardware_id; } protected: - const PerfID _construct_timer; - /// Map of hardware_id -> ranks on that node std::unordered_map> _hardware_id_to_ranks; diff --git a/framework/src/actions/Action.C b/framework/src/actions/Action.C index 05effdc600d3..72c088d2eb7c 100644 --- a/framework/src/actions/Action.C +++ b/framework/src/actions/Action.C @@ -81,15 +81,14 @@ Action::Action(InputParameters parameters) _current_task(_awh.getCurrentTaskName()), _mesh(_awh.mesh()), _displaced_mesh(_awh.displacedMesh()), - _problem(_awh.problemBase()), - _act_timer(registerTimedSection("act", 4)) + _problem(_awh.problemBase()) { } void Action::timedAct() { - TIME_SECTION(_act_timer); + TIME_SECTION("act", 4); act(); } diff --git a/framework/src/actions/CouplingFunctorCheckAction.C b/framework/src/actions/CouplingFunctorCheckAction.C index 0fbb0deffa4b..db37102c84f9 100644 --- a/framework/src/actions/CouplingFunctorCheckAction.C +++ b/framework/src/actions/CouplingFunctorCheckAction.C @@ -30,10 +30,7 @@ CouplingFunctorCheckAction::validParams() } CouplingFunctorCheckAction::CouplingFunctorCheckAction(InputParameters parameters) - : Action(parameters), - _reinitializing_vectors_because_of_algebraic_ghosting_timer(registerTimedSection("reinitVectorsAlgebraic", 5, "Reiniting Vectors Because of Algebraic Ghosting")), - _adding_relationship_managers_timer(registerTimedSection("addRelationshipManagers", 5, "Adding Relationship Managers")), - _reiniting_nonlinear_system(registerTimedSection("nlSystemReinitCoupling", 5, "Reinitializing Nonlinear System Due To Coupling Functors")) + : Action(parameters) { _name = "coupling_functor_check"; } @@ -99,7 +96,8 @@ CouplingFunctorCheckAction::act() // If you didn't do the ghosting with your own actions, you're going to pay the price now. // We have to reinit all the DofMaps so we can be sure that we've ghosted the necessary // vector entries - TIME_SECTION(_reinitializing_vectors_because_of_algebraic_ghosting_timer); + TIME_SECTION( + "reinitVectorsAlgebraic", 5, "Reiniting Vectors Because of Algebraic Ghosting"); // Reassign the size because we're going to call addRelationshipManagers again for COUPLING size = _app.relationshipManagers().size(); @@ -122,7 +120,7 @@ CouplingFunctorCheckAction::act() addRelationshipManagers(coupling, RelationshipManager::oneLayerGhosting(coupling)); if (size != _app.relationshipManagers().size()) { - TIME_SECTION(_adding_relationship_managers_timer); + TIME_SECTION("addRelationshipManagers", 5, "Adding Relationship Managers")); _app.attachRelationshipManagers(coupling); @@ -135,7 +133,9 @@ CouplingFunctorCheckAction::act() // DofMap::reinit, hence we have to call GhostingFunctor::dofmap_reinit ourselves in the // call above { - TIME_SECTION(_reiniting_nonlinear_system); + TIME_SECTION("nlSystemReinitCoupling", + 5, + "Reinitializing Nonlinear System Due To Coupling Functors"); nl.system().reinit(); } diff --git a/framework/src/actions/SetupMeshAction.C b/framework/src/actions/SetupMeshAction.C index 267514c2779a..a290f6c61a3e 100644 --- a/framework/src/actions/SetupMeshAction.C +++ b/framework/src/actions/SetupMeshAction.C @@ -97,12 +97,7 @@ SetupMeshAction::validParams() return params; } -SetupMeshAction::SetupMeshAction(InputParameters params) : MooseObjectAction(params), - _setup_mesh_timer(registerTimedSection("SetupMeshAction::act::setup_mesh", 1, "Setting Up Mesh", true)), - _set_mesh_base_timer(registerTimedSection("SetupMeshAction::act::set_mesh_base", 1, "Setting Mesh", true)), - _init_mesh_timer(registerTimedSection("SetupMeshAction::act::set_mesh_base", 1, "Initializing Mesh", true)) - - {} +SetupMeshAction::SetupMeshAction(InputParameters params) : MooseObjectAction(params) {} void SetupMeshAction::setupMesh(MooseMesh * mesh) @@ -231,7 +226,7 @@ SetupMeshAction::act() // Create the mesh object and tell it to build itself if (_current_task == "setup_mesh") { - TIME_SECTION(_setup_mesh_timer); + TIME_SECTION("SetupMeshAction::act::setup_mesh", 1, "Setting Up Mesh", true); if (_app.masterMesh()) _mesh = _app.masterMesh()->safeClone(); @@ -284,7 +279,7 @@ SetupMeshAction::act() else if (_current_task == "set_mesh_base") { - TIME_SECTION(_set_mesh_base_timer); + TIME_SECTION("SetupMeshAction::act::set_mesh_base", 1, "Setting Mesh", true); if (!_app.masterMesh() && !_mesh->hasMeshBase()) { @@ -303,7 +298,7 @@ SetupMeshAction::act() else if (_current_task == "init_mesh") { - TIME_SECTION(_init_mesh_timer); + TIME_SECTION("SetupMeshAction::act::set_mesh_base", 1, "Initializing Mesh", true); if (_app.masterMesh()) { diff --git a/framework/src/actions/SetupMeshCompleteAction.C b/framework/src/actions/SetupMeshCompleteAction.C index 41d393452420..054f66337c6d 100644 --- a/framework/src/actions/SetupMeshCompleteAction.C +++ b/framework/src/actions/SetupMeshCompleteAction.C @@ -35,10 +35,7 @@ SetupMeshCompleteAction::validParams() return params; } -SetupMeshCompleteAction::SetupMeshCompleteAction(InputParameters params) - : Action(params), _uniform_refine_timer(registerTimedSection("uniformRefine", 2, "Uniformly Refining")) -{ -} +SetupMeshCompleteAction::SetupMeshCompleteAction(InputParameters params) : Action(params) {} bool SetupMeshCompleteAction::completeSetup(MooseMesh * mesh) @@ -88,7 +85,7 @@ SetupMeshCompleteAction::act() */ if (_app.setFileRestart() == false && _app.isRecovering() == false) { - TIME_SECTION(_uniform_refine_timer); + TIME_SECTION("uniformRefine", 2, "Uniformly Refining"); if (_mesh->uniformRefineLevel()) { @@ -109,6 +106,8 @@ SetupMeshCompleteAction::act() } else if (_current_task == "delete_remote_elements_post_equation_systems_init") { + TIME_SECTION("deleteRemoteElems", 2, "Deleting Remote Elements"); + // We currently only trigger the needsRemoteDeletion flag if somebody has requested a late // geometric ghosting functor and/or we have a displaced mesh. In other words, we almost never // trigger this. @@ -121,6 +120,8 @@ SetupMeshCompleteAction::act() } else { + TIME_SECTION("completeSetup", 2, "Completing Mesh Setup"); + // Prepare the mesh (may occur multiple times) completeSetup(_mesh.get()); diff --git a/framework/src/mesh/FileMesh.C b/framework/src/mesh/FileMesh.C index 274d82172d46..459e45bb4cdf 100644 --- a/framework/src/mesh/FileMesh.C +++ b/framework/src/mesh/FileMesh.C @@ -33,16 +33,12 @@ FileMesh::validParams() FileMesh::FileMesh(const InputParameters & parameters) : MooseMesh(parameters), _file_name(getParam("file")), - _dim(getParam("dim")), - _read_mesh_timer(registerTimedSection("readMesh", 2)) + _dim(getParam("dim")) { } FileMesh::FileMesh(const FileMesh & other_mesh) - : MooseMesh(other_mesh), - _file_name(other_mesh._file_name), - _dim(other_mesh._dim), - _read_mesh_timer(other_mesh._read_mesh_timer) + : MooseMesh(other_mesh), _file_name(other_mesh._file_name), _dim(other_mesh._dim) { } @@ -57,7 +53,7 @@ FileMesh::safeClone() const void FileMesh::buildMesh() { - TIME_SECTION(_read_mesh_timer); + TIME_SECTION("buildMesh", 2, "Reading Mesh"); getMesh().set_mesh_dimension(getParam("dim")); diff --git a/framework/src/multiapps/MultiApp.C b/framework/src/multiapps/MultiApp.C index 9c9b3101fa33..7c95a35a4e0a 100644 --- a/framework/src/multiapps/MultiApp.C +++ b/framework/src/multiapps/MultiApp.C @@ -213,18 +213,14 @@ MultiApp::MultiApp(const InputParameters & parameters) _has_an_app(true), _backups(declareRestartableDataWithContext("backups", this)), _cli_args(getParam>("cli_args")), - _keep_solution_during_restore(getParam("keep_solution_during_restore")), - _perf_backup(registerTimedSection("backup", 3)), - _perf_restore(registerTimedSection("restore", 3)), - _perf_init(registerTimedSection("init", 3)), - _perf_reset_app(registerTimedSection("resetApp", 3)) + _keep_solution_during_restore(getParam("keep_solution_during_restore")) { } void MultiApp::init(unsigned int num) { - TIME_SECTION(_perf_init); + TIME_SECTION("init", 3, "Initializing MultiApp"); _total_num_apps = num; buildComm(); @@ -423,18 +419,15 @@ MultiApp::postExecute() void MultiApp::backup() { - TIME_SECTION(_perf_backup); - - _console << "Beginning backing up MultiApp " << name() << std::endl; + TIME_SECTION("backup", 3, "Backing Up MultiApp"); for (unsigned int i = 0; i < _my_num_apps; i++) _backups[i] = _apps[i]->backup(); - _console << "Finished backing up MultiApp " << name() << std::endl; } void MultiApp::restore() { - TIME_SECTION(_perf_restore); + TIME_SECTION("restore", 3, "Restoring MultiApp"); // Must be restarting / recovering so hold off on restoring // Instead - the restore will happen in createApp() @@ -461,10 +454,8 @@ MultiApp::restore() } } - _console << "Begining restoring MultiApp " << name() << std::endl; for (unsigned int i = 0; i < _my_num_apps; i++) _apps[i]->restore(_backups[i]); - _console << "Finished restoring MultiApp " << name() << std::endl; // Now copy the latest solutions back for each subapp if (_keep_solution_during_restore) @@ -623,7 +614,7 @@ MultiApp::localApp(unsigned int local_app) void MultiApp::resetApp(unsigned int global_app, Real time) { - TIME_SECTION(_perf_reset_app); + TIME_SECTION("resetApp", 3, "Resetting MultiApp"); Moose::ScopedCommSwapper swapper(_my_comm); diff --git a/framework/src/preconditioners/PhysicsBasedPreconditioner.C b/framework/src/preconditioners/PhysicsBasedPreconditioner.C index 59f6bebe586e..02148ced3a19 100644 --- a/framework/src/preconditioners/PhysicsBasedPreconditioner.C +++ b/framework/src/preconditioners/PhysicsBasedPreconditioner.C @@ -59,9 +59,7 @@ PhysicsBasedPreconditioner::validParams() PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(const InputParameters & params) : MoosePreconditioner(params), Preconditioner(MoosePreconditioner::_communicator), - _nl(_fe_problem.getNonlinearSystemBase()), - _init_timer(registerTimedSection("init", 2)), - _apply_timer(registerTimedSection("apply", 1)) + _nl(_fe_problem.getNonlinearSystemBase()) { unsigned int num_systems = _nl.system().n_vars(); _systems.resize(num_systems); @@ -176,7 +174,7 @@ PhysicsBasedPreconditioner::addSystem(unsigned int var, void PhysicsBasedPreconditioner::init() { - TIME_SECTION(_init_timer); + TIME_SECTION("init", 2, "Initializing PhysicsBasedPreconditioner"); // Tell libMesh that this is initialized! _is_initialized = true; @@ -248,7 +246,7 @@ PhysicsBasedPreconditioner::setup() void PhysicsBasedPreconditioner::apply(const NumericVector & x, NumericVector & y) { - TIME_SECTION(_apply_timer); + TIME_SECTION("apply", 1, "Applying PhysicsBasedPreconditioner"); const unsigned int num_systems = _systems.size(); diff --git a/framework/src/problems/DisplacedProblem.C b/framework/src/problems/DisplacedProblem.C index 9e91e2c2004b..fdfee8955bdd 100644 --- a/framework/src/problems/DisplacedProblem.C +++ b/framework/src/problems/DisplacedProblem.C @@ -53,11 +53,7 @@ DisplacedProblem::DisplacedProblem(const InputParameters & parameters) _mproblem.getAuxiliarySystem(), _mproblem.getAuxiliarySystem().name(), Moose::VAR_AUXILIARY), - _geometric_search_data(*this, _mesh), - _eq_init_timer(registerTimedSection("eq::init", 2, "Initializing Displaced Equation System")), - _update_mesh_timer(registerTimedSection("updateMesh", 3, "Updating Displaced Mesh")), - _sync_solutions_timer(registerTimedSection("syncSolutions", 5, "Syncing Displaced Solutions")), - _update_geometric_search_timer(registerTimedSection("updateGeometricSearch", 3, "Updating Displaced GeometricSearch")) + _geometric_search_data(*this, _mesh) { // TODO: Move newAssemblyArray further up to SubProblem so that we can use it here @@ -128,7 +124,7 @@ DisplacedProblem::init() _displaced_aux.init(); { - TIME_SECTION(_eq_init_timer); + TIME_SECTION(registerTimedSection("eq::init", 2, "Initializing Displaced Equation System")); _eq.init(); } @@ -157,7 +153,7 @@ DisplacedProblem::restoreOldSolutions() void DisplacedProblem::syncSolutions() { - TIME_SECTION(_sync_solutions_timer); + TIME_SECTION("syncSolutions", 5, "Syncing Displaced Solutions"); (*_displaced_nl.sys().solution) = *_mproblem.getNonlinearSystemBase().currentSolution(); (*_displaced_aux.sys().solution) = *_mproblem.getAuxiliarySystem().currentSolution(); @@ -169,7 +165,7 @@ void DisplacedProblem::syncSolutions(const NumericVector & soln, const NumericVector & aux_soln) { - TIME_SECTION(_sync_solutions_timer); + TIME_SECTION("syncSolutions", 5, "Syncing Displaced Solutions"); (*_displaced_nl.sys().solution) = soln; (*_displaced_aux.sys().solution) = aux_soln; @@ -180,7 +176,7 @@ DisplacedProblem::syncSolutions(const NumericVector & soln, void DisplacedProblem::updateMesh(bool mesh_changing) { - TIME_SECTION(_update_mesh_timer); + TIME_SECTION("updateMesh", 3, "Updating Displaced Mesh"); if (mesh_changing) { @@ -251,7 +247,7 @@ void DisplacedProblem::updateMesh(const NumericVector & soln, const NumericVector & aux_soln) { - TIME_SECTION(_update_mesh_timer); + TIME_SECTION("updateMesh", 3, "Updating Mesh"); syncSolutions(soln, aux_soln); @@ -903,7 +899,7 @@ DisplacedProblem::prepareNeighborShapes(unsigned int var, THREAD_ID tid) void DisplacedProblem::updateGeomSearch(GeometricSearchData::GeometricSearchType type) { - TIME_SECTION(_update_geometric_search_timer); + TIME_SECTION("updateGeometricSearch", 3, "Updating Displaced GeometricSearch"); _geometric_search_data.update(type); } diff --git a/framework/src/restart/RestartableDataIO.C b/framework/src/restart/RestartableDataIO.C index ab78d085d6d2..0f074379747c 100644 --- a/framework/src/restart/RestartableDataIO.C +++ b/framework/src/restart/RestartableDataIO.C @@ -29,10 +29,7 @@ RestartableDataIO::RestartableDataIO(MooseApp & moose_app, FEProblemBase * fe_pr _moose_app(moose_app), _fe_problem_ptr(fe_problem_ptr), _is_header_read(false), - _use_binary_ext(true), - _restart_es_timer(registerTimedSection("restartEquationSystems", 3)), - _restart_data_timer(registerTimedSection("readRestartableData", 3)) - + _use_binary_ext(true) { } @@ -302,7 +299,7 @@ void RestartableDataIO::readRestartableData(const RestartableDataMaps & restartable_datas, const DataNames & recoverable_data) { - TIME_SECTION(_restart_data_timer); + TIME_SECTION("readRestartableData", 3, "Reading RestartableData"); if (!_is_header_read) mooseError("In RestartableDataIO: Need to call readRestartableDataHeader() before calling " @@ -398,7 +395,7 @@ RestartableDataIO::useAsciiExtension() void RestartableDataIO::restartEquationSystemsObject() { - TIME_SECTION(_restart_es_timer); + TIME_SECTION("restartEquationSystems", 3, "Restarting EquationSystems"); if (!_is_header_read) mooseError("In RestartableDataIO: Need to call readRestartableDataHeader() before calling " diff --git a/framework/src/samplers/Sampler.C b/framework/src/samplers/Sampler.C index a71a31e817f8..2889ac897378 100644 --- a/framework/src/samplers/Sampler.C +++ b/framework/src/samplers/Sampler.C @@ -67,13 +67,6 @@ Sampler::Sampler(const InputParameters & parameters) _limit_get_global_samples(getParam("limit_get_global_samples")), _limit_get_local_samples(getParam("limit_get_local_samples")), _limit_get_next_local_row(getParam("limit_get_next_local_row")), - _perf_get_global_samples(registerTimedSection("getGlobalSamples", 1)), - _perf_get_local_samples(registerTimedSection("getLocalSamples", 1)), - _perf_get_next_local_row(registerTimedSection("getNextLocalRow", 1)), - _perf_sample_row(registerTimedSection("computeSampleRow", 2)), - _perf_local_sample_matrix(registerTimedSection("computeLocalSampleMatrix", 2)), - _perf_sample_matrix(registerTimedSection("computeSampleMatrix", 2)), - _perf_advance_generator(registerTimedSection("advanceGenerators", 2)) { } @@ -165,7 +158,7 @@ Sampler::execute() DenseMatrix Sampler::getGlobalSamples() { - TIME_SECTION(_perf_get_global_samples); + TIME_SECTION("getGlobalSamples", 1, "Retrieving Global Samples"); if (_n_rows * _n_cols > _limit_get_global_samples) paramError("limit_get_global_samples", @@ -187,7 +180,7 @@ Sampler::getGlobalSamples() DenseMatrix Sampler::getLocalSamples() { - TIME_SECTION(_perf_get_local_samples); + TIME_SECTION("getLocalSamples", 1, "Retrieving Local Samples"); if (_n_local_rows * _n_cols > _limit_get_local_samples) paramError("limit_get_local_samples", @@ -209,7 +202,7 @@ Sampler::getLocalSamples() std::vector Sampler::getNextLocalRow() { - TIME_SECTION(_perf_get_next_local_row); + TIME_SECTION("getNextLocalRow", 1, "Getting Next Local Row"); if (_next_local_row_requires_state_restore) { @@ -246,7 +239,7 @@ Sampler::getNextLocalRow() void Sampler::computeSampleMatrix(DenseMatrix & matrix) { - TIME_SECTION(_perf_sample_matrix); + TIME_SECTION("computeSampleMatrix", 2, "Computing Sample Matrix"); for (dof_id_type i = 0; i < _n_rows; ++i) { @@ -260,7 +253,7 @@ Sampler::computeSampleMatrix(DenseMatrix & matrix) void Sampler::computeLocalSampleMatrix(DenseMatrix & matrix) { - TIME_SECTION(_perf_local_sample_matrix); + TIME_SECTION("computeLocalSampleMatrix", 2, "Computing Local Sample Matrix"); advanceGenerators(_local_row_begin * _n_cols); for (dof_id_type i = _local_row_begin; i < _local_row_end; ++i) @@ -277,16 +270,15 @@ Sampler::computeLocalSampleMatrix(DenseMatrix & matrix) void Sampler::computeSampleRow(dof_id_type i, std::vector & data) { - TIME_SECTION(_perf_sample_row); + TIME_SECTION("computeSampleRow", 2, "Computing Sample Row"); for (dof_id_type j = 0; j < _n_cols; ++j) data[j] = computeSample(i, j); } -void -Sampler::advanceGenerators(dof_id_type count) +void Sampler::advanceGenerators(dof_id_type) { - TIME_SECTION(_perf_advance_generator); + TIME_SECTION("advanceGenerators", 2, "Advancing Generators"); for (dof_id_type i = 0; i < count; ++i) for (std::size_t j = 0; j < _generator.size(); ++j) diff --git a/framework/src/systems/NonlinearSystem.C b/framework/src/systems/NonlinearSystem.C index 4eb203b6e862..6b3337403c6a 100644 --- a/framework/src/systems/NonlinearSystem.C +++ b/framework/src/systems/NonlinearSystem.C @@ -96,9 +96,7 @@ NonlinearSystem::NonlinearSystem(FEProblemBase & fe_problem, const std::string & _nl_residual_functor(_fe_problem), _fd_residual_functor(_fe_problem), _use_coloring_finite_difference(false), - _auto_scaling_initd(false), - _initial_residual_timer( - registerTimedSection("nlInitialResidual", 3, "Computing Initial Residual")) + _auto_scaling_initd(false) { nonlinearSolver()->residual_object = &_nl_residual_functor; nonlinearSolver()->jacobian = Moose::compute_jacobian; @@ -172,7 +170,7 @@ NonlinearSystem::solve() if (_fe_problem.solverParams()._type != Moose::ST_LINEAR) { - TIME_SECTION(_initial_residual_timer); + TIME_SECTION("nlInitialResidual", 3, "Computing Initial Residual"); // Calculate the initial residual for use in the convergence criterion. _computing_initial_residual = true; _fe_problem.computeResidualSys(_transient_sys, *_current_solution, *_transient_sys.rhs); diff --git a/framework/src/utils/RankMap.C b/framework/src/utils/RankMap.C index be6655feb317..244ac9a54f5e 100644 --- a/framework/src/utils/RankMap.C +++ b/framework/src/utils/RankMap.C @@ -14,11 +14,9 @@ #include "libmesh/parallel.h" RankMap::RankMap(const Parallel::Communicator & comm, PerfGraph & perf_graph) - : ParallelObject(comm), - PerfGraphInterface(perf_graph, "RankMap"), - _construct_timer(registerTimedSection("construct", 2)) + : ParallelObject(comm), PerfGraphInterface(perf_graph, "RankMap") { - TIME_SECTION(_construct_timer); + TIME_SECTION("construct", 2, "Constructing RankMap"); auto num_procs = n_processors(); _rank_to_hardware_id.resize(num_procs);