Skip to content

Commit c6559dd

Browse files
committed
Getting ready for gathering MPI processes
1 parent 1d9e60f commit c6559dd

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed

source/module_esolver/esolver_ks_lcao_tddft.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ void ESolver_KS_LCAO_TDDFT<Device>::hamilt2density_single(UnitCell& ucell,
9090
module_tddft::Evolve_elec<Device>::solve_psi(istep,
9191
PARAM.inp.nbands,
9292
PARAM.globalv.nlocal,
93+
kv.get_nks(),
9394
this->p_hamilt,
9495
this->pv,
9596
this->psi,
@@ -99,7 +100,8 @@ void ESolver_KS_LCAO_TDDFT<Device>::hamilt2density_single(UnitCell& ucell,
99100
this->pelec->ekb,
100101
td_htype,
101102
PARAM.inp.propagator,
102-
kv.get_nks());
103+
use_tensor,
104+
use_lapack);
103105
this->weight_dm_rho();
104106
}
105107
this->weight_dm_rho();
@@ -109,6 +111,7 @@ void ESolver_KS_LCAO_TDDFT<Device>::hamilt2density_single(UnitCell& ucell,
109111
module_tddft::Evolve_elec<Device>::solve_psi(istep,
110112
PARAM.inp.nbands,
111113
PARAM.globalv.nlocal,
114+
kv.get_nks(),
112115
this->p_hamilt,
113116
this->pv,
114117
this->psi,
@@ -118,7 +121,8 @@ void ESolver_KS_LCAO_TDDFT<Device>::hamilt2density_single(UnitCell& ucell,
118121
this->pelec->ekb,
119122
td_htype,
120123
PARAM.inp.propagator,
121-
kv.get_nks());
124+
use_tensor,
125+
use_lapack);
122126
this->weight_dm_rho();
123127
}
124128
else

source/module_esolver/esolver_ks_lcao_tddft.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ class ESolver_KS_LCAO_TDDFT : public ESolver_KS_LCAO<std::complex<double>, doubl
3636
//! Overlap matrix of last time step
3737
std::complex<double>** Sk_laststep = nullptr;
3838

39-
int td_htype = 1;
39+
const int td_htype = 1;
40+
41+
// const bool use_tensor = true;
42+
const bool use_tensor = false;
43+
const bool use_lapack = true;
44+
// const bool use_lapack = false;
4045

4146
private:
4247
void weight_dm_rho();

source/module_hamilt_lcao/module_tddft/evolve_elec.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,24 @@ template <typename Device>
2727
void Evolve_elec<Device>::solve_psi(const int& istep,
2828
const int nband,
2929
const int nlocal,
30+
const int& nks,
3031
hamilt::Hamilt<std::complex<double>>* phm,
3132
Parallel_Orbitals& para_orb,
3233
psi::Psi<std::complex<double>>* psi,
3334
psi::Psi<std::complex<double>>* psi_laststep,
3435
std::complex<double>** Hk_laststep,
3536
std::complex<double>** Sk_laststep,
3637
ModuleBase::matrix& ekb,
37-
int htype,
38-
int propagator,
39-
const int& nks)
38+
const int htype,
39+
const int propagator,
40+
const bool use_tensor,
41+
const bool use_lapack)
4042
{
4143
ModuleBase::TITLE("Evolve_elec", "solve_psi");
4244
ModuleBase::timer::tick("Evolve_elec", "solve_psi");
4345

46+
// Control the print of matrix to running_md.log
4447
const int print_matrix = 0;
45-
// const bool use_tensor = true;
46-
const bool use_tensor = false;
47-
const bool use_lapack = true;
48-
// const bool use_lapack = false;
4948

5049
for (int ik = 0; ik < nks; ik++)
5150
{

source/module_hamilt_lcao/module_tddft/evolve_elec.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,18 @@ class Evolve_elec
108108
static void solve_psi(const int& istep,
109109
const int nband,
110110
const int nlocal,
111+
const int& nks,
111112
hamilt::Hamilt<std::complex<double>>* phm,
112113
Parallel_Orbitals& para_orb,
113114
psi::Psi<std::complex<double>>* psi,
114115
psi::Psi<std::complex<double>>* psi_laststep,
115116
std::complex<double>** Hk_laststep,
116117
std::complex<double>** Sk_laststep,
117118
ModuleBase::matrix& ekb,
118-
int htype,
119-
int propagator,
120-
const int& nks);
119+
const int htype,
120+
const int propagator,
121+
const bool use_tensor,
122+
const bool use_lapack);
121123

122124
/// ctx is nothing but the devices used in op (Device* ctx = nullptr;),
123125
/// it controls the ops to use the corresponding device to calculate results

source/module_hsolver/diago_cusolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#include "diago_cusolver.h"
22

3-
#include "module_parameter/parameter.h"
43
#include "module_base/blacs_connector.h"
54
#include "module_base/global_variable.h"
65
#include "module_base/scalapack_connector.h"
76
#include "module_base/timer.h"
7+
#include "module_parameter/parameter.h"
88

99
#include <memory>
1010
#include <type_traits>

0 commit comments

Comments
 (0)