Skip to content

SAS

Description

sas website

SAS is an integrated system of software products provided by SAS Institute Inc. that enables programmers to perform a variety of statistical analyses.

Environment Modules

Run module spider sas to find out what environment modules are available for this application.

Environment Variables

  • HPC_SAS_DIR - installation directory
  • HPC_SAS_BIN - executable directory

Additional Usage Information

Helpful Commands:

Command Function
-nodms This stops SAS from using its GUI capability and goes into a text only mode.
-filelocks fail This causes SAS to stop and print out an error when multiple sas processes try to use the same file.
-nonews Prevents SAS from printing a useless header to the output.
-memsize xxxxM Specifies the total amount of memory that is available to each SAS session, and places an enforced limit on the amount of virtual memory that SAS can dynamically allocate at any one time.
-realmemsize xxxxM Sets the recommended upper limit on working memory for procedures that can use both memory and utility disk space, such as PROC SUMMARY and PROC SORT, so that they can avoid virtual memory thrashing.
-work $TMPDIR The directory where SAS should store its temporary files. Using $TMPDIR will allow your program to run much faster and prevent any network-related file access issues that SAS is prone to run into.
-sysin file Designate a file for SAS to load as its input.

Batch Submission:

To do a batch submission of a SAS script use the -sysin command line option and write all of your SAS commands in a file. In this way you can submit jobs to the batch queue system to run your jobs on the cluster.

Work Directory:

SAS is a mature product with a long history behind it. In a modern high-performance environment it means that additional actions need to be taken to mitigate potential issues stemming from SASs focus on filesystem I/O instead of using memory.

Warning

For users of PHI and FERPA: It is particularly important to set your working directory to be in your project's PHI/FERPA configured directory in /blue when working with SAS. Writing files to /home or $TMPDIR could expose restricted data to unauthorized users.

Interactive Use:

See our GUI Programs Help Page to learn how to run the Graphical SAS interface for short debugging sessions.

Job Script Examples

Below is a sample SLURM script that uses SAS:

#!/bin/bash
#
#SBATCH --name=sas_job
#SBATCH --output=sas_%j.out
#SBATCH --mail-type=END,FAIL #Only email summary and failure reports
#SBATCH --mail-user=your_email_address  # Where to send mail    
#SBATCH --ntasks=1                      # Run a single task
#SBATCH --cpus-per-task=1               # Run on a single cpu
                                        #  --can change this for more cores
#SBATCH --mem=1gb                       # Memory limit
#SBATCH --time=01:00:00                 # Run for up to one hour
date;hostname;pwd

module load sas

sas -memsize 1024M -nodms -nonews -work $TMPDIR -filelocks none -sysin sas.inp

Categories

statistics, data_science