Running Jobs¶
This guide explains how to create and submit a job script to the PBS Pro scheduler on the IMTM HPC cluster. It also covers how to allocate resources such as CPUs, memory, and walltime.
Warning
All jobs must be submitted via the scheduler using qsub. Running tasks directly on compute nodes is strongly discouraged, as unscheduled tasks are limited to 4 CPUs and 1 GB of memory by cgroup restrictions.
Tip
If you need to run processes manually on compute nodes, consider using Interactive Jobs. These allow you to run commands directly on compute nodes from the command line, making them ideal for manual tasks and troubleshooting.
Create a Job Script¶
Use any text editor (e.g., nano, vim) to create a PBS job script:
Example content for job.pbs:
#!/bin/bash
#PBS -N my_job # Job name
#PBS -l select=1:ncpus=4:mem=8gb # Resource request directive
#PBS -l walltime=02:00:00 # Maximum runtime (hh:mm:ss)
#PBS -j oe # Merge stdout and stderr
#PBS -o output.log # Output file
module load mysoftware # Load any necessary modules
./my_program # Run your application
Job Environment Variables¶
Commonly used job environment variables give your job script quick access to essential details.
| Variable | Purpose |
|---|---|
PBS_JOBID |
Unique identifier for the running job |
PBS_JOBNAME |
Human-readable job name (#PBS -N or script filename) |
PBS_NODEFILE |
Path to a file listing all allocated cores/nodes |
PBS_O_WORKDIR |
Directory from which qsub was invoked |
PBS_QUEUE |
Name of the queue in which the job is executing |
Submitting the Job¶
Submit your script to the scheduler:
You will receive a job ID as confirmation.
Monitoring the Job¶
Check your jobs:
Get detailed info for a specific job:
Canceling a Job¶
To stop a job: