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

Matrix free wave function optimization #84

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

erikkjellgren
Copy link
Owner

@erikkjellgren erikkjellgren commented Feb 14, 2025

For the wave functions WaveFunctionUPS and WaveFunctionSAUPS the memory requirements have been reduced from scaling as O(N^2) to O(N) with N being the number of determinants.
This is NOT the case for WaveFunctionUCC that still scales as O(N^2) in memory, this is due to the run-time increased a lot for WaveFunctionUCC when the O(N) algorithm was used.

A very rough estimate for the old and new memory requirements is,

Active-space Old memory use (GB) New memory use (GB)
(2, 2) 1.3e-7 3.2e-8
(4, 4) 1.0e-5 2.9e-7
(6, 6) 1.3e-3 3.2e-6
(8, 8) 1.9e-1 3.9e-5
(10, 10) 32 5.1e-4
(12, 12) 5800 6.8e-3
(14, 14) - 9.4e-2
(16, 16) - 1.3

The actual memory usage will ofc be some factor of the above, if an algorithm requires some copies of the state vector (memory bottleneck in the new implementation) then the memory requirement will be that factor times the table value (for the new implementation) approximately.

This is to say that memory usage is no longer a critical bottleneck for UPS and SAUPS.

The UPS wave function optimization is also faster now.
For chains of hydrogen atoms with 1-SA-fUpCCGSD the run times are the following,

Active-space Old time per iteration (s) New time per iteration (s)
(2, 2) 3.0e-3 2.8e-3
(4, 4) 4.3e-2 4.5e-2
(6, 6) 7.2e-1 6.1e-1
(8, 8) 32 15
(10, 10) 3900 400
(12, 12) OOM 10000

A speed increase that increases with system size.

The speed is highly dependent on how dense the state vector of the system is, for O2 6-31G (12,12) an iteration is 800 s.

The WaveFunctionUCC run-time might be largely unaffected by this new structure of the code.
UCCSD H6 STO-3G had a timing of 2.1 s per iteration in the old implementation and now has 2.0 s per iteration.

@erikkjellgren erikkjellgren self-assigned this Feb 14, 2025
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.

1 participant