Requesting a Job
Overview
Tutorial: 15 min
Exercises: 5 min
- Objectives:
Learn how to write a PBS job script for Gadi.
Learn how to launch a job in Gadi.
Which project are you using?
Which job queue are you planning to use?
How many CPU cores are required for your task?
How many GPUs do you need?
What is the estimated runtime of your program?
Which modules are necessary to execute the program?
What script or command will you use to run the program?
1#!/bin/bash
2
3#PBS -P vp91
4#PBS -q normal
5#PBS -l ncpus=48
6#PBS -l mem=10GB
7#PBS -l walltime=00:02:00
8#PBS -N testScript
9
10module load python3/3.11.0
11module load papi/7.0.1
12
13. /scratch/vp91/Training-Venv/intro-parallel-prog/bin/activate
14
15which python
P - Gadi project (sometimes called account) to use
q - Gadi queue to use
ncpus - Total number of cores requested
ngpus - Total number of GPUs requested
mem - Total memory requested
l - Total wall time for which the resources are provisioned
N - Name of the job
For more PBS Directives please check the Gadi document and for more details on the different Gadi queues please check out the corresponding Gadi document .
All the Python code are available in the directory python/src` while all the job scripts are available in the directory python/jobScripts. To submit a job use the command
1qsub 0_test_script.pbs
and to know the status of your job use the command
1qstat <jobid>
To know get the details about the job use the command
1qstat -swx <jobid>
- Interactive Jobs: An interactive job allows you to interact directly with the HPC system and the job while it’s
running. This means you have a command-line shell (e.g., terminal) on the compute node where you can run commands in real-time.
1qsub -I -q normal -P vp91 -l walltime=00:10:00,ncpus=48,mem=10GB
Key Points
Multiple PBS directives are available request a job.
Gadi uses some custom directives.
There are two modes to request a job - batched and interactive.