Contact your supervisor to manage creating an account on Katana HPC.
Once account been created the username and password will be your zID and zPass
To access the Katana server from Linux OS open a terminal on your local machine and run the following command
user@user-laptop:~$ ssh zID@katana.restech.unsw.edu.au
Enter the zPass when prompted to enter the password.
Note : katana has two login nodes katana1 and katana2. If you have an interactive session running on one specific node you need to specify it when logging in e.g to access node 1 run the following command
user@user-laptop:~$ ssh zID@katana1.restech.unsw.edu.au
Download and install Putty ssh from here https://www.putty.org/
Open Putty and configure it as follow
When prompted, enter your zID and zPass
To avoid entering your password each time logging in the super computer you can use ssh-keygen to generate a private-public key pairs:
Generate private and public keys on local machine:
Open terminal window on your local machine Linux based OS computer and run
user@user-laptop:~$ ssh-keygen
You should see output like
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):
You can specify path and file name to save the private and public keys or just press enter to use default ones.
Then Press Enter two times. Two files will be generated in ~/.ssh/ directory id_rsa and id_rsa.pub contains the private and public keys respectively
Open the id_rsa.pub file and copy its entire content.
Add your public key to the authorized keys list :
Login to Katana server and edit the ~/.ssh/authorized_keys (Note: create it if not exist). You can use any text editor (e.g. vim)
[zID@katana1 ~]$ vim ~/.ssh/authorized_keys
Paste the copied content to a new line in the authorized_keys file then save and quit.
Login using public-key authentication:
Exit from the Katana server and login again by run
user@user-laptop:~$ ssh zID@katana.restech.unsw.edu.au
You can notice that the password will not be prompted
Open Putty-Keygen
Click 'Generate' and keep moving the mouse to generate some random values
Copy the content of the public key and save the private key file.
Open Putty and go to 'Auth'. Under 'Private key file for authentication' brows to your private key file
Login to the Katana server. Type your zID and zPass.
Edit the ~/.ssh/authorized_keys (Note: create it if not exist). You can use any text editor (e.g. vim)
[zID@katana1 ~]$ vim ~/.ssh/authorized_keys
Paste the public key copied content to a new line in the authorized_keys file then save and quit.
Close Putty and open it again. Login to Katana. No password will be prompted.
To transfer files between your Linux OS local machine and Katana server use rsync command. Open terminal and run the following command
user@user-laptop:~$ rsync /path/to/source/file zID@kdm.restech.unsw.edu.au:/path/to/destination/folder
Example to upload foo file from home directory in your local machine to your home folder in the Katana server:
user@user-laptop:~$ rsync ~/foo zID@kdm.restech.unsw.edu.au:/home/zID/
To transfer a folder use -r option
user@user-laptop:~$ rsync -r /path/to/source/folder zID@kdm.restech.unsw.edu.au:/path/to/destination/folder
By default rsync not showing any progress while running. Use -v option to increase the command verbosity
user@user-laptop:~$ rsync -r -v /path/to/source/folder zID@kdm.restech.unsw.edu.au:/path/to/destination/folder
To transfer from Katana server to your local machine simply swap the source and destination from previous commands
user@user-laptop:~$ rsync -r -v zID@kdm.restech.unsw.edu.au:/path/to/source/folder /path/to/destination/folder
Download and install FileZilla https://filezilla-project.org/
Open FileZilla and go to file->Site Manager and configure as follow
Small directory of 10Gb that can be used for source code.
Can be accessed as
[zID@katana1 ~]$ /home/zID
16 Tb shared among all users
By default only the user have access.
Can be accessed as
[zID@katana1 ~]$ /srv/scratch/zID
More information at https://datakid.github.io/restech-docs/storage/index.html
There are two modes for running jobs on Katana
Interactive mode
Batch mode
In this mode you submit a request for resources then you will be assigned to a specific compute node. Once assigned, you can run your scripts through the command window.
You need to specify the number of cpus (ncpus) your job is needed, the amount of memory (mem) and the expected duration (walltime) as follow:
[zID@katana1 ~]$ qsub -I -l select=1:ncpus=16:mem=80gb,walltime=12:00:00
The job will be queued and you need to wait till the resources assigned. Once the job run you should something like
[zID@k201 ~]$
where k201 is the assigned compute node.
To get GPUs run:
[zID@katana1 ~]$ qsub -I -l select=1:ngpus=2:ncpus=16:mem=82gb,walltime=12:00:00
Note: When you are using the GPU resources you should use 1, 2, 3 or 4 times the following “ncpus=8:ngpus=1:mem=46gb”, where “-l select=1:ncpus=32:ngpus=4:mem=184gb” will use the whole node.
If you run your script through the main session, the script will be terminated if you disconnected from the Katana server. To avoid that use screen command to open a background session. To do that run screen command as follow:
[zID@katana1 ~]$ screen -S sessionName
A new session will be generated. Do all your work on this session and run your script.
To return to the main session press Ctrl+a d and to return back to your session run:
[zID@katana1 ~]$ screen -rd sessionName
More on screen command https://www.geeksforgeeks.org/screen-command-in-linux-with-examples/
You can write the job as a sequence of commands in a PBS script format and submit it to the queue using qsub command.
[zID@katana1 ~]$ qsub myjob.pbs
440603.kman.restech.unsw.edu.au
The submission will return the job ID (440603). You can use the job ID to check the statues of the job using qstat
[zID@katana1 ~]$ qstat 440603
Job id Name User Time Use S Queue
---------------- ---------------- ---------------- -------- - -----
440603.kman myjob.pbs z5173707 0 Q simi12
The myjob.pbs is a text file containing the job commands. Similar to the interactive mode you need to specify the required resources needed for your job. Here you write them in lines start with #PBS.
myjob.pbs
#!/bin/bash
#PBS -l select=1:ncpus=1:mem=4gb
#PBS -l walltime=12:00:00
cd /path/to/script
./myprogram
More on running jobs on Katana server: https://datakid.github.io/restech-docs/using_katana/running_jobs.html#interactive-jobs
To use a specific package , you need to load it first. There are a lot of pre-installed packages in Katana that can be loaded using module load command.
For example to load python version 3.8.2, run
[zID@k201 ~]$ module load python/3.8.2
To list all available modules use module avail and to list the loaded modules use module list