Job Types
Understanding the correct job type to use is important when planning how to run your software on an HPC cluster.
There are two primary job types: Interactive and Batch, which are explained below.
Interactive Jobs
Starting an interactive job gives you a shell on a compute node. You can manually enter commands at the terminal to run them on the node.
Interactive jobs are great for:
- short tasks where you can stay connected and wait for the results
- writing, testing, and debugging your job scripts
Jobs submitted through Open OnDemand are considered interactive jobs.
Interactive jobs will be terminated automatically if the system determines there is no user present to interact with the job.
This happens when:
- your interactive session is left idle for too long
- you disconnect from the interactive session (including loss of network connectivity).
Batch Jobs
Submitting a batch job will queue a shell script to run on a compute node. You must write the script ahead of time and plan the exact sequence of commands to be run on the node.
Your batch job will run in the background, so you can log out or disconnect from Palmetto while it is queued or running.
The scheduler will send you an email when your job is complete.
Batch jobs are great for when you:
- have tasks that do not require interactive input
- need a large amount of resources, since you may disconnect while the job waits in the queue to run
- know your job will take a long time to execute, since you may disconnect while the job executes in the background
Comparison
The table below provides an at-a-glance comparison between the two different types and their use cases.
Metric | Interactive | Batch |
---|---|---|
Requires planning commands to run ahead of time. | ❌ No | ✅ Yes |
Can receive interactive keyboard input. | ✅ Yes | ❌ No |
Terminated when you disconnect from Palmetto. | ✅ Yes | ❌ No |
Runs in the background. | ❌ No | ✅ Yes |