Skip to content

Commit 16ba5d2

Browse files
committed
add TITLE for after_all_runners
1 parent d672bca commit 16ba5d2

File tree

8 files changed

+11
-3
lines changed

8 files changed

+11
-3
lines changed

source/source_esolver/esolver_dp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ void ESolver_DP::cal_stress(UnitCell& ucell, ModuleBase::matrix& stress)
148148

149149
void ESolver_DP::after_all_runners(UnitCell& ucell)
150150
{
151+
ModuleBase::TITLE("ESolver_DP", "after_all_runners");
151152
GlobalV::ofs_running << "\n --------------------------------------------" << std::endl;
152153
GlobalV::ofs_running << std::setprecision(16);
153154
GlobalV::ofs_running << " !FINAL_ETOT_IS " << dp_potential * ModuleBase::Ry_to_eV << " eV" << std::endl;

source/source_esolver/esolver_fp.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ ESolver_FP::~ESolver_FP()
3030
//****************************************************
3131
// do not add any codes in this deconstructor funcion
3232
//****************************************************
33-
// mohan add 20251005
34-
pw::teardown_pwrho(this->pw_rho_flag, PARAM.globalv.double_grid, this->pw_rho, this->pw_rhod);
3533

3634
delete this->pelec;
3735
}
@@ -257,12 +255,15 @@ void ESolver_FP::iter_finish(UnitCell& ucell, const int istep, int& iter, bool&
257255

258256
void ESolver_FP::after_all_runners(UnitCell& ucell)
259257
{
258+
ModuleBase::TITLE("ESolver_FP", "after_all_runners");
260259
// print out the final total energy
261260
GlobalV::ofs_running << "\n --------------------------------------------" << std::endl;
262261
GlobalV::ofs_running << std::setprecision(16);
263262
GlobalV::ofs_running << " !FINAL_ETOT_IS " << this->pelec->f_en.etot * ModuleBase::Ry_to_eV << " eV" << std::endl;
264263
GlobalV::ofs_running << " --------------------------------------------\n\n" << std::endl;
265264

265+
// mohan add 20251005, delete pw_rho and pw_rhod, ensure following functions will not use these
266+
pw::teardown_pwrho(this->pw_rho_flag, PARAM.globalv.double_grid, this->pw_rho, this->pw_rhod);
266267
}
267268

268269
} // namespace ModuleESolver

source/source_esolver/esolver_ks.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ void ESolver_KS<T, Device>::after_scf(UnitCell& ucell, const int istep, const bo
606606
template <typename T, typename Device>
607607
void ESolver_KS<T, Device>::after_all_runners(UnitCell& ucell)
608608
{
609+
ModuleBase::TITLE("ESolver_KS", "after_all_runners");
609610
//! Ensure the function of base class is called last
610611
ESolver_FP::after_all_runners(ucell);
611612
}

source/source_esolver/esolver_ks_lcao.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,6 @@ void ESolver_KS_LCAO<TK, TR>::after_all_runners(UnitCell& ucell)
410410
ModuleBase::TITLE("ESolver_KS_LCAO", "after_all_runners");
411411
ModuleBase::timer::tick("ESolver_KS_LCAO", "after_all_runners");
412412

413-
414413
const int nspin0 = (PARAM.inp.nspin == 2) ? 2 : 1;
415414

416415
// 1) write projected band structure

source/source_esolver/esolver_ks_pw.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ void ESolver_KS_PW<T, Device>::cal_stress(UnitCell& ucell, ModuleBase::matrix& s
530530
template <typename T, typename Device>
531531
void ESolver_KS_PW<T, Device>::after_all_runners(UnitCell& ucell)
532532
{
533+
ModuleBase::TITLE("ESolver_KS_PW", "after_all_runners");
533534

534535
ModuleIO::ctrl_runner_pw<T, Device>(ucell, this->pelec, this->pw_wfc,
535536
this->pw_rho, this->pw_rhod, this->chr, this->kv, this->psi,

source/source_esolver/esolver_lj.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ void ESolver_LJ::runner(UnitCell& ucell, const int istep)
120120

121121
void ESolver_LJ::after_all_runners(UnitCell& ucell)
122122
{
123+
ModuleBase::TITLE("ESolver_LJ", "after_all_runners");
123124
GlobalV::ofs_running << "\n --------------------------------------------" << std::endl;
124125
GlobalV::ofs_running << std::setprecision(16);
125126
GlobalV::ofs_running << " !FINAL_ETOT_IS " << lj_potential * ModuleBase::Ry_to_eV << " eV" << std::endl;

source/source_esolver/esolver_of.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,8 @@ void ESolver_OF::after_opt(const int istep, UnitCell& ucell, const bool conv_eso
540540
*/
541541
void ESolver_OF::after_all_runners(UnitCell& ucell)
542542
{
543+
ModuleBase::TITLE("ESolver_OF", "after_all_runners");
544+
543545
//! Ensure the function of base class is called last
544546
ESolver_FP::after_all_runners(ucell);
545547
}

source/source_esolver/esolver_sdft_pw.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ void ESolver_SDFT_PW<T, Device>::cal_stress(UnitCell& ucell, ModuleBase::matrix&
259259
template <typename T, typename Device>
260260
void ESolver_SDFT_PW<T, Device>::after_all_runners(UnitCell& ucell)
261261
{
262+
ModuleBase::TITLE("ESolver_SDFT_PW", "after_all_runners");
263+
262264
// release memory
263265
if (this->method_sto == 2)
264266
{

0 commit comments

Comments
 (0)