Skip to content
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

Regular update #40

Merged
merged 57 commits into from
Oct 3, 2023
Merged

Regular update #40

merged 57 commits into from
Oct 3, 2023

Conversation

cjknight
Copy link
Contributor

@cjknight cjknight commented Oct 3, 2023

High-level summary:

  • Sync with dev branch
  • Fixed typo in polymer example: now 1-to-1 agreement with CUDA backend up to 8 fragments (i.e. energies & number of iterations match)
  • Cleaned up cuda backend, some data transfer, optimizations, some syncing with openmptarget backend
  • First pass on OpenMPTarget backend with support for NVHPC and LLVM compilers: still work in progress (debugging device detection and data management)

MatthewRHermes and others added 30 commits September 1, 2023 11:45
Test is currently failing; energy returned by excitations solver
does not correspond to any eigenvalue of the lassi Hamiltonian so
this is an error, not a local-minimum problem at the moment.
It was previously discarding the between-fragment part of the
effective 1-electron operator, which is obviously not right
Self-consistency achieved, but it's stuck on local minima now.
Local minimum problem from previous commit fixed for 9 of the 11
perturber rootspaces.
Should not report failure to find global minimum in CI jobs, since
I am still developing the algorithm.
Remove the unittest cases where it's numerically very difficult
to avoid local minima, because they reflect unlikely use cases
(direct spin excitation and double charge transfer).
set_excited_fragment_ now takes the value of the quantum numbers
instead of the delta from the q-space, since there will be multiple
q-spaces in the future. "excited" is now used in place of "active"
throughout the code to clarify the relationship between the CAS and
the space of excited fragments. docstring for set_excited_fragment_
Allows the Q space to have more than one rootspace in it, so that
the stabilizing coupling of m,m' <-> m+1,m'-1 rootspaces is fully
expressed in the vrvsolver.
Using the ExcitationSolver. Things that enabled this are 1) loosen
self-consistency requirement of initial guess H(E)|Psi> = E|Psi>
and 2) do not greedily solve H(E)|Psi> = E|Psi> for each fragment,
but instead only do one pass of the undressed FCISolver kernel per
VRVSolver kernel call. It is still very slow. As I learned in grad
school, the fixed point algorithm for this fundamentally DOES NOT
WORK when coupling is strong, at least as far as the energy
determination is concerned. The good news is that H(E)|Psi> = E|Psi>
is a strictly one-dimensional monotonic function between
singularities so rootfinding it more properly should be easy.
Re-solve the self-consistent H(E)|Psi> = E|Psi> properly with fixed
CI vectors on every cycle of the VRVSolver nonlinear iteration.
Update denom_q immediately upon computing e0; cleanup debugging
stuff. There is still some failure to converge for alfefe nmax=0.
Slow calc'n compared to normal seems almost entirely due to
repeated lassi op_o? function calls... is there any way to improve
this?
- delete old commented code
- e_p -> e0 consistently when I'm referring to the solution of
self-consistent equations
- the validity threshold of lowest_refovlp_eigval as a kwarg
- some comment clarity
- _check_init_guess -> get_init_guess
- sort_ci0 -> actually only sorts ci0 without also calling
get_ham_pq
The VRV operators, H_PQ.(E-H_QQ)^-1.H_QP, will be averged over
different P indices: sum_P w_P H_PQ.(E-H_QQ)^-1.H_QP
Doesn't reliably converge to anything, probably because I'm not
quite understanding the equations I'm actually trying to solve when
I do this. Needs theoretical development
MatthewRHermes and others added 27 commits September 15, 2023 18:14
in debug output in case of convergence failure
To permit the underlying _las object to be untouched by model-space
manipulations.
Generates sz-rotated CI vectors directly from origin CI vectors.
Uses ExcitationPSFCISolver for charge-separated rootspaces,
currently with equal-weights state-averaging. TODO: spin
fluctations and unittests.
There is another warning for failure to converge anyway.
I can't believe I didn't have this before.
Copy the logic from lasci_sync.py over to lasscf_rdm.py
The lasscf_rdm kernel will now actually make sure that the coupled
fragment subproblems, which interact with each other via  mean-
field ("jk") effects, have reached a fixed point before announcing
successful convergence. This is accomplished by a second micro-
iteration in which the orbitals are fixed by the fcibox kernels are
called repeatedly, taking the updated outputs of their neighbors
as inputs. Control the behavior of this new microiteration with
the "conv_tol_rdmjkddm", "conv_tol_rdmjkde", and "max_cycle_rdmjk"
attributes of the LASSCF method object. Also reduce default
"max_cycle_micro" to 3 from 5, since "max_cycle_micro" and
"max_cycle_rdmjk" handle separately what the lasci_sync kernel
handles simultaneously with "max_cycle_micro."
1. more conservative guardrail than last commit
2. transform_opmat_det2csf_pspace use integer range rather than
bool array for indexing, since everything is supposed to be
contiguous anyway
3. demote the eigenvalue test to even higher debug, since it
becomes impossible fast
In case (esp in the excitation solver) it makes more sense to only
optimize one fragment at a time.
@MatthewRHermes MatthewRHermes merged commit baa8c10 into MatthewRHermes:gpu Oct 3, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants