[CP2K-user] [CP2K:19306] Deallocate memory used by Hamiltonian-related subroutines

Cindy Pham cindypham196 at gmail.com
Thu Oct 5 00:56:42 UTC 2023


Hi Prof. Hutter,

Thank you for your suggestion!

Best regards,
Cindy.



On Wed, Oct 4, 2023 at 4:15 AM Jürg Hutter <hutter at chem.uzh.ch> wrote:

> Hi
>
> without knowing the details of your program it is impossible to point to
> a easy solution. As there are no memory leaks in CP2K, you must miss some
> routines that clean up at the end of the SCF loop.
> I would suggest you compile the code with memory leak detection in order
> to find the problematic structure and then write a routine to deallocate
> them.
> See the sdbg arch files for the gfortran options needed for leak detection.
>
> regards
> JH
>
> ________________________________________
> From: cp2k at googlegroups.com <cp2k at googlegroups.com> on behalf of Cindy
> Pham <cindypham196 at gmail.com>
> Sent: Tuesday, October 3, 2023 10:16 PM
> To: cp2k at googlegroups.com
> Subject: [CP2K:19284] Deallocate memory used by Hamiltonian-related
> subroutines
>
> Hi CP2K forum,
>
> I am running a lengthy SCF calculation (over 10k iterations) and noticed a
> gradual increase in the allocated memory (I used TRACE keyword to print
> current allocated memory). It appears that the step-by-step increase in
> memory allocation happens when the Kohn-Sham Hamiltonian is re-calculated,
> specifically within the qs_ks_did_change function (in qs_ks_types.F).
>
> The SCF routine is my own code that relies on the CP2K built-in
> Hamiltonian subroutines. It functions properly, but its only problem is the
> ever increasing memory consumption.
>
> Since I do not need to keep previous Hamiltonians (for any kind of DIIS
> extrapolation), is there any way to deallocate all memory used by the
> Hamiltonian-related subroutines (at least once in a while, say, after 1000
> SCF iterations)?
>
> Alternatively, are there any input keywords that can ensure that the
> Hamiltonian structures are reset once in a while?
>
> Thank you in advance for your time and your suggestions.
>
> Best regards,
> Cindy Pham.
>
> --
> You received this message because you are subscribed to the Google Groups
> "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cp2k+unsubscribe at googlegroups.com<mailto:
> cp2k+unsubscribe at googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/cp2k/CAN4Jpm3f3BUuJ%2B3EDEuqpp0TbBEkaHfOjQm%2Bn9%3D6vYquYQNQvQ%40mail.gmail.com
> <
> https://groups.google.com/d/msgid/cp2k/CAN4Jpm3f3BUuJ%2B3EDEuqpp0TbBEkaHfOjQm%2Bn9%3D6vYquYQNQvQ%40mail.gmail.com?utm_medium=email&utm_source=footer
> >.
>
> --
> You received this message because you are subscribed to the Google Groups
> "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cp2k+unsubscribe at googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/cp2k/ZR0P278MB07591FF04A66D61DBAA83F3A9FCBA%40ZR0P278MB0759.CHEP278.PROD.OUTLOOK.COM
> .
>

-- 
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/CAN4Jpm0im9qEGXAe33QS3z2Tmr-codFJ9X%3DWT4g6LJa4CjQcAg%40mail.gmail.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20231004/1f20b213/attachment.htm>


More information about the CP2K-user mailing list