Statalist


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

Re: st: SV: Re: Memory problems when creating a spatial weight matrix


From   "Sergiy Radyakin" <serjradyakin@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: SV: Re: Memory problems when creating a spatial weight matrix
Date   Wed, 26 Sep 2007 12:33:48 +0200

Hi Lina,

may be I am missing something, but  a matrix 500x500 at 4 bytes per
cell occupies 1MB of memory. At 8 bytes per cell 2MB respectively. How
does this relate to the 500/900MB of memory limit? As I understand,
your dataset is 800 observations and -spatwmat- produces a matrix
800x800.

Could you run the following and tell us what happens?

clear
set mem 100m   <-- or whatever your maximum is
set matsize 800
matrix Z=J(800,800,0)
matrix dir
matrix A=J(800,800,0)
matrix dir
matrix B=J(800,800,0)
matrix dir
matrix C=J(800,800,0)
matrix dir
use "mydata"   <--- whatever your dataset is

If it works fine, than it is not a memory issue, but rather you'd have
to look into the source code of -spatwmat- to find if the memory is
used there efficiently (e.g. it does not generate 800 temporary
matrices).




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