[Date Index] [Thread Index] [Author Index]
Re: Will adding RAM help "No more memory available" error?
On Wed, Jun 18, 2008 at 11:24, Erin Noel <enoel2 at gmail.com> wrote: > I have a rather large program the imports data from excel (approximately > 600x200) and runs a monte carlo simulation on that data. For large numbers > of iterations, roughly about 5000, Mathematica runs out of memory and > returns the following error: > > No more memory available. > Mathematica kernel has shut down. > Try quitting other applications and then retry. > > My question doesn't relate specifically to my code, which is why I am not > including any details of it. Generally speaking, will adding RAM to the > system help prevent this error? > Are there any other general methods for > decreasing the likelihood of this error that aren't code-specific? Not really. It is possible that this is because of a flaw in your code and adding RAM will not fix it. It is also possible that the calculation is just too big (in this case adding RAM may help), but I strongly suggest to try to optimize the code first. Any suggestion will involve code modifications, so I cannot say much ... Learning about packed arrays may turn out to be very useful. There's also Share (which might actually increases mem usage a little before decreasing it) and $HistoryLength = 0 can be useful, too.