Re: How to kill slave kernel securely?
- To: mathgroup at smc.vnet.net
- Subject: [mg117519] Re: How to kill slave kernel securely?
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Mon, 21 Mar 2011 06:17:10 -0500 (EST)
----- Original Message ----- > From: "Alexey Popkov" <lehin.p at gmail.com> > To: mathgroup at smc.vnet.net > Sent: Saturday, March 19, 2011 5:22:07 AM > Subject: [mg117474] Re: How to kill slave kernel securely? > Oliver Ruebenkoenig <ruebenko at wolfram.com> wrote: > > On Thu, 10 Mar 2011, Alexey Popkov wrote: > > > 2) My bitter experience with MemoryConstrained clearly shows that > > > it is > not > > > a reliable function. It practical cases when I heavily use such > functions as > > > NDSolve, NIntegrate etc. it often allows MathKernel to take for > > > example > > > 500-900 MB more that I have set. And system goes into swapping... > > > > You could forward that to the tech support for us to look at. > > > > Oliver > > I have found today a simple example when MemoryConstrained fails: > > In[1]:= MaxMemoryUsed[] > MemoryConstrained[ > Quiet@Module[{f, n = 0}, > f[x_] := f[x + 1] + Plus @@ Table[Random[], {10^7}]; > Block[{$RecursionLimit = 3000}, f[0]]];, 90000000]; > MaxMemoryUsed[] > > Out[1]= 10757752 > > Out[3]= 291258232 > > You can see that MathKernel takes more than 260 Mb additional memory > in peak > although only less than 90 Mb additional memory was allowed by > MemoryConstrained. This behavior is machine-dependent. Try to play > with the > memory constrain if you cannot reproduce. > > As I said before, my experience shows that in practice the overshoot > can be > 900 Mb and more! This often happens in complicated computations with > heavy > usage such functions as NDSolve and NIntegrate inside loops. > > Alexey That MemoryConstrained returns $Aborted. What exactly do you mean by the claim that it fails? That it does not also account for subroutine stack space/ I believe that was already explained. Daniel Lichtblau Wolfram Research