Getting started with Hyak
Setting up Hyak access
Hyak is the supercomputer system at the University of Washington. UWQCC members may use CPU and GPU computational resources provided by the UWQCC for quantum computing projects through Hyak. UWQCC members should become members of the Research Computing Club (RCC) to get access to Hyak. Once completed, members will be able to use STF resources on Hyak, in addition to GPUs and CPUs available through UWQCC.
Accessing Hyak and checking resources
Once an account is created and registered with the UWQCC, Hyak is accessed via ssh:
$ ssh <netid>@klone.hyak.uw.edu
UWQCC resources on Hyak can be seen with the hyakalloc command:
$ hyakalloc
Account resources available to user: <netid>
╭─────────┬─────────────────┬──────┬────────┬──────┬───────╮
│ Account │ Partition │ CPUs │ Memory │ GPUs │ │
├─────────┼─────────────────┼──────┼────────┼──────┼───────┤
│ uwqcc │ gpu-l40 │ 64 │ 742G │ 4 │ TOTAL │
│ │ │ 0 │ 0G │ 0 │ USED │
│ │ │ 64 │ 742G │ 4 │ FREE │
╰─────────┴─────────────────┴──────┴────────┴──────┴───────╯
Checkpoint Resources
╭───────┬──────┬──────╮
│ │ CPUs │ GPUs │
├───────┼──────┼──────┤
│ Idle: │ 8030 │ 197 │
╰───────┴──────┴──────╯
UWQCC resources available for immediate use are shown in the bottom row labeled FREE. The resources available in each partition can be viewed here.
Batch jobs are submitted with the sbatch command. UWQCC jobs should be submitted with uwqcc as the account and gpu-l40 as the partition. An example slurm submission script is shown below.
#!/bin/bash
#SBATCH --job-name=test_job_name
#SBATCH --mail-type=ALL # when to email about job status updates
#SBATCH --mail-user=<netid>@uw.edu # email for notifications about job status
#SBATCH -p gpu-l40 # partition
#SBATCH -A uwqcc # account
#SBATCH --nodes=1 # number of nodes
#SBATCH --time=1:00:00 # wall time
#SBATCH --ntasks=1 # number of threads
#SBATCH --gpus=l40:1 # number of gpus
#SBATCH --mem=40G # amount of RAM
python test.py
exit $?
To submit the job specified by the slurm script named test_job.slurm, the run the sbatch command:
$ sbatch test_job.slurm
Refer to the Hyak documentation for guides on job submission and related options.
Installing Python using Miniconda
Miniconda is a popular package distribution containing many useful python packages and facilities for managing package dependencies. Detailed installation instructions are given on the Miniconda website and are replicated here Hyak usage. Within Hyak, program execution, including package installation, must be done using interactive nodes. To request an interactive node from the UWQCC resources, run the following.
$ srun -A uwqcc -p gpu-l40 --time=1:00:00 --mem=10G --pty /bin/bash
Within the interactive node, Miniconda is installed by the following commands:
$ cd /gscratch/uwqcc/<netid>/
$ mkdir miniconda3
$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda3/miniconda.sh
$ bash miniconda3/miniconda.sh -b -u -p miniconda3
$ cd
$ echo "PATH=/gscratch/uwqcc/<netid>/miniconda3/bin:$PATH" >> .bashrc
$ source .bashrc
$ conda list
The conda command is used for package management. Refer to the miniconda website for additional information. Following this, use conda to create an environment qc_env and install python:
$ conda create -n qc_env
$ conda activate qc_env
$ conda install python
From this, you can use conda or pip to install python-specific packages.