The OTHER SAS User <sas@SDAC.HARVARD.EDU> wrote:
> Proc iml;
> A=diag(Pi)*(I(&n)-diag(Pi)); **Here Pi is a 1 times 1440 vector.
But what your colleague is doing in this line requires working with
(at least one) 1440x1440 matrix! At 8 bytes per number, that's
16,588,800 bytes. Per matrix. Which is really wasteful here, since
this can be done in a less computational manner. You're only working
with the diagonal, so you cna do this as a vector calc, instead of a
full matrix calc.
> And getting the following error:
> Worksize = 262128
> Symbol size = 262128
> NOTE: IML Ready
> ERROR: (execution) Unable to allocate sufficient memory. At least
> . . .
So now you can see where that '16588832' could be coming from.
You may want to try starting PROC IML with a big WORKSIZE= value:
proc iml worksize=100000;
would request 100,000 K available for the WORKSIZE option. But IML
is supposed to allocate this stuff dynamically, so I have to wonder if
your colleague hasn't already clogged up all possible RAM before trying
to compute 'A'. So here are a few PROC IML tips you might suggest to
Use FREE to free matrices you're no longer using.
Use STORE if you have a large matrix you won't need for a bit, and then
up its storage space.
Re-design your matrix calcs so you don't need such massive matrices.
I personally recommend #3 there.
David Cassell, CSC
Senior computing specialist