MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Will adding RAM help "No more memory available" error?

On 6/18/08 at 4:24 AM, enoel2 at (Erin Noel) 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?

Simply put, you haven't supplied enough information to determine
what is required to avoid the problem.

The amount of RAM needed for a given problem depends both on the
amount of data to be operated on and the code you use to preform
the operation.

For example consider the difference SparseArray can make.

In[9]:= s =
   SparseArray[{{1, 1} -> 1, {2, 2} -> 2, {3, 3} -> 3, {1, 3} ->
      4}, {50, 50}];

Out[10]= 704

In[11]:= m = Normal[s];

Out[12]= 10080

A simple Import of Excel files doesn't generate a SparseArray object.

But using SparseArray may not give any benefit for you. It would
depend on the data set and the operations you do.

In general, more RAM will always help. But it is relatively easy
to write code so that adding the maximum RAM possible for your
system will not help.

  • Prev by Date: How to get a ordered text combining Text and values
  • Next by Date: Re: Manipulate[] data input
  • Previous by thread: Re: Will adding RAM help "No more memory available" error?
  • Next by thread: Re: Will adding RAM help "No more memory available" error?