Statalist The Stata Listserver


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

st: Mata memory


From   Christopher Baum <[email protected]>
To   [email protected]
Subject   st: Mata memory
Date   Mon, 23 Oct 2006 14:56:55 -0400

Jeph said

Using -xtmixed- to fit a simple random-intercept model (however
on >1million obs) I get:

       _xtm_mixed_ll_uu():  3900  unable to allocate real <tmp>[1569048,51]
        _xtm_mixed_ll_u():     -  function returned error
         _xtm_em_iter_u():     -  function returned error
           _xtm_em_iter():     -  function returned error
                  <istmt>:     -  function returned error
r(3900);

I understand that this means Mata ran out of memory, but I'm a bit
puzzled by the explanation of r(3900) that there is nothing I can do-
it's between Mata and the OS (xp, 4gb). Usually when Stata reports
out of memory, I know what I can do (drop variables, compress them,
allocate more). Is it the case here that my model simply requires
a certain matrix of a certain size, and Mata cannot allocate it
because of hardware limitations? Or can I find Mata some more
memory by reducing what Stata needs otherwise? Any insight appreciated.



You're trying to allocate a 1.5 million row x 51 column matrix-- about 80 million elements--which given Mata's 8-bit  floating point data type requires about 625 Mb all by itself. Applying this estimator involves, apparently,. a 51 column matyrix, and unless you have that kind of free memory to spare, you can't do it. I imagine in the 32-but XP context that is a hardware constraint that could only be relaxed by moving to a 64-bit OS that knows how to allocate memory.

Kit

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics with Stata:
http://stata-press.com/books/imeus.html
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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