1. Running a Basic Job on DRAC HPC
Create a Job Script
Create a file named
job.sh
with the following content:#!/bin/bash #SBATCH --time=00:15:00 #SBATCH --account=def-sponsor00 echo 'Hello, world!' sleep 1000 # Sleep for a thousand secondsSubmit the Job
Use the
sbatch
command to submit your job script:sbatch job.shMonitor the Job
Check the status of your job using the
squeue
command:squeue -u $USERCheck the Output
Once the job is complete, check the output file
serial_job.out
for results.cat slurm-<job_id>.outCancel Jobs
If you need to cancel a job, use the
scancel
command:scancel <job_id>Check the Job Efficiency
To check the efficiency of your job, use the
seff
command:seff <job_id>
Additional Resources
Last modified: 21 March 2025