PBS to SLURM transition
University of Southern California already compiled an excellent list of cheatsheets and resources for converting PBS terminology to Slurm.
You can read it here: https://hpcc.usc.edu/support/documentation/pbs-to-slurm/
A short version of it, strictly pertaining to GHPC is below.
Key differences
Job runs from where you submitted the job and not the user's home directory...
Commands
PBS command | Slurm command | Meaning |
---|---|---|
qsub job-script.sh | sbatch job-script.sh | submit job-script.sh to the queue |
qsub -I | srun -N1 --pty bash | Get an interactive shell on a cluster node |
myst | myst | status of my jobs in all queues |
navst | navst | Status of all jobs in NAV queue |
qstat -f | sj | all details about a job |
N/A | saj | Status of all my jobs |
N/A | sajt | Status of all my jobs in last 24 hours |
qdel | scancel | cancel a job |
pbsnodes -a | ghpcinfo | Status of all nodes in entire cluster |
Environment variables
PBS | Slurm | Meaning |
---|---|---|
$PBS_JOBID | $SLURM_JOB_ID | job id for use within scripts |
$PBS_O_WORKDIR | $SLURM_SUBMIT_DIR | Directory where the job was submitted from |
$PBS_O_HOST | $SLURM_SUBMIT_HOST | Hostname where job was submitted from |
Automate conversion of job scripts from PBS to Slurm
An easy way to swap these environment variables in your current job scripts? You can use sed.
sed -i -e 's/$PBS_JOBID/$SLURM_JOB_ID/g' -e 's/$PBS_O_WORKDIR/$SLURM_SUBMIT_DIR/g' <jobscriptfilename.sh>