BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
fengyuwuzu
Pyrite | Level 9

I am running a simple regression with the following code, with a data file, 21M in size, 4 columns (ID, date, amount, count), 300204 obs. I tested the code on a smaller size sample (2457 obs) and it ran smoothly. But with this larger sample (300204 obs), I got an error message after running about 23 hours. The message says:

sas.exe has stopped working.

A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.

Then a button "close program".

 

proc printto log="D:\Analysis\30days.log";   /* to print log to a file */
run;
ods table parameterEstimates=ana30.logfile; /* to save coefficients */ PROC REG DATA=ana30.mydata; BY ID ; MODEL amount= count ; RUN;

Then in the windows event log, I saw 4 errors:

Critical SAS error:  Write Access Violation REG Exception occurred at (65a9f27)

Critical SAS error:  Write Access Violation REG Exception occurred at (1e49c0b)

Critical SAS error:  Write Access Violation REG Exception occurred at (1e49afa)

Critical SAS error:  Stack overflow detected REG Exception occurred at (4e849fc)

 

I have no idea which board to ask this question, and just try here and hope someone can give me some hints

 

Thank you very much!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Rick's answer is correct - most likely the QUIT is the issue.

 

proc printto log="D:\Analysis\30days.log";   /* to print log to a file */
run;

ods graphics off;
ods select parameterEstimates;
ods table parameterEstimates=ana30.logfile; /* to save coefficients */
PROC REG DATA=ana30.mydata;
   BY ID ;
   MODEL amount= count ;
RUN;
QUIT;

View solution in original post

9 REPLIES 9
Reeza
Super User

What does your SAS log say?

 

Your data doesn't appear complex enough to cause any space issues...

 

24 hours also seems like way too long for a 300K file

PGStats
Opal | Level 21

Similar thing happened to me and often goes away after restarting SAS. If it doesn't, you should open a ticket with SAS Tech Support.

PG
Rick_SAS
SAS Super FREQ

I see a several problems with your code:

  1. If ODS GRAPHICS are on, this will produce a bunch of graphs.  Be sure to explicitly set ODS GRAPHICS OFF;
  2. Use ODS SELECT ParameterEstiamtes to suppress the other output tables.
  3. I am not familiar with the ODS TABLE statement. I do not see it in the documentation. I presume you meant to use ODS OUTPUT
  4. Because PROC REG is an interactive procedure, the PROC REG statement will not create the ODS OUTPUT until you type QUIT.  Use the QUIT stataement in place of the RUN statement to exit PROC REG.
Reeza
Super User

@Rick_SAS ODS Table is correct - and it can be used before proc. If you're also suppressing output then you have to use ODS output, so it's preferable to use ODS OUTPUT in general.

Rick_SAS
SAS Super FREQ

As far as I can tell, ODS TABLE is not a documented statement.

Reeza
Super User

Rick's answer is correct - most likely the QUIT is the issue.

 

proc printto log="D:\Analysis\30days.log";   /* to print log to a file */
run;

ods graphics off;
ods select parameterEstimates;
ods table parameterEstimates=ana30.logfile; /* to save coefficients */
PROC REG DATA=ana30.mydata;
   BY ID ;
   MODEL amount= count ;
RUN;
QUIT;
fengyuwuzu
Pyrite | Level 9

Thank you for your replies and suggestions. I was doing something else so I did not follow up in time.

 

I googled and found the solution (hopefully) http://support.sas.com/kb/54/246.html

 

They have a hot fix and I just installed and followed their instructions.

 

I also use data from the work temporary library, not from the permanent library. Maybe this can be faster too.

 

I just output to the log, saving time to write log to the file (last time I got a message telling me log is full so I used this option). I forgot to clear the log last time before submitting the program.

 

Will see tomorrow if I have program again.

fengyuwuzu
Pyrite | Level 9

Thank you, . With your code, there was no error any more, and it ran much much faster.

 

Sorry that I did not come back to update in time. Was testing running SAS on a high performance computation facility (Linux).

One thing worthy to mention is, I tested my original program, which gave error on my windows7 PC, but it did not have any issue running on the HPC facility. And it finished much faster. I guess the HPC system has a much higher I/O (and of course faster CPU too).

LinusH
Tourmaline | Level 20

Renamed to better specify the contents of the thread.

Data never sleeps

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 9 replies
  • 2650 views
  • 0 likes
  • 5 in conversation