Prev: Volcanic Ash Cloud over Europe in 14 lines of Mathematica
Next: Easy way to label graphics grids?
From: ValeX on 19 Apr 2010 05:59 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?
From: ValeX on 19 Apr 2010 06:48 i forgot to say that i have mathematica 6.03 and that to check the used memory i use MemoryInUse[]
From: Alexey Popkov on 20 Apr 2010 05:48 "ValeX" <rjovale(a)gmail.com> �������/�������� � �������� ���������: news:hqh9i9$eo3$1(a)smc.vnet.net... > is it that maybe i've got to clear some specific place other than the > history and Global? Yes. The internal memory management in Mathematica is far from that is expected. The only way to avoid this (as I know) is to use the MathLink and NETLink. It is possible to control the memory usage of working MathKernel by another MathKernel (that may be called as MasterKernel). The MasterKernel just commands WorkingKernel to evaluate some command and then saves the result. If the memory used by WorkingKernel is larger that you want the MasterKernel terminates the WorkingKernel and starts another WorkingKernel with new command. If you are interested in details I can explain more. Alexey Popkov
From: ValeX on 20 Apr 2010 05:50 guys, i might have found the culprit. In the Do loop i have four NIntegrate and once i added to them: Method->{Automatic,"SymbolicProcessing"->0} the memory used per grid point went almost to zero. This means that i couldn't free the memory associated with symbolic processing. correct? any ideas about this?
From: Vince Virgilio on 20 Apr 2010 05:51 On Apr 19, 6:48 am, ValeX <rjovale(a)gmail.com> wrote: > i forgot to say that i have mathematica 6.03 and that to check the > used memory i use MemoryInUse[] MemoryInUse has not served me well---I consider it a toy. Not sure how it's working for you. But you might have to resort to some OS-level tool against the Mathematica process, as I did. For example, I follow MathKernel.exe resource use in Windows Task Manager or perfmon.msc. Vince Virgilio
|
Next
|
Last
Pages: 1 2 Prev: Volcanic Ash Cloud over Europe in 14 lines of Mathematica Next: Easy way to label graphics grids? |