Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
qbox-public
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
qbox
qbox-public
Commits
d9bac458
Commit
d9bac458
authored
Apr 10, 2020
by
Francois Gygi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use syevd/heevd in JD stepper, workaround lwork size calculation
parent
9b4712aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
JDWavefunctionStepper.C
src/JDWavefunctionStepper.C
+2
-2
Matrix.C
src/Matrix.C
+5
-0
No files found.
src/JDWavefunctionStepper.C
View file @
d9bac458
...
...
@@ -257,7 +257,7 @@ void JDWavefunctionStepper::update(Wavefunction& dwf)
// q is (2n,2n)
DoubleMatrix
q
(
h
.
context
(),
h
.
n
(),
h
.
n
(),
h
.
nb
(),
h
.
nb
());
tmap_
[
"jd_syev"
].
start
();
h
.
syev
(
'l'
,
w
,
q
);
h
.
syev
d
(
'l'
,
w
,
q
);
tmap_
[
"jd_syev"
].
stop
();
// compute the first n eigenvectors and store in wf
...
...
@@ -332,7 +332,7 @@ void JDWavefunctionStepper::update(Wavefunction& dwf)
// q is (2n,2n)
ComplexMatrix
q
(
h
.
context
(),
h
.
n
(),
h
.
n
(),
h
.
nb
(),
h
.
nb
());
tmap_
[
"jd_heev"
].
start
();
h
.
heev
(
'l'
,
w
,
q
);
h
.
heev
d
(
'l'
,
w
,
q
);
tmap_
[
"jd_heev"
].
stop
();
// compute the first n eigenvectors and store in wf
...
...
src/Matrix.C
View file @
d9bac458
...
...
@@ -2819,6 +2819,8 @@ void DoubleMatrix::syev(char uplo, valarray<double>& w, DoubleMatrix& z)
&
info
);
lwork
=
(
int
)
(
tmpwork
+
1
);
// set lwork to max value among all tasks
ctxt_
.
imax
(
1
,
1
,
&
lwork
,
1
);
double
*
work
=
new
double
[
lwork
];
pdsyev
(
&
jobz
,
&
uplo
,
&
m_
,
val
,
&
ione
,
&
ione
,
desc_
,
&
w
[
0
],
z
.
val
,
&
ione
,
&
ione
,
z
.
desc_
,
work
,
&
lwork
,
...
...
@@ -2876,7 +2878,10 @@ void DoubleMatrix::syevd(char uplo, valarray<double>& w, DoubleMatrix& z)
&
tmpiwork
,
&
liwork
,
&
info
);
lwork
=
(
int
)
(
tmpwork
+
1
);
// set lwork to max value among all tasks
ctxt_
.
imax
(
1
,
1
,
&
lwork
,
1
);
double
*
work
=
new
double
[
lwork
];
liwork
=
tmpiwork
;
int
*
iwork
=
new
int
[
liwork
];
pdsyevd
(
&
jobz
,
&
uplo
,
&
m_
,
val
,
&
ione
,
&
ione
,
desc_
,
&
w
[
0
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment