DATA Step, Macro, Functions and more

How to increase memory to create charts?

Reply
Regular Contributor
Posts: 168

How to increase memory to create charts?

When I tried to create charts (bar/pie) in SAS EG I got error as

ERROR: Unable to allocate sufficient memory. At least 469K bytes were requested, but only 45K were available. You must either

       increase the amount of memory available, or approach the problem differently.

ERROR: Driver SASGDGIF will not load.

It went vain when I tried to increase the memsize=512k (options memsize=512k). I did ran the below code and found that MEMSIZE=4294967296 is allocated for my ID. Any ideas\tips to create charts in SAS EG?

Super User
Posts: 7,762

Re: How to increase memory to create charts?

memsize is an option that can only be set at initialization. So you do it either on the commandline when starting SAS or, in the case of the workspace server, in a configuration file (sasv9_usermods.cfg in the WorkspaceServer directory).

Which code did you run?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Regular Contributor
Posts: 168

Re: How to increase memory to create charts?

Posted in reply to KurtBremser

I ran it in SAS EG as soon as I start my session.

see the log below.

options memsize=512k;

                   _______

                   30

WARNING 30-12: SAS option MEMSIZE is valid only at startup of the SAS System. The SAS option is ignored.

Super User
Posts: 7,762

Re: How to increase memory to create charts?

do:

proc options;

run;

and then look for the MEMSIZE= line in the log. This tells you the current setting.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Regular Contributor
Posts: 168

Re: How to increase memory to create charts?

Posted in reply to KurtBremser

I ran your code and found MEMSIZE=4294967296. Please suggest how to increase the memsize via command line.

Super User
Posts: 7,762

Re: How to increase memory to create charts?

Since you have 4GB of memory available through the SAS configuration, I suspect that other limits come into play.

If you have the option of running system calls (no NOXCMD on the workspace server), you can do:

filename oscmd pip "ulimit -d";

data _null_;

infile oscmd;

input;

put _infile_;

run;

You will find the data size limit imposed by the operating system in the log.

Could you also post the code for the chart, and info about the data?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Regular Contributor
Posts: 168

Re: How to increase memory to create charts?

Posted in reply to KurtBremser

Thanks again for your swift response.

I did ran your code in SAS EG and got the error as follows.

15         filename oscmd pip "ulimit -d";
ERROR: Invalid device type.
ERROR: Error in the FILENAME statement.
16        
17         data _null_;
18        
19         infile oscmd;
20        
21         input;
22        
23         put _infile_;
24        
25         run;

ERROR: No logical assign for filename OSCMD.

Please see my code (and log) below to create charts.

proc univariate data=sashelp.class;
16               var age height;
17               histogram age;
18            run;

ERROR: Unable to allocate sufficient memory. At least 469K bytes were requested, but only 45K were available. You must either
       increase the amount of memory available, or approach the problem differently.
ERROR: Driver SASGDGIF will not load.
ERROR: Device was not specified.
ERROR: Unable to load graphics.

I'm getting the same error when I tried to produce chart (in EG) manually from the SAS dataset.

Super User
Posts: 7,762

Re: How to increase memory to create charts?

Typo by me.

It should be

filename oscmd pipe ....

Please try that.

Just ran your code with my memory restrictions (MEMSIZE=201326592, 192 MB) all right.

The error is not data/procedure driven (since the dataset has only 19 obs and therefore max 19 distinct values), you really have a problem loading the graphics driver.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 7,762

Re: How to increase memory to create charts?

Just found something by googling for "ERROR: Driver SASGDGIF will not load"

13920 - "Unable to allocate sufficient memory" or "SASGDGIF will not load"errors received when expor...

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Regular Contributor
Posts: 168

Re: How to increase memory to create charts?

Posted in reply to KurtBremser

Now got this error.

filename oscmd pipe "ulimit -d";
ERROR: Insufficient authorization to access PIPE.
ERROR: Error in the FILENAME statement.
16        
17         data _null_;
18        
19         infile oscmd;
20        
21         input;
22        
23         put _infile_;
24        
25         run;

ERROR: No logical assign for filename OSCMD.





























Super User
Posts: 7,762

Re: How to increase memory to create charts?

That simply means that you operate under the NOXCMD commandline option.

Next, try

options maxmemquery=6MB;

as described in SAS note 13920 before running the step again.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 10 replies
  • 1448 views
  • 0 likes
  • 2 in conversation