Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: insufficient memory for matrix 11 r(950)


From   "Sergiy Radyakin" <serjradyakin@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: insufficient memory for matrix 11 r(950)
Date   Tue, 29 Jul 2008 13:50:24 -0400

Dear Jennifer,

matrices are stored in a separate memory location from data. By
expanding the memory allocated for data, you are making things WORSE,
eating up memory, which could otherwise be used to store your
matrices.

Also, do not neglect estimating how much memory you are about to consume:

di 8*438*438*1100/1024/1024
1610.0189
^^^^^^^^^^^^^^^^^MB

Actual consumption is necessarily larger, because of an overhead.
Perhaps someone from Stata, Corp could clarify how much of an overhead
is present, but I guess you must account for R*4*33 bytes for row and
column names (here R is from set matsize R), but then the estimate
overshoots the value reported in maxsize usage.

If you are using Stata 32 - you probably have a very small chance of
storing all these matrices simultaneously.

Note that when you request a memory use report ( -memory- ) memory
consumption is split into two parts: data and other. Grand total must
be however always <2GB on a 32-bit machine, and in practice quite a
lot less.

Hope this helps.

Best regards,
   Sergiy Radyakin



On 7/29/08, Victor, Jennifer Nicoll <jnvictor@pitt.edu> wrote:
> I am receiving a memory error while trying to create (and store) many matrices simultaneously.  Increasing the memory allocation to Stata (set mem 1g) does not help.  Essentially, I am taking an nx1 vector and multiplying it by its transpose to create a 438x438 matrix.  I'm doing this 1100 times and then need to add all 1100 matrices together.  State gives me the error "insufficient memory for matrix 11 r(950)" around matrix 440 (or 700 depending on the trial).  Advice?
>
> ___________________________________________
> Jennifer Nicoll Victor
> Assistant Professor
> Department of Political Science
> University of Pittsburgh
> 4600 Wesley W. Posvar Hall
> (412) 624-7204
> E-mail:  jnvictor@pitt.edu
> Homepage:  http://www.pitt.edu/~jnvictor
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index