Desktop productivity for business analysts and programmers

Insufficient memory

Accepted Solution Solved
Reply
Contributor
Posts: 20
Accepted Solution

Insufficient memory

Hello everybody, 

 

I submitted the following code: 

proc sort data=WORK.FAMA3CONDITION out=date (keep=date) nodupkey;
by date;
run;

proc surveyselect data=WORK.date out=outbootdate /*we tell the input and output dataset name*/
seed=30459584 /*We specify a random seed*/
method=urs /*We specify the type of random sampling (simple random sampling with replacement here)*/
samprate=1 /*In order to get a sample of the same size as our original data set, equal to 1 to have 100% sample*/
outhits /*makes sure that it generates an output record every time it hits a given record, rather than only the first time*/
reps=1000; /*replicates the number of sample*/
run;

data outbootdate_1;
set outbootdate;
link=00;
run;

data FAMA3CONDITION_1;
set FAMA3CONDITION;
link=00;
run;

proc sql ;
create table new_boot
as select
a.*,b.*
from outbootdate_1 as a
left join FAMA3CONDITION_1 as b on a.link=b.link and a.date=b.date;
quit;

proc sort data=new_boot out= new_boot_1;
by replicate id date;
run;

proc reg data=new_boot_1 outest=new_boot_2;
model TRUEPERF = MKT SMB HML;
by Replicate id;
run;

 

And it delivers the following message in the log:

 ERROR: The SAS System stopped processing this step because of
insufficient memory.
WARNING: The data set WORK.NEW_BOOT_2 may be incomplete. When
this step was stopped there were 546738 observations
and 11 variables.

 

I tried to add 
options memsize=max; 

in my code but I received a warning message telling me I had to modify SAS configuration file

 

I used then the code 
proc options option = memsize; r

run; 

to obtain the path and modify the sasv9.cfg file

I changed memsize from 2G to MAX and save the changes. 

 

These are the info in the log about the memory: 

Group=MEMORY
SORTSIZE=1073741824      Specifies the amount of memory that is available to the SORT procedure.
SUMSIZE=0      Specifies a limit on the amount of memory that is available for data summarization procedures when class variables are active.
MAXMEMQUERY=0      Specifies the maximum amount of memory that  is allocated for procedures.
MEMBLKSZ=16777216     Specifies the memory block size for Windows memory-based libraries.

MEMMAXSZ=2147483648   Specifies the maximum amount of memory to  allocate for using memory-based libraries.
LOADMEMSIZE=0 Specifies a suggested amount of memory that is needed for executable programs loaded by SAS.
MEMSIZE=5866245120  Specifies the limit on the amount of virtual  memory that can be used during a SAS session.
REALMEMSIZE=0 Specifies the amount of real memory SAS can  expect to allocate.

 

I launched again my code but once again I obtain the same error message. 

 

Does some have a solution for me please? 

 

Thanks a lot!! 


Accepted Solutions
Solution
‎04-08-2018 11:04 AM
Respected Advisor
Posts: 4,791

Re: Insufficient memory

[ Edited ]

@Max05

The SAS log indicates that the memory issues occur within your last step (proc reg ... outest=new_boot_2 )

That's the step you need to look into.

I don't have the expertise to give you advice on how to formulate less memory intensive code for Proc Reg but if you're executing this out of SAS EG then it's may be worth looking into the following: http://support.sas.com/kb/40/480.html 

 

View solution in original post


All Replies
Solution
‎04-08-2018 11:04 AM
Respected Advisor
Posts: 4,791

Re: Insufficient memory

[ Edited ]

@Max05

The SAS log indicates that the memory issues occur within your last step (proc reg ... outest=new_boot_2 )

That's the step you need to look into.

I don't have the expertise to give you advice on how to formulate less memory intensive code for Proc Reg but if you're executing this out of SAS EG then it's may be worth looking into the following: http://support.sas.com/kb/40/480.html 

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 345 views
  • 0 likes
  • 2 in conversation