-
Notifications
You must be signed in to change notification settings - Fork 8
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
Errors when running UHF AFM states with density fitting and minimal fragments #83
Comments
|
and the bug will be platform dependent because switching to the out-of-core depends on current memory usage on your machine as well as |
I stumbled upon this before ... in my opinion, this could even be fixed in NumPy, by deriving -1 in 0-sized arrays as follows:
Finally, if all axes are 0-sized, take the -1-axis to be 0-sized as well. This would extend the scope of the -1 notation. |
Definitely- I've used it in a few places where I hadn't considered the possibility of an error like this, which is why I was slightly surprised by it!
Hypothetically you can specify an active space for a UCCSD calculation which freezes all occupied or virtual orbitals in the system, and I don't think there's an explicit disclaimer that this won't work, but it feels a little contrived. Also, there are further issues that crop up after fixing this initial error in pyscf, so I think you would just have to ensure that all such integrals are computed incore. For now, I've settled for removing the initial guess from the test- PR just about to be up. |
After a few iterations and other issues brought up by different approaches to this issue, I've moved to just using explicit ERIs for this test since the issues raised by this are specific to the density fitted ERI routines. I'm going to leave this issue up unless anyone disagrees since this will come up again if we try to run large-scale Hubbard models with density fitting and single-site fragments; the obvious solution there is to just use two-site impurities. |
Hello! This is an issue for discussion of the test failures in #69; I didn't want to confuse the discussion there so thought a different place to discuss would be useful. I was going to add a PR for discussion and a fix, but I'm currently unsure of the best way to nicely fix this.
The test failures are interesting; it's the test from the spin-symmetry-broken UHF fix I merged a while back but it didn't come up till now due to the tests not running for all PRs at that point. I can't reproduce it on my local or zombie python installs (aka all tests pass for me), both of which used the setup.py for all dependencies and seem to be within what we support, but @abhishekkhedkar09 has successfully reproduced it.
It looks to be an error coming from within the pyscf UCCSD ao2mo functionality when called within a UCISD calculation to generate an initial UFCI guess. The explicit error from the logs is
and the relevant end of the stack trace is
This looks to arise when inferring one shape dimension when another is specified to be zero size for an array of zero size, which makes sense since the obvious approach to calculate this would result in zero divided by zero and that index of the shape doesn't actually change the size of resulting matrix. As a minimal example consider the following:
The neatest solution would be changing the call in pyscf to
> Lvv[blk] = lib.pack_tril(Lpq[:,va,va].reshape(Lpq.shape[0],nvira,nvira))
but given this is very edge case I don't know if that's likely to be accepted.
Otherwise I guess catching this error in this edge case might be an OK modification? However, I wanted to discuss with others first.
My initial guess on why I can't reproduce it is that I have a
.pyscf_conv.py
set up to set a very large maximum memory, which might mean that only incore eris are used and so if the issue is withinuccsd._make_df_eris_outcore
I don't ever encounter it. However, initial tests with Abhi suggest he still gets failure with this modification so who knows.Anyway, any help on what a nice fix would look like would be appreciated!
The text was updated successfully, but these errors were encountered: