Skip to content
Snippets Groups Projects

Add license blurb to SAS page.

Merged Adam Caprez requested to merge sas into master
1 file
+ 75
70
Compare changes
  • Side-by-side
  • Inline
+++
+++
title = "Running SAS at HCC"
title = "Running SAS at HCC"
description = "How to run SAS on HCC resources."
description = "How to run SAS on HCC resources."
+++
+++
- [Running SAS through the command line](#sas-on-hcc-clusters)
- [Running SAS through the command line](#sas-on-hcc-clusters)
- [Running SAS on JupyterHub](#sas-on-jupyterhub)
- [Running SAS on JupyterHub](#sas-on-jupyterhub)
- [Running SAS on Anvil](#sas-on-anvil)
- [Running SAS on Anvil](#sas-on-anvil)
This quick start demonstrates how to implement a SAS program on
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
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](https://github.com/unlhcc/job-examples).
downloaded from [HCC's job-examples git repository](https://github.com/unlhcc/job-examples).
## SAS on HCC Clusters
{{% notice info%}}
SAS applications can be ran on HCC clusters similar to other jobs.
SAS is licensed software; users must have access to an existing license via an academic department or unit to use SAS on HCC resources.
[Connect to a HCC cluster]({{< relref "../../connecting/" >}}) and make a subdirectory
If you a current SAS user and would like to arrange for access on HCC machines, please contact hcc-support@unl.edu.
called `sas_demo` under your `$WORK` directory.
{{% /notice %}}
In the subdirectory `sas_demo`, save the sas code. Here we include a single demo
## SAS on HCC Clusters
programs, `t_test.sas`, to perform a t test analysis on a small data set.
SAS applications can be ran on HCC clusters similar to other jobs.
[Connect to a HCC cluster]({{< relref "../../connecting/" >}}) and make a subdirectory
[t_test.sas](https://raw.githubusercontent.com/unlhcc/job-examples/master/sas/t-test.sas)
called `sas_demo` under your `$WORK` directory.
In the subdirectory `sas_demo`, save the sas code. Here we include a single demo
programs, `t_test.sas`, to perform a t test analysis on a small data set.
---
[t_test.sas](https://raw.githubusercontent.com/unlhcc/job-examples/master/sas/t-test.sas)
#### 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.
#### Creating a Submit Script
[sas.submit](https://raw.githubusercontent.com/unlhcc/job-examples/master/sas/sas.submit)
Create a submit script to request one core (default) and 10-min run time
#### Submit the Job
on the supercomputer. The name of the main program enters at the last
line.
The job can be submitted through the command `sbatch`. The job status
can be monitored by entering `squeue` with the `-u` option.
[sas.submit](https://raw.githubusercontent.com/unlhcc/job-examples/master/sas/sas.submit)
{{< highlight bash >}}
#### Submit the Job
$ sbatch sas.submit
$ squeue -u <username>
The job can be submitted through the command `sbatch`. The job status
{{< /highlight >}}
can be monitored by entering `squeue` with the `-u` option.
Replace `<username>` with your HCC username.
{{< highlight bash >}}
$ sbatch sas.submit
#### Sample Output
$ squeue -u <username>
{{< /highlight >}}
The results of the t-test are computed and printed to the `.lst` file
Replace `<username>` with your HCC username.
## SAS on JupyterHub
Sas can also be run on Jupyter notebook environments available through [HCC Open OnDemand]({{< relref "../../open_ondemand/connecting_to_hcc_ondemand/" >}}). [Launch a jupyter notebook session]({{< relref "../../open_ondemand/virtual_desktop_and_interactive_apps/" >}}). After the Jupyter Notebook session starts, select `SAS` from the `New` dropdown box.
#### Sample Output
{{< figure src="/images/jupyterNew.png" >}}
The results of the t-test are computed and printed to the `.lst` file
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 JupyterHub
{{< figure src="/images/jupyterCode.png" >}}
Sas can also be run on Jupyter notebook environments available through [HCC Open OnDemand]({{< relref "../../open_ondemand/connecting_to_hcc_ondemand/" >}}). [Launch a jupyter notebook session]({{< relref "../../open_ondemand/virtual_desktop_and_interactive_apps/" >}}). After the Jupyter Notebook session starts, select `SAS` from the `New` dropdown box.
{{< figure src="/images/jupyterNew.png" >}}
## SAS on Anvil
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 can also be ran on a Windows 10 instance on anvil. This allows SAS scripts to be run with a full GUI environment.
{{< figure src="/images/jupyterCode.png" >}}
Start off creating a `Windows 10 SAS` instance from the [Anvil dashboard](https://anvil.unl.edu/). [Create an instance]({{< relref "../../anvil/creating_an_instance.md" >}}) and use the image labeled `Windows 10 SAS`. Once the instance is fully launched, [connect to the instance]({{< relref "../../anvil/connecting_to_windows_instances.md" >}}) using the retrieved password. After connecting to the instance and logging , SAS can be launched from the desktop shortcut.
{{< figure src="/images/sasAnvilDesktop.png" height="450" >}}
## SAS on Anvil
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.
{{< figure src="/images/sasAnvil.png" height="450" >}}
SAS can also be ran on a Windows 10 instance on anvil. This allows SAS scripts to be run with a full GUI environment.
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.
{{< figure src="/images/sasAnvilResults.png" height="450" >}}
Start off creating a `Windows 10 SAS` instance from the [Anvil dashboard](https://anvil.unl.edu/). [Create an instance]({{< relref "../../anvil/creating_an_instance.md" >}}) and use the image labeled `Windows 10 SAS`. Once the instance is fully launched, [connect to the instance]({{< relref "../../anvil/connecting_to_windows_instances.md" >}}) using the retrieved password. After connecting to the instance and logging , SAS can be launched from the desktop shortcut.
\ No newline at end of file
{{< figure src="/images/sasAnvilDesktop.png" height="450" >}}
 
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.
 
{{< figure src="/images/sasAnvil.png" height="450" >}}
 
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.
 
{{< figure src="/images/sasAnvilResults.png" height="450" >}}
Loading