LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 27 Jun 2003 13:58:52 -0700
Reply-To:   cassell.david@EPAMAIL.EPA.GOV
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "David L. Cassell" <cassell.david@EPAMAIL.EPA.GOV>
Subject:   Re: insufficient memory allocation
Content-type:   text/plain; charset=us-ascii

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 16588832 more > . . .

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 your IML'er:

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 FREE up its storage space. Re-design your matrix calcs so you don't need such massive matrices.

I personally recommend #3 there.

HTH, David -- David Cassell, CSC Cassell.David@epa.gov Senior computing specialist mathematical statistician


Back to: Top of message | Previous page | Main SAS-L page