Nektar++
|
#include <Timer.h>
Public Types | |
using | Clock = std::chrono::steady_clock |
using | CounterType = Clock::time_point |
using | Seconds = std::chrono::duration< NekDouble > |
Public Member Functions | |
Timer ()=default | |
~Timer ()=default | |
Timer (const Timer &rhs)=delete | |
Timer & | operator= (const Timer &rhs)=delete |
void | Start () |
void | Stop () |
Seconds | Elapsed () |
void | AccumulateRegion (std::string, int iolevel=0) |
Accumulate elapsed time for a region. More... | |
NekDouble | TimePerTest (unsigned int n) |
Returns amount of seconds per iteration in a test with n iterations. More... | |
Static Public Member Functions | |
static void | PrintElapsedRegions () |
Print elapsed time and call count for each region with default serial communicator. More... | |
static void | PrintElapsedRegions (LibUtilities::CommSharedPtr comm, std::ostream &o=std::cout, int iolevel=0) |
Print elapsed time and call count for each region. More... | |
Private Attributes | |
CounterType | m_start = CounterType() |
CounterType | m_end = CounterType() |
bool | m_isactive = false |
Static Private Attributes | |
static std::map< std::string, std::tuple< Seconds, size_t, int > > | m_elapsedRegion {} |
using Nektar::LibUtilities::Timer::Clock = std::chrono::steady_clock |
using Nektar::LibUtilities::Timer::CounterType = Clock::time_point |
using Nektar::LibUtilities::Timer::Seconds = std::chrono::duration<NekDouble> |
|
default |
|
default |
|
delete |
void Nektar::LibUtilities::Timer::AccumulateRegion | ( | std::string | region, |
int | iolevel = 0 |
||
) |
Accumulate elapsed time for a region.
Definition at line 70 of file Timer.cpp.
References Elapsed(), and m_elapsedRegion.
Referenced by Nektar::SubSteppingExtrapolate::AddAdvectionPenaltyFlux(), Nektar::CFSImplicit::AddMatNSBlkDiagBnd(), Nektar::SolverUtils::AdvectionWeakDG::AdvectCoeffs(), Nektar::SolverUtils::AdvectionWeakDG::AdvectTraceFlux(), Nektar::PulseWaveSystem::BifurcationRiemann(), Nektar::PyrCollectionTests::BOOST_AUTO_TEST_CASE(), Nektar::TriCollectionTests::BOOST_AUTO_TEST_CASE(), Nektar::CFSImplicit::CalcPreconMatBRJCoeff(), Nektar::SolverUtils::DiffusionIP::CalcTraceNumFlux(), Nektar::LibUtilities::NekLinSysIterGMRES::DoArnoldi(), Nektar::LibUtilities::NekLinSysIterGMRESLoc::DoArnoldi(), Nektar::UnsteadyAdvection::DoOdeRhs(), Nektar::UnsteadyInviscidBurgers::DoOdeRhs(), Nektar::CompressibleFlowSystem::DoOdeRhs(), Nektar::PulseWavePropagation::DoOdeRhs(), Nektar::CFSImplicit::DoOdeRhsCoeff(), Nektar::PulseWaveSystem::EnforceInterfaceConditions(), Nektar::MultiRegions::InterfaceMapDG::ExchangeCoords(), Nektar::PulseWaveSystem::FillDataFromInterfacePoint(), Nektar::PulseWavePropagation::GetFluxVector(), Nektar::SubSteppingExtrapolate::GetSubstepTimeStep(), Nektar::PulseWaveSystem::InterfaceRiemann(), main(), Nektar::PulseWaveSystem::MergingRiemann(), Nektar::PreconCfsBRJ::MinusOffDiag2Rhs(), Nektar::SolverUtils::ALEHelper::MoveMesh(), Nektar::CFSImplicit::NonlinSysEvaluatorCoeff(), Nektar::CFSImplicit::NonlinSysEvaluatorCoeff1D(), Nektar::CFSImplicit::PreconCoeff(), Nektar::PulseWavePropagation::SetPulseWaveBoundaryConditions(), Nektar::SubSteppingExtrapolate::SubStepAdvection(), Nektar::SubSteppingExtrapolate::SubStepExtrapolateField(), Nektar::SubSteppingExtrapolate::SubStepProjection(), Nektar::SubSteppingExtrapolate::v_AccelerationBDF(), Nektar::SolverUtils::AdvectionWeakDG::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::MultiRegions::ExpList::v_BwdTrans(), Nektar::SolverUtils::DiffusionIP::v_Diffuse(), Nektar::SolverUtils::DiffusionIP::v_DiffuseCoeffs(), Nektar::SolverUtils::DiffusionIP::v_DiffuseTraceFlux(), Nektar::SolverUtils::DiffusionIP::v_DiffuseVolumeFlux(), Nektar::PreconCfsBRJ::v_DoPreconCfs(), Nektar::PulseWaveSystem::v_DoSolve(), Nektar::VelocityCorrectionScheme::v_EvaluateAdvection_SetPressureBCs(), Nektar::VCSImplicit::v_EvaluateAdvection_SetPressureBCs(), Nektar::MultiRegions::ExpList::v_IProductWRTBase(), Nektar::MultiRegions::ExpList::v_IProductWRTDerivBase(), Nektar::MultiRegions::ExpList::v_PhysDeriv(), Nektar::MultiRegions::ExpList::v_PhysInterp1DScaled(), Nektar::VelocityCorrectionScheme::v_SolveUnsteadyStokesSystem(), Nektar::SubSteppingExtrapolate::v_SubStepAdvance(), Nektar::SubSteppingExtrapolate::v_SubSteppingTimeIntegration(), Nektar::SubSteppingExtrapolate::v_SubStepSaveFields(), and Nektar::SubSteppingExtrapolate::v_SubStepSetPressureBCs().
Timer::Seconds Nektar::LibUtilities::Timer::Elapsed | ( | ) |
Definition at line 58 of file Timer.cpp.
References ASSERTL0, m_end, m_isactive, and m_start.
Referenced by AccumulateRegion(), Nektar::SolverUtils::DriverParallelInTime::EstimateCommunicationTime(), TimePerTest(), Nektar::SolverUtils::DriverAdaptive::v_Execute(), Nektar::SolverUtils::DriverParareal::v_Execute(), Nektar::SolverUtils::DriverPFASST::v_Execute(), and Nektar::SolverUtils::DriverStandard::v_Execute().
|
static |
Print elapsed time and call count for each region with default serial communicator.
Definition at line 86 of file Timer.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and PrintElapsedRegions().
Referenced by Nektar::TriCollectionTests::BOOST_AUTO_TEST_CASE(), and PrintElapsedRegions().
|
static |
Print elapsed time and call count for each region.
Definition at line 99 of file Timer.cpp.
References CG_Iterations::label, m_elapsedRegion, Nektar::LibUtilities::ReduceMax, Nektar::LibUtilities::ReduceMin, and Nektar::LibUtilities::ReduceSum.
void Nektar::LibUtilities::Timer::Start | ( | ) |
Definition at line 44 of file Timer.cpp.
References ASSERTL0, m_isactive, and m_start.
Referenced by Nektar::SubSteppingExtrapolate::AddAdvectionPenaltyFlux(), Nektar::CFSImplicit::AddMatNSBlkDiagBnd(), Nektar::SolverUtils::AdvectionWeakDG::AdvectCoeffs(), Nektar::SolverUtils::AdvectionWeakDG::AdvectTraceFlux(), Nektar::PulseWaveSystem::BifurcationRiemann(), Nektar::PyrCollectionTests::BOOST_AUTO_TEST_CASE(), Nektar::TriCollectionTests::BOOST_AUTO_TEST_CASE(), Nektar::CFSImplicit::CalcPreconMatBRJCoeff(), Nektar::SolverUtils::DiffusionIP::CalcTraceNumFlux(), Nektar::SolverUtils::DriverSteadyState::ConvergenceHistory(), Nektar::FieldUtils::Field::CreateExp(), Nektar::LibUtilities::NekLinSysIterGMRES::DoArnoldi(), Nektar::LibUtilities::NekLinSysIterGMRESLoc::DoArnoldi(), Nektar::UnsteadyAdvection::DoOdeRhs(), Nektar::UnsteadyInviscidBurgers::DoOdeRhs(), Nektar::CompressibleFlowSystem::DoOdeRhs(), Nektar::PulseWavePropagation::DoOdeRhs(), Nektar::CFSImplicit::DoOdeRhsCoeff(), Nektar::SolverUtils::CouplingCwipi::DumpRawFields(), Nektar::PulseWaveSystem::EnforceInterfaceConditions(), Nektar::SolverUtils::DriverParallelInTime::EstimateCommunicationTime(), Nektar::LibUtilities::Interpreter::ExpressionEvaluator::Evaluate(), Nektar::LibUtilities::Interpreter::ExpressionEvaluator::EvaluateAtPoint(), Nektar::MultiRegions::InterfaceMapDG::ExchangeCoords(), Nektar::SolverUtils::CouplingCwipi::ExtrapolateFields(), Nektar::PulseWaveSystem::FillDataFromInterfacePoint(), Nektar::PulseWavePropagation::GetFluxVector(), Nektar::SubSteppingExtrapolate::GetSubstepTimeStep(), Nektar::PulseWaveSystem::InterfaceRiemann(), main(), Nektar::PulseWaveSystem::MergingRiemann(), Nektar::PreconCfsBRJ::MinusOffDiag2Rhs(), Nektar::SolverUtils::ALEHelper::MoveMesh(), Nektar::CFSImplicit::NonlinSysEvaluatorCoeff(), Nektar::CFSImplicit::NonlinSysEvaluatorCoeff1D(), Nektar::CFSImplicit::PreconCoeff(), Nektar::SolverUtils::CouplingCwipi::ReceiveCwipi(), Nektar::SolverUtils::CouplingCwipi::ReceiveStart(), RunModule(), Nektar::SolverUtils::CouplingCwipi::SendComplete(), Nektar::PulseWavePropagation::SetPulseWaveBoundaryConditions(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::Collections::CollectionOptimisation::SetWithTimings(), Nektar::CoupledLinearNS::SolveSteadyNavierStokes(), Nektar::SubSteppingExtrapolate::SubStepAdvection(), Nektar::SubSteppingExtrapolate::SubStepExtrapolateField(), Nektar::SubSteppingExtrapolate::SubStepProjection(), Nektar::MultiRegions::AssemblyCommDG::Timing(), Nektar::SubSteppingExtrapolate::v_AccelerationBDF(), Nektar::SolverUtils::AdvectionWeakDG::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::MultiRegions::ExpList::v_BwdTrans(), Nektar::SolverUtils::DiffusionIP::v_Diffuse(), Nektar::SolverUtils::DiffusionIP::v_DiffuseCoeffs(), Nektar::SolverUtils::DiffusionIP::v_DiffuseTraceFlux(), Nektar::SolverUtils::DiffusionIP::v_DiffuseVolumeFlux(), Nektar::PreconCfsBRJ::v_DoPreconCfs(), Nektar::SolverUtils::UnsteadySystem::v_DoSolve(), Nektar::MMFAdvection::v_DoSolve(), Nektar::MMFMaxwell::v_DoSolve(), Nektar::PulseWaveSystem::v_DoSolve(), Nektar::MMFSWE::v_DoSolve(), Nektar::CoupledLinearNS::v_DoSolve(), Nektar::VelocityCorrectionScheme::v_EvaluateAdvection_SetPressureBCs(), Nektar::VCSImplicit::v_EvaluateAdvection_SetPressureBCs(), Nektar::SolverUtils::DriverAdaptive::v_Execute(), Nektar::SolverUtils::DriverParareal::v_Execute(), Nektar::SolverUtils::DriverPFASST::v_Execute(), Nektar::SolverUtils::DriverStandard::v_Execute(), Nektar::SolverUtils::DriverSteadyState::v_Execute(), Nektar::MultiRegions::ExpList::v_IProductWRTBase(), Nektar::MultiRegions::ExpList::v_IProductWRTDerivBase(), Nektar::SpatialDomains::MeshGraphIOHDF5::v_PartitionMesh(), Nektar::MultiRegions::ExpList::v_PhysDeriv(), Nektar::MultiRegions::ExpList::v_PhysInterp1DScaled(), Nektar::Dummy::v_PostIntegrate(), Nektar::FieldUtils::InputXml::v_Process(), Nektar::FieldUtils::ProcessCreateExp::v_Process(), Nektar::FieldUtils::ProcessIsoContour::v_Process(), Nektar::SolverUtils::CouplingCwipi::v_Send(), Nektar::VelocityCorrectionScheme::v_SolveUnsteadyStokesSystem(), Nektar::SubSteppingExtrapolate::v_SubStepAdvance(), Nektar::SubSteppingExtrapolate::v_SubSteppingTimeIntegration(), Nektar::SubSteppingExtrapolate::v_SubStepSaveFields(), and Nektar::SubSteppingExtrapolate::v_SubStepSetPressureBCs().
void Nektar::LibUtilities::Timer::Stop | ( | ) |
Definition at line 51 of file Timer.cpp.
References ASSERTL0, m_end, and m_isactive.
Referenced by Nektar::SubSteppingExtrapolate::AddAdvectionPenaltyFlux(), Nektar::CFSImplicit::AddMatNSBlkDiagBnd(), Nektar::SolverUtils::AdvectionWeakDG::AdvectCoeffs(), Nektar::SolverUtils::AdvectionWeakDG::AdvectTraceFlux(), Nektar::PulseWaveSystem::BifurcationRiemann(), Nektar::PyrCollectionTests::BOOST_AUTO_TEST_CASE(), Nektar::TriCollectionTests::BOOST_AUTO_TEST_CASE(), Nektar::CFSImplicit::CalcPreconMatBRJCoeff(), Nektar::SolverUtils::DiffusionIP::CalcTraceNumFlux(), Nektar::SolverUtils::DriverSteadyState::ConvergenceHistory(), Nektar::FieldUtils::Field::CreateExp(), Nektar::LibUtilities::NekLinSysIterGMRES::DoArnoldi(), Nektar::LibUtilities::NekLinSysIterGMRESLoc::DoArnoldi(), Nektar::UnsteadyAdvection::DoOdeRhs(), Nektar::UnsteadyInviscidBurgers::DoOdeRhs(), Nektar::CompressibleFlowSystem::DoOdeRhs(), Nektar::PulseWavePropagation::DoOdeRhs(), Nektar::CFSImplicit::DoOdeRhsCoeff(), Nektar::SolverUtils::CouplingCwipi::DumpRawFields(), Nektar::PulseWaveSystem::EnforceInterfaceConditions(), Nektar::SolverUtils::DriverParallelInTime::EstimateCommunicationTime(), Nektar::LibUtilities::Interpreter::ExpressionEvaluator::Evaluate(), Nektar::LibUtilities::Interpreter::ExpressionEvaluator::EvaluateAtPoint(), Nektar::MultiRegions::InterfaceMapDG::ExchangeCoords(), Nektar::SolverUtils::CouplingCwipi::ExtrapolateFields(), Nektar::PulseWaveSystem::FillDataFromInterfacePoint(), Nektar::PulseWavePropagation::GetFluxVector(), Nektar::SubSteppingExtrapolate::GetSubstepTimeStep(), Nektar::PulseWaveSystem::InterfaceRiemann(), main(), Nektar::PulseWaveSystem::MergingRiemann(), Nektar::PreconCfsBRJ::MinusOffDiag2Rhs(), Nektar::SolverUtils::ALEHelper::MoveMesh(), Nektar::CFSImplicit::NonlinSysEvaluatorCoeff(), Nektar::CFSImplicit::NonlinSysEvaluatorCoeff1D(), Nektar::CFSImplicit::PreconCoeff(), Nektar::SolverUtils::CouplingCwipi::ReceiveCwipi(), Nektar::SolverUtils::CouplingCwipi::ReceiveStart(), RunModule(), Nektar::SolverUtils::CouplingCwipi::SendComplete(), Nektar::PulseWavePropagation::SetPulseWaveBoundaryConditions(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::Collections::CollectionOptimisation::SetWithTimings(), Nektar::CoupledLinearNS::SolveSteadyNavierStokes(), Nektar::SubSteppingExtrapolate::SubStepAdvection(), Nektar::SubSteppingExtrapolate::SubStepExtrapolateField(), Nektar::SubSteppingExtrapolate::SubStepProjection(), Nektar::MultiRegions::AssemblyCommDG::Timing(), Nektar::SubSteppingExtrapolate::v_AccelerationBDF(), Nektar::SolverUtils::AdvectionWeakDG::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::MultiRegions::ExpList::v_BwdTrans(), Nektar::SolverUtils::DiffusionIP::v_Diffuse(), Nektar::SolverUtils::DiffusionIP::v_DiffuseCoeffs(), Nektar::SolverUtils::DiffusionIP::v_DiffuseTraceFlux(), Nektar::SolverUtils::DiffusionIP::v_DiffuseVolumeFlux(), Nektar::PreconCfsBRJ::v_DoPreconCfs(), Nektar::SolverUtils::UnsteadySystem::v_DoSolve(), Nektar::MMFAdvection::v_DoSolve(), Nektar::MMFMaxwell::v_DoSolve(), Nektar::PulseWaveSystem::v_DoSolve(), Nektar::MMFSWE::v_DoSolve(), Nektar::CoupledLinearNS::v_DoSolve(), Nektar::VelocityCorrectionScheme::v_EvaluateAdvection_SetPressureBCs(), Nektar::VCSImplicit::v_EvaluateAdvection_SetPressureBCs(), Nektar::SolverUtils::DriverAdaptive::v_Execute(), Nektar::SolverUtils::DriverParareal::v_Execute(), Nektar::SolverUtils::DriverPFASST::v_Execute(), Nektar::SolverUtils::DriverStandard::v_Execute(), Nektar::MultiRegions::ExpList::v_IProductWRTBase(), Nektar::MultiRegions::ExpList::v_IProductWRTDerivBase(), Nektar::SpatialDomains::MeshGraphIOHDF5::v_PartitionMesh(), Nektar::MultiRegions::ExpList::v_PhysDeriv(), Nektar::MultiRegions::ExpList::v_PhysInterp1DScaled(), Nektar::Dummy::v_PostIntegrate(), Nektar::FieldUtils::ProcessCreateExp::v_Process(), Nektar::FieldUtils::ProcessIsoContour::v_Process(), Nektar::SolverUtils::CouplingCwipi::v_Send(), Nektar::VelocityCorrectionScheme::v_SolveUnsteadyStokesSystem(), Nektar::SubSteppingExtrapolate::v_SubStepAdvance(), Nektar::SubSteppingExtrapolate::v_SubSteppingTimeIntegration(), Nektar::SubSteppingExtrapolate::v_SubStepSaveFields(), and Nektar::SubSteppingExtrapolate::v_SubStepSetPressureBCs().
NekDouble Nektar::LibUtilities::Timer::TimePerTest | ( | unsigned int | n | ) |
Returns amount of seconds per iteration in a test with n iterations.
Definition at line 65 of file Timer.cpp.
References Elapsed().
Referenced by Nektar::SolverUtils::DriverSteadyState::ConvergenceHistory(), Nektar::FieldUtils::Field::CreateExp(), Nektar::SolverUtils::CouplingCwipi::DumpRawFields(), Nektar::LibUtilities::Interpreter::ExpressionEvaluator::Evaluate(), Nektar::LibUtilities::Interpreter::ExpressionEvaluator::EvaluateAtPoint(), Nektar::SolverUtils::CouplingCwipi::ExtrapolateFields(), main(), Nektar::SolverUtils::CouplingCwipi::ReceiveCwipi(), Nektar::SolverUtils::CouplingCwipi::ReceiveStart(), RunModule(), Nektar::SolverUtils::CouplingCwipi::SendComplete(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::Collections::CollectionOptimisation::SetWithTimings(), Nektar::CoupledLinearNS::SolveSteadyNavierStokes(), Nektar::MultiRegions::AssemblyCommDG::Timing(), Nektar::SolverUtils::UnsteadySystem::v_DoSolve(), Nektar::MMFAdvection::v_DoSolve(), Nektar::MMFMaxwell::v_DoSolve(), Nektar::MMFSWE::v_DoSolve(), Nektar::CoupledLinearNS::v_DoSolve(), Nektar::Dummy::v_PostIntegrate(), Nektar::FieldUtils::ProcessCreateExp::v_Process(), Nektar::FieldUtils::ProcessIsoContour::v_Process(), and Nektar::SolverUtils::CouplingCwipi::v_Send().
|
staticprivate |
Definition at line 88 of file Timer.h.
Referenced by AccumulateRegion(), and PrintElapsedRegions().
|
private |
|
private |
|
private |