Running SAS at HCC

This quick start demonstrates how to implement a SAS program on HCC supercomputers through the command line and JupyterHub, and on HCC’s Anvil platform. The sample code and submit scripts can be downloaded from HCC’s job-examples git repository.

SAS on HCC Clusters

SAS applications can be ran on HCC clusters similar to other jobs. Connect to a HCC cluster and make a subdirectory called sas_demo under your $WORK directory. 

In the subdirectory sas_demo, save the sas code. Here we include a single demo programs,, to perform a t test analysis on a small data set.

Creating a Submit Script

Create a submit script to request one core (default) and 10-min run time on the supercomputer. The name of the main program enters at the last line.


Submit the Job

The job can be submitted through the command sbatch. The job status can be monitored by entering squeue with the -u option.

$ sbatch sas.submit
$ squeue -u <username>

Replace <username> with your HCC username.

Sample Output

The results of the t-test are computed and printed to the .lst file

SAS on JupyterHub

Sas can also be run on Jupyter notebook environments available through HCC Open OnDemand. Launch a jupyter notebook session. After the Jupyter Notebook session starts, select SAS from the New dropdown box.

Here you can run code in the notebook’s cells. The SAS code is then ran when you click on the “play” icon or pressing the shift and enter keys simultaneously.

SAS on Anvil

SAS can also be ran on a Windows 10 instance on anvil. This allows SAS scripts to be run with a full GUI environment.

Start off creating a Windows 10 SAS instance from the Anvil dashboard. Create an instance and use the image labeled Windows 10 SAS. Once the instance is fully launched, connect to the instance using the retrieved password. After connecting to the instance and logging , SAS can be launched from the desktop shortcut.

From here sas scripts can be ran from the editor at the bottom of the SAS window. Scripts can also be opened from a script file on the Anvil instance.

Executing a script is done at the top of the SAS window Run and click Submit. When the script finishes executing, the results will be displayed.