Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HCC docs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Holland Computing Center
HCC docs
Commits
0dd79cfb
Commit
0dd79cfb
authored
4 years ago
by
Caughlin Bohn
Browse files
Options
Downloads
Patches
Plain Diff
Sas on clusters
parent
cafbe868
Branches
Branches containing commit
No related tags found
1 merge request
!252
Running SAS on HCC
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
content/applications/app_specific/running_sas.md
+145
-0
145 additions, 0 deletions
content/applications/app_specific/running_sas.md
with
145 additions
and
0 deletions
content/applications/app_specific/running_sas.md
0 → 100644
+
145
−
0
View file @
0dd79cfb
+++
title = "Running SAS at HCC"
description = "How to run SAS on HCC resources."
+++
-
[
Running SAS through the command line
](
#connecting-to-jupyterhub
)
-
[
Running SAS on JupyterHub
](
#connecting-to-jupyterhub
)
-
[
Running SAS on Anvil
](
#connecting-to-jupyterhub
)
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
](
https://github.com/unlhcc/job-examples
)
.
## SAS on HCC Clusters
SAS applications can be ran on HCC clusters similar to other jobs.
[
Connect to a HCC cluster
](
{{
<
relref
"../../
connecting
/"
>
}}) 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,
`t_test.sas`
, to perform a t test analysis on a small data set.
{{%expand "t-test.sas" %}}
{{
<
highlight
sas
>
}}
*
load the dataset;
data pulse;
input pre post;
datalines;
62 61
63 62
58 59
64 61
64 63
61 58
68 61
66 64
65 62
67 68
69 65
61 67
64 65
61 63
63 62
;
*
it is always a good idea to print out the dataset;
proc print;
run;
*
perform the analysis using PROC TTEST;
proc ttest;
paired pre
*post; *
tells sas to compute the test for the paired differences;
run;
{{
<
/
highlight
>
}}
{{% /expand %}}
---
#### 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.
{{% panel header="
`sas.submit`
"%}}
{{
<
highlight
bash
>
}}
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --mem=1gb
#SBATCH --time=00:10:00
#SBATCH --job-name=sas_example
#SBATCH --error=sas_example.%J.err
#SBATCH --output=sas_example.%J.out
module load sas/9.4
sas t-test.sas
{{
<
/
highlight
>
}}
{{% /panel %}}
#### 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.
{{
<
highlight
bash
>
}}
$ sbatch sas.submit
$ squeue -u
<username>
{{
<
/
highlight
>
}}
Replace
`<username>`
with your HCC username.
#### Sample Output
The results of the t-test are computed and printed to the
`.lst`
file (see
below).
{{%expand "t-test.lst" %}}
{{
<
highlight
batchfile
>
}}
The SAS System
Obs pre post
1 62 61
2 63 62
3 58 59
4 64 61
5 64 63
6 61 58
7 68 61
8 66 64
9 65 62
10 67 68
11 69 65
12 61 67
13 64 65
14 61 63
15 63 62
The SAS System
The TTEST Procedure
Difference: pre - post
N Mean Std Dev Std Err Minimum Maximum
15 1.0000 3.0237 0.7807 -6.0000 7.0000
Mean 95% CL Mean Std Dev 95% CL Std Dev
1.
0000 -0.6745 2.6745 3.0237 2.2137 4.7687
DF t Value Pr > |t|
14 1.28 0.2211
{{
<
/
highlight
>
}}
{{% /expand %}}
## SAS on JupyterHub
## SAS on Anvil
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment