Skip to content

Commit 880cd2f

Browse files
authored
Fix cudaErrIllegalAddress by using correct device pointer (#6862)
1 parent e003d49 commit 880cd2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/source_hsolver/diago_dav_subspace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ void Diago_DavSubspace<T, Device>::cal_grad(const HPsiFunc& hpsi_func,
323323
}
324324

325325
// vcc = - vcc * eigenvalue
326-
ModuleBase::matrix_mul_vector_op<T, Device>()(nbase, notconv, vcc, this->nbase_x, eigenvalue_iter->data(), -1.0, vcc, this->nbase_x);
326+
ModuleBase::matrix_mul_vector_op<T, Device>()(nbase, notconv, vcc, this->nbase_x, e_temp_hd, -1.0, vcc, this->nbase_x);
327327

328328
#ifdef __DSP
329329
ModuleBase::gemm_op_mt<T, Device>()

0 commit comments

Comments
 (0)