A HelloWorld First Job#

Create a starter.sh file, with the following contents

#! /bin/bash
#PBS -N HelloWorld
#PBS -o out.log
#PBS -e err.log
#PBS -l ncpus=1
#PBS -q cpu

module load compiler/anaconda3
python3 <ABSOLUTE_PATH_TO_PROGRAM>/helloworld.py

Create a file helloworld.py with the following contents:

import time
print ("Hello World")
time.sleep(50)

You can now submit this by running qsub starter.sh.
This will return a JOBID.

You can check check more information about your job on : Cluster Deep Dive.

Few things to note :
1. To use GPU acceleration, change #PBS -q cpu to #PBS -q gpu .
2. Please donot use more resources than absolutely necessary. For example, python programs run on a single thread, unless specifically optimized to work on multiple cores (sklearn, pytorch etc).
3. Use Python Virtual Environments for managing dependenices, and donot forget to activate in your job script.
4. Donot forget to activate the required Environment Modules in your job script.