Statistical programming, matrix languages, and more

SAS/ IML ERROR: out of memory for symbols.

Reply
Occasional Contributor
Posts: 5

SAS/ IML ERROR: out of memory for symbols.

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!!

SAS Super FREQ
Posts: 4,239

Re: SAS/ IML ERROR: out of memory for symbols.

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."  

Occasional Contributor
Posts: 5

Re: SAS/ IML ERROR: out of memory for symbols.

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.
Occasional Contributor
Posts: 5

Re: SAS/ IML ERROR: out of memory for symbols.

I am computing matrices using macro variables, does symbol mean macro variables in this error?
SAS Super FREQ
Posts: 4,239

Re: SAS/ IML ERROR: out of memory for symbols.

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.

Occasional Contributor
Posts: 5

Re: SAS/ IML ERROR: out of memory for symbols.

Then there is no other way but to change my codes?

Thank you very much for your help!!! I really appreciate it!!!!!
Occasional Contributor
Posts: 5

Re: SAS/ IML ERROR: out of memory for symbols.

I really need to use both iml and macro.. is there any other ways to solve the error??????
SAS Super FREQ
Posts: 4,239

Re: SAS/ IML ERROR: out of memory for symbols.

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

Ask a Question
Discussion stats
  • 7 replies
  • 289 views
  • 0 likes
  • 2 in conversation