BookmarkSubscribeRSS Feed
janis_
Calcite | Level 5

I'm running simulations and the number of repetitions is 100.

When I run the program 100 times, n=30 it works but then when I increase n to n=100 then the out of memory for symbols error shows up.

 I try changing the symsize and worksize .. still it didn't work..

I don't get my problem..

 

Thankful for any help I can get!!

7 REPLIES 7
Rick_SAS
SAS Super FREQ

The number of symbols should not change when you increase the number of simulations. Please post the exact error message that you are getting along with your program.

 

If you are concatenating the results from successive iterations, you might be running low on RAM. (However, usually there is no need to concatenate large matrices.) If the RAM is insufficient, use the -MEMSIZE option to increase your RAM, as shown in this article "Large matrices in SAS/IML."  

janis_
Calcite | Level 5
I think it's not the RAM problem because it doesn't work when I running the program once.. Also I didn't change the number of symbols..
The exact error message is,
ERROR: Out of memory for symbols. Cannot proceed.
janis_
Calcite | Level 5
I am computing matrices using macro variables, does symbol mean macro variables in this error?
Rick_SAS
SAS Super FREQ

Because SAS/IML has control structures such as DO loops and IF/THEN statements, it is almost never necessary to use macro programming in IML simulation programs.  If you are creating a bunch of symbols like x&i and y&k, then you are using lots of memory because you are keeping the results from every step of the simulation. 

 

Here are some examples of simulation in SAS/IML. Perhaps they will be helpful:

How to generate multiple samples from the multivariate normal distribution

Simulating data for a logistic regression model

Generate a random sample from a mixture distribution

Simulate a drunkard's walk

 

The book Simulating Data with SAS contains hundreds of examples that show how to simulate efficiently in SAS.

janis_
Calcite | Level 5
Then there is no other way but to change my codes?

Thank you very much for your help!!! I really appreciate it!!!!!
janis_
Calcite | Level 5
I really need to use both iml and macro.. is there any other ways to solve the error??????
Rick_SAS
SAS Super FREQ

I do not know; you have not posted your program and I cannot guess what you are doing.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 7 replies
  • 1450 views
  • 0 likes
  • 2 in conversation