adc-connect / adcc

adcc: Seamlessly connect your program to ADC
https://adc-connect.org
GNU General Public License v3.0
32 stars 19 forks source link

Memory management #86

Closed Edumars closed 4 years ago

Edumars commented 4 years ago

Hello developers, I found that with adcc.memory_pool.initialise you can specify the amount of data will reside in RAM. I interpreted this as an upper limit to the amount of RAM memory the adcc code will use during the calculations. However, in my case a statement such as:

adcc.memory_pool.initialise(max_memory=70 * 1024 * 1024 * 1024)

to allocate, for example, 70GB does nothing, and the program goes well over this limit. I am not sure if it is necessary to import some library to make it work, or I am not using it properly. Any help would be greatly appreciated. Thanks a lot,

Edumars commented 4 years ago

In the example below, I run a system with 14 heavy atoms, and requested an ADC(2)/def2-TZVPD calculation. The value for the memory pool was:

adcc.memory_pool.initialise(max_memory=500 * 1024 * 1024 * 1024)

which translates as 500GB. It actually consumed 1200 GB (see the attached file with memory consumption drop after the adcc calculation stopped with the following error:

CPU time limit exceeded python

Thanks a lot for your help.

RAM

mfherbst commented 4 years ago

Hi @Edumars sorry for the delay in replying. I'm sorry to inform you that the max_memory is indeed not effective at the very moment. Unfortunately there really is no way to limit the amount of memory used by adcc. We added the max_memory flag in an older version of adcc where we still supported a backend which had a way to cap the maximal memory, but this is now no longer used by adcc. I'll edit the documentation to make this clearer.