Using GAUSS 21, I am estimating a Bayesian model that needs a large number of iterations. There seems to be a problem with GAUSS allocating some part of the RAM and not releasing it to the system, after each iterations. And these unreleased memory build up and after about 7000 iterations the system crashes because the RAM reaches 100% usage, which is my main problem.
Interestingly, even when I stop the code and use "new;" to clean the data in memory, the problem still persists. In other words, even after that windows 10 task manager shows that a large portion of the RAM is being occupied by GAUSS. (I have 24GB of RAM on my computer). It only goes away if I close the GAUSS window, and open it again.
- I use threading for one of my loops in each iterations.
- The size of all the matrices and arrays are fixed. In other words their sizes do not change from one each iteration to another.
- In each iteration the value of each matrix gets updated with values that are about the same magnitude of previous ones. That is, there is not much variations in data from one iteration to the next ones. (In other words, no large number or very small number is produced during the estimation process).
Is there any way to deal with this issue? In other words, can I stop GAUSS from taking up memory and not releasing it?