From 632189118e5230be3a8a36b83303dd3dbf9266ce Mon Sep 17 00:00:00 2001 From: Taoni Bao Date: Fri, 9 Aug 2024 21:38:35 +0800 Subject: [PATCH] Fix the issue of some `timer` instances not being closed, resulting in incorrect time statistics (#4939) * Fix timer Force_LCAO::allocate * Delete timer cal_edm_2d --- source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp | 2 +- source/module_hamilt_lcao/hamilt_lcaodft/fedm_k.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp index 4a15f7de24..b80c98ffec 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp @@ -162,7 +162,7 @@ void Force_LCAO>::allocate(const Parallel_Orbitals& pv, } } - ModuleBase::timer::tick("Force_LCAO_k", "allocate_k"); + ModuleBase::timer::tick("Force_LCAO", "allocate"); return; } diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/fedm_k.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/fedm_k.cpp index d4bc06d116..11e5e0df32 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/fedm_k.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/fedm_k.cpp @@ -89,8 +89,7 @@ void Force_LCAO>::cal_fedm( edm.init_DMR(*ra, &ucell); edm.cal_DMR(); edm.sum_DMR_spin(); - // - ModuleBase::timer::tick("Force_LCAO_k", "cal_edm_2d"); + //-------------------------------------------- // summation \sum_{i,j} E(i,j)*dS(i,j) // BEGIN CALCULATION OF FORCE OF EACH ATOM