Skip to content

Commit 8fcc4a8

Browse files
committed
change reduce
1 parent 140b272 commit 8fcc4a8

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

source/source_esolver/esolver_of.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ double ESolver_OF::cal_energy()
539539
this->pw_rho->nrxx,
540540
this->dV_);
541541
}
542-
Parallel_Reduce::reduce_all(pseudopot_energy);
542+
Parallel_Reduce::reduce_pool(pseudopot_energy);
543543
this->pelec->f_en.ekinetic = kinetic_energy;
544544
this->pelec->f_en.e_local_pp = pseudopot_energy;
545545
this->pelec->f_en.etot += kinetic_energy + pseudopot_energy;

source/source_estate/elecstate_energy_terms.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,13 @@ double ElecState::get_local_pp_energy()
4545
for (int is = 0; is < PARAM.inp.nspin; ++is)
4646
{
4747
local_pseudopot_energy
48-
+= BlasConnector::dot(this->charge->rhopw->nrxx, this->pot->get_fixed_v(), 1, this->charge->rho[is], 1)
49-
* this->charge->rhopw->omega / this->charge->rhopw->nxyz;
48+
+= BlasConnector::dot(this->charge->rhopw->nrxx,
49+
this->pot->get_fixed_v(),
50+
1,
51+
this->charge->rho[is], 1)
52+
* this->charge->rhopw->omega / this->charge->rhopw->nxyz;
5053
}
51-
Parallel_Reduce::reduce_all(local_pseudopot_energy);
54+
Parallel_Reduce::reduce_pool(local_pseudopot_energy);
5255
return local_pseudopot_energy;
5356
}
5457

0 commit comments

Comments
 (0)