-
Notifications
You must be signed in to change notification settings - Fork 475
Replace sq_rsp(...) with a new DSYEV wrapper, part 1 #2686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6488186 to
1175db0
Compare
|
As an old-timer, I would say yes, libciomr is the place. At least as long as there is still a libciomr, that's where I would look. This is nice improvement! ccdensity has a sq_rsp too. did you miss that one? |
I ran a search and none of the remaining hits were from ccdensity. |
|
in cc/ccdensity/ael.cc
This code determines approximate excitation level. It used to work.
Apparently no longer called. I'm not sure why.
(I'm not on the very latest psi4, so it's possible it's been excised.
…On Thu, Oct 6, 2022 at 8:39 PM TiborGY ***@***.***> wrote:
As an old-timer, I would say yes, libciomr is the place. At least as long
as there is still a libciomr, that's where I would look. This is nice
improvement!
ccdensity has a sq_rsp too. did you miss that one?
I ran a search and none of the remaining hits were from ccdensity.
—
Reply to this email directly, view it on GitHub
<#2686 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4C4TGYDX6IXCJ5SUMXZVLWB55NJANCNFSM56SE6U4Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
Indeed it has, by yours truly. See #2672 for the removal. I do not know when the AEL code became defunct, but I removed it because it was never called. The code is preserved in the psi4attic repo. |
…heck, remove eigenvector allocation
loriab
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup and consolidation, thank you!
|
503/503 ctest tests are passing |
|
I've just run full ctests and pytests with this branch, and it's clean, so lgtm! |
Description
sq_rsp(...)is an ancient diagonalizer function from Psi3 with many issues. While its innards could be improved, the function signature is horrid. It should be deprecated and replaced with something better.Stemming from the awful interface, users of
sq_rsp(...)never check if the diagonalization failed, because they cannot. This is now rectified by adding failure checks wherever the new DSYEV wrappers are called.Checks against non-square matrices are also added where there is both a row and column count at the call site.
Some of the call sites would be dfocc territory, this PR does not include them to avoid conflicts with the dfocc overhaul.
This is another shard of the #2642 mega-PR that can be merged after PR #2678 and #2738 are in.
Todos
sq_rsp(...)with. The new wrappers have a much cleaner interface, and no longer require the allocation of an eigenvector array if the caller only needs eigenvalues. They also no longer swallow the return value of DSYEV, in fact their return value is marked as[[nodiscard]]. In short, checking for diagonalization failure went from impossible to mandatory.Please note that unlike
sq_rsp(...), the new functions do not take a "tolarence" value, but this is actually a null change as that parameter has been set-but-unused insq_rsp(...)since ~forever ago whensq_rsp(...)switched to calling DSYEV internally.sq_rsp(...)calls inmcscf(mcscf::SCF::energyandmcscf::MatrixBase::diagonalize) with new wrapper. Add checks for diagonalization failure and guard against non-square matrices.sq_rsp(...)calls indetci(detci/h0block.cc,detci/sem.ccanddetci/sem_test.cc) with new wrapper. Add checks for diagonalization failure.sq_rsp(...)call inlibmints/matrix.cc(Matrix::diagonalize) with new wrapper. Add checks for diagonalization failure. Add a sanity checks for non-square matrices and illegal values of "diagonalization order".sq_rsp(...)calls inccenergy(ccenergy/d1diag.cc,ccenergy/d2diag.ccandccenergy/new_d1diag.cc) with new wrapper. Add checks for diagonalization failure. This allows the removal of the eigenvector array, and the code that allocates/deallocates it.sq_rsp(...)calls in thelibqtDavidson solver with new wrapper. Add checks for diagonalization failure.sq_rsp(...)call in the RHF and ROHF stability checks with new wrapper. Add checks for diagonalization failure.sq_rsp(...)calls inlibsapt_solver/sapt2.ccwith new wrapper. Add checks for diagonalization failure.Questions
libciomra good place for the new wrappers to live in? The one they are replacing is there, so it seemed like as good of a place as any.Checklist
Status