Skip to content

Commit c5d6524

Browse files
committed
change the compile error
1 parent cedaae6 commit c5d6524

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

source/module_basis/module_pw/pw_basis_sup.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ void PW_Basis_Sup::distribution_method3(const ModulePW::PW_Basis* pw_rho)
114114
this->count_pw_st(st_length2D, st_bottom2D);
115115
}
116116
#ifdef __MPI
117-
118117
MPI_Bcast(&this->npwtot, 1, MPI_INT, 0, this->pool_world);
119118
MPI_Bcast(&this->nstot, 1, MPI_INT, 0, this->pool_world);
120119
MPI_Bcast(&liy, 1, MPI_INT, 0, this->pool_world);
@@ -163,7 +162,6 @@ void PW_Basis_Sup::distribution_method3(const ModulePW::PW_Basis* pw_rho)
163162
st_move++;
164163
}
165164
}
166-
}
167165
#endif
168166
}
169167
#ifdef __MPI

source/module_basis/module_pw/test_gpu/pw_basis_k_C2C.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,13 @@ TEST_F(PWTEST, pw_basis_k_C2C_double)
116116
h_rhog[ig] = 1.0 / (pwtest.getgk2(ik, ig) + 1);
117117
ModuleBase::Vector3<double> f = pwtest.getgdirect(ik, ig);
118118
if (f.y > 0)
119+
{
119120
h_rhog[ig] += ModuleBase::IMAG_UNIT / (std::abs(f.x + 1) + 1);
121+
}
120122
else if (f.y < 0)
123+
{
121124
h_rhog[ig] -= ModuleBase::IMAG_UNIT / (std::abs(-f.x + 1) + 1);
125+
}
122126
}
123127
complex<double>* d_rhog = nullptr;
124128
complex<double>* d_rhor = nullptr;
@@ -252,8 +256,6 @@ TEST_F(PWTEST, pw_basis_k_C2C_float)
252256
const int iy = ixy % ny;
253257
for (int iz = 0; iz < nz; ++iz)
254258
{
255-
int ix = ixy / ny;
256-
int iy = ixy % ny;
257259
ModuleBase::Vector3<float> real_r(ix, iy, iz);
258260
float phase_im = -delta_g * real_r;
259261
complex<float> phase(0, ModuleBase::TWO_PI * phase_im);
@@ -269,9 +271,13 @@ TEST_F(PWTEST, pw_basis_k_C2C_float)
269271
h_rhog[ig] = float(1.0 / (pwtest.getgk2(ik, ig) + 1));
270272
ModuleBase::Vector3<double> f = pwtest.getgdirect(ik, ig);
271273
if (f.y > 0)
274+
{
272275
h_rhog[ig] += std::complex<float>(0,1.0) / (std::abs(float(f.x) + 1) + 1);
276+
}
273277
else if (f.y < 0)
278+
{
274279
h_rhog[ig] -= std::complex<float>(0,1.0) / (std::abs(float(-f.x) + 1) + 1);
280+
}
275281
}
276282
complex<float>* d_rhog = nullptr;
277283
complex<float>* d_rhor = nullptr;

0 commit comments

Comments
 (0)