Re: cant free ram..
- To: mathgroup at smc.vnet.net
- Subject: [mg109277] Re: cant free ram..
- From: Vince Virgilio <blueschi at gmail.com>
- Date: Tue, 20 Apr 2010 05:50:55 -0400 (EDT)
- References: <firstname.lastname@example.org>
On Apr 19, 5:59 am, ValeX <rjovale at gmail.com> wrote: > i'm running a Do loop over a grid of points, say 100x100. > the problem is that for every grid point the ram used increases by 1.4 > MB and so i cant actually finish the evaluation > [100x100x1.4 is roughly 14GB] > > of all the outputs i need only 3 numbers per grid point and so i tried > the following: > > ClearAll[all the variables i used and i dont need anymore]; > ClearSystemCache; > Unprotect[In, Out]; Clear[In, Out]; Protect[In, Out]; > > but the memory does not go down... > even if i do Remove["Global`*"] nothing happens. > > in the Do loop i do a bunch of things like FindRoot, Interpolation, > NDSolve, NIntegrate, .. > is it that maybe i've got to clear some specific place other than the > history and Global? Some oblique advice . . . Mathematica has internal caches that cannot be cleared by the user in a single kernel session. And they grow, and grow. Not to the casual observer or user, but yet they grow. They work in such a way that repeated evaluations of essentially the same expression (say, a largish simulation) irreversibly consume significant memory. For my problems, this drove me to partition the "grid", run each partition, save to disk, and restart the kernel, between partitions. Fare well, Vince Virgilio