Skip to content

Commit a47da8e

Browse files
committed
fix cuda build bug
1 parent 1e288f9 commit a47da8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/module_hamilt_lcao/module_dftu/dftu_pw.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ void DFTU::cal_occ_pw(const int iter, const void* psi_in, const ModuleBase::matr
8888
psi_p->fix_k(ik);
8989
onsite_p->tabulate_atomic(ik);
9090

91-
onsite_p->overlap_proj_psi(nbands*psi_p->npol, psi_p->get_pointer());
91+
onsite_p->overlap_proj_psi(nbands*psi_p->get_npol(), psi_p->get_pointer());
9292
const std::complex<double>* becp = onsite_p->get_h_becp();
9393
// becp(nbands*npol , nkb)
9494
// mag = wg * \sum_{nh}becp * becp
95-
int nkb = onsite_p->get_size_becp() / nbands / psi_p->npol;
95+
int nkb = onsite_p->get_size_becp() / nbands / psi_p->get_npol();
9696
int begin_ih = 0;
9797
for(int iat = 0; iat < cell.nat; iat++)
9898
{

0 commit comments

Comments
 (0)