FOCUS AREAS

Hot Topics

Using SAS on a Grid

The SAS Grid Manager components make grid enabled SAS applications available to a variety of SAS customers. SAS DI Studio 3.4 and SAS Enterprise Miner 5.2 have enhanced their integrated development environments (IDE) to provide grid automation by automatically generating SAS applications that are enabled to execute in a grid. Users of these applications can produce grid enabled SAS applications without any programming knowledge or knowledge of the underlying grid infrastructure. These SAS applications are able to detect the existence of a grid environment at run-time and distribute the execution accordingly. Furthermore, these grid enabled applications can be saved as SAS stored processes and subsequently executed by the SAS Business Intelligence components including Web Report Studio, Information Map Studio and the SAS Add-In for Microsoft Office.

Sample Program to Verify Grid Environment Setup

Sample Code to Grid Enable Existing SAS Programs

Key Definition for Automatic Program Submission to the Grid


Sample Program to Verify Grid Environment Setup

Click here for a sample program designed to verify the basic setup and configuration of a SAS grid environment. Be sure that you have completed the steps necessary to install and configure:

  1. the Platform Suite for SAS
  2. the SAS products and components licensed for your SAS grid environment.
before running this program.

Note: On UNIX systems, make sure that you have initialized the LSF environment by running one of the following (where % and $ represent UNIX command line prompts):

  1. Make sure that no one else is using the grid. Otherwise, the program might not finish because it requires all job slots to be free.
  2. Open the SAS Editor (by starting SAS).
  3. Cut and paste the gridtest.sas program into the editor:



Sample Code to Grid Enable Existing SAS Programs

Minimal modification is required to any existing SAS program that utilizes the parallel processing capabilities of SAS/CONNECT in order to use SAS Grid Manager in a grid environment. The following statements can be added either to your autoexec.sas file or to the beginning of your SAS program:

options metaserver='xxx.yyy.zzz.com';
options metaport=8561;
options metarepository='Foundation';
options metauser='userxyz';
options metapass='passwd';
%let rc=%sysfunc(grdsvc_enable(_all_, resource=SASMain));


Key Definition for Automatic Program Submission to the Grid

You can easily use the SAS Display Manager key definition capability to define a key that can be used to submit a SAS program in its entirety to a SAS grid environment with absolutely no change to the program that is being submitted to the grid. You might want to do this in order to allow the execution of multiple SAS programs from one or more SAS users to a virtualized pool of resources in order to:

The following steps describe how to set up such a key definition.

  1. Save the following statements to an external file (c:\gpre.sas for example).
    options noconnectpersist;
    options noconnectwait;
    options metaserver='dnnnn';
    options metaport=8561;
    options metarepository='Foundation';
    options metauser='sasdemo';
    options metapass='passwd';      /* should be encrypted password */
    
    %let rc=%sysfunc(grdsvc_enable(grid, resource=SASMain));
     signon grid;
    
  2. In a SAS Display Manager Session (DMS) open the keys window and enter the following for any available key (F12 for example):
    
    gsubmit "%include 'c:\gpre.sas';"; rsubmit;
    

You can then type or include any SAS program into your program editor and then press F12 and the program will be submitted to computing resources on your SAS grid instead of executed locally.

Notes of interest: