Intro to HPC Workshop Materials
Video recordings and slides of previous Intro to HPC workshops are available here on this page. The more recent workshops will have more updated information, but older workshops are also available.
Interactive Materials
Logging In
Activity: Let’s run a batch job!
Let’s write a basic Python script, then submit it to the queue
Process:
- write a Python script
- write a batch script
- submit the batch script
Step 1: Write a Python script
You can write anything you want! It can be as simple as print(‘hello world’), or you can make it more interesting.. up to you ;)
- If you haven't already, log onto the HPC
- create a blank python file:
touch myscript.py
-
edit the script:
nano myscript.py
a. feel free to use vim or emacs or any other text editor if you are more comfortable with one of those
b. add something simple like
print(“hello world!”)
4. be sure to save it!
Step 2: Write your batch script
Batch Script
Part 1: Use directives to tell the scheduler what resources you want
#!/bin/bash
#SBATCH --job-name=test
#SBATCH --output=test_%A.out
#SBATCH --error=test_%A.err
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --partition=standard
#SBATCH --account=<your_account>
#SBATCH --time=00:05:00
Part 2: Load your modules
module load python/3.11
Part 3: Run your script
python3 myscript.py
Step 3: Submit your job
-
Send to scheduler
2. Check the queuesbatch myscript.slurm
squeue --user=<my netid>
-
View the output files
4. View the job history reportcat <name>.out cat <name>.err
job-history <job id>
Congrats! You just ran your first batch job!
Additional Resources
The HPC Consult Team is here for you!
- Documentation: docs.hpc.arizona.edu
- GitHub: ua-researchcomputing-hpc.github.io
- ServiceNow: HPC Support and Consulting Request
- Office Hours: every Wednesday 2-4pm on GatherTown