Skip to content

Commit 2ebc9bb

Browse files
authored
Fix: dmin is replaced by dmax (#5829)
* fix #5819
1 parent a2ec5d1 commit 2ebc9bb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/module_hsolver/diago_iter_assist.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ void DiagoIterAssist<T, Device>::diagH_subspace(const hamilt::Hamilt<T, Device>*
117117
// after generation of H and S matrix, diag them
118118
DiagoIterAssist::diagH_LAPACK(nstart, n_band, hcc, scc, nstart, en, vcc);
119119

120+
121+
const int ld_temp = in_place ? dmax : dmin;
122+
120123
{ // code block to calculate evc
121124
gemm_op<T, Device>()(ctx,
122125
'N',
@@ -131,12 +134,12 @@ void DiagoIterAssist<T, Device>::diagH_subspace(const hamilt::Hamilt<T, Device>*
131134
nstart,
132135
&zero,
133136
temp,
134-
dmin);
137+
ld_temp);
135138
}
136139

137140
if (!in_place)
138141
{
139-
matrixSetToAnother<T, Device>()(ctx, n_band, temp, dmin, evc.get_pointer(), dmax);
142+
matrixSetToAnother<T, Device>()(ctx, n_band, temp, ld_temp, evc.get_pointer(), dmax);
140143
delmem_complex_op()(ctx, temp);
141144
}
142145
delmem_complex_op()(ctx, hcc);

0 commit comments

Comments
 (0)