You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When non-zero p_tip_ratios is specified, the script can run into memory problems.
The current design of the code is:
class Cp2kGridOrbitals puts the orbitals on a grid and divides them up between MPI processes such that each process has some orbitals in their full spatial extent;
class STM "re-divides" the orbitals such that every MPI process has all orbitals but only in a specific spatial region, that allows to run the STM analysis independently from other MPI processes.
If p_tip_ratios is enabled, the current implementation calculates the gradient of the orbitals before the "re-division" of 2) and then just keeps two grids for each process: the orbital and its gradient. Intuitively, this should double the memory usage. But usage shows that this could be even higher and often causes the program to run out of memory. Relevant code is here:
Why do i need to store the gradient at this step? because of the spatial division between the MPI processes. If i just calculated the gradient for each process separately, then there could be anomalies at the edges of the spatial region.
A possible alternative would be to divide the spatial region between the MPI processes such that neighbouring regions overlap slightly. this would allow each process to independently calculate the gradient when needed and likely would reduce the memory usage considerably.
The text was updated successfully, but these errors were encountered:
When non-zero
p_tip_ratios
is specified, the script can run into memory problems.The current design of the code is:
If
p_tip_ratios
is enabled, the current implementation calculates the gradient of the orbitals before the "re-division" of 2) and then just keeps two grids for each process: the orbital and its gradient. Intuitively, this should double the memory usage. But usage shows that this could be even higher and often causes the program to run out of memory. Relevant code is here:cp2k-spm-tools/cp2k_spm_tools/cp2k_stm_sts.py
Lines 148 to 164 in abe0d0e
Why do i need to store the gradient at this step? because of the spatial division between the MPI processes. If i just calculated the gradient for each process separately, then there could be anomalies at the edges of the spatial region.
A possible alternative would be to divide the spatial region between the MPI processes such that neighbouring regions overlap slightly. this would allow each process to independently calculate the gradient when needed and likely would reduce the memory usage considerably.
The text was updated successfully, but these errors were encountered: