Skip to content

Commit 65e4ba1

Browse files
committed
fix bug in sDFT-BPCG
1 parent 7ddd28f commit 65e4ba1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/module_elecstate/module_charge/charge_mpi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void Charge::reduce_diff_pools(double* array_rho) const
119119
void Charge::rho_mpi()
120120
{
121121
ModuleBase::TITLE("Charge", "rho_mpi");
122-
if (GlobalV::KPAR <= 1) {
122+
if (GlobalV::KPAR * PARAM.inp.bndpar <= 1) {
123123
return;
124124
}
125125
ModuleBase::timer::tick("Charge", "rho_mpi");

source/module_hamilt_pw/hamilt_stodft/sto_iter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ void Stochastic_Iter<T, Device>::cal_storho(const UnitCell& ucell,
668668

669669
delmem_complex_op()(porter);
670670
#ifdef __MPI
671-
if(GlobalV::KPAR > 1)
671+
if(GlobalV::KPAR * PARAM.inp.bndpar > 1)
672672
{
673673
for (int is = 0; is < nspin; ++is)
674674
{

0 commit comments

Comments
 (0)